New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel CUDA error #296
Comments
Make sure to create a sparse tensor on the GPU.
|
Also, I noticed that the CUDA version used to compile ME is 10.1 but the pytorch is using 11.0. This could create potential problems. Try to compile ME with
|
Hi, A = ME.SparseTensor(coordinates=coords, features=feats,device='cuda') RuntimeError: /tmp/pip-req-build-qvlqpmi2/src/convolution_gpu.cu:65, assertion (kernel.is_cuda()) failed. kernel must be CUDA ==========System========== |
I am getting this error when using the Pruning function. all my tensors in the forward pass are 'cuda' but when pruning keep cuda fails. |
I encountered the same problem and the cause of my problem is probably not very common but I want to share it anyway in the hope that it might help someone out there 😸 My server has multiple GPU cards, and After I added the above line, I can do something like:
And the problem is solved. I am very naive with respect to computer hardware, so I guess might be totally wrong. But I feel that the problem might be that the network and input were sent to different GPU cards if I don't align them and they simply didn't find each other. |
Describe the bug
I have been trying to use the SparseConvs on my GPU, after testing everything on CPU, when trying to use CUDA it throws the error:
assertion (!kernel.is_cuda()) failed. kernel must be CPU
I'm using the Sparse ResNet as in the repo examples but when I load the variables with CUDA and try to run the forward pass it throws this error.
To Reproduce
Steps to reproduce the behavior.
The data is from modelnet40 dataset
Desktop (please complete the following information):
MinkowskiEngine.print_diagnostics()
)==========System==========
Linux-5.4.0-58-generic-x86_64-with-glibc2.29
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0]
==========Pytorch==========
1.7.1
torch.cuda.is_available(): True
==========NVIDIA-SMI==========
/usr/bin/nvidia-smi
Driver Version 455.45.01
CUDA Version 11.1
VBIOS Version 90.04.7A.80.B2
Image Version G001.0000.02.04
==========NVCC==========
/usr/bin/nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
==========CC==========
/usr/bin/c++
c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
==========MinkowskiEngine==========
/home/lucas/PhD/Implementations/SparseConvModels/sparseconv_venv/lib/python3.8/site-packages/MinkowskiEngine/init.py:36: UserWarning: The environment variable
OMP_NUM_THREADS
not set. MinkowskiEngine will automatically setOMP_NUM_THREADS=16
. If you want to setOMP_NUM_THREADS
manually, please export it on the command line before running a python script. e.g.export OMP_NUM_THREADS=12; python your_program.py
. It is recommended to set it below 24.warnings.warn(
0.5.0
MinkowskiEngine compiled with CUDA Support: True
NVCC version MinkowskiEngine is compiled: 10010
CUDART version MinkowskiEngine is compiled: 10010
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: