Closed shuiyuejihua closed 2 years ago
Hi, it looks like your current version of torchsort doesn't have the cuda version built. Can you try reinstalling with:
pip install --force-reinstall --no-cache-dir torchsort
Hi, it looks like your current version of torchsort doesn't have the cuda version built. Can you try reinstalling with:
pip install --force-reinstall --no-cache-dir torchsort
I tried, and it reinstalled the pytorch and torchsort , and RTX3060 warning, the problem may be about the RTX3060
>>> import torch
>>> import torchsort
>>> x = torch.tensor([[8., 0., 5., 3., 2., 1., 6., 7., 9.]], requires_grad=True).cuda()
GeForce RTX 3060 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
If you want to use the GeForce RTX 3060 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
and ,
>>> y = torchsort.soft_sort(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/shuiy/anaconda3/envs/pytorch_py3/lib/python3.7/site-packages/torchsort/ops.py", line 48, in soft_sort
return SoftSort.apply(values, regularization, regularization_strength)
File "/home/shuiy/anaconda3/envs/pytorch_py3/lib/python3.7/site-packages/torchsort/ops.py", line 126, in forward
w = (_arange_like(tensor, reverse=True) + 1) / regularization_strength
File "/home/shuiy/anaconda3/envs/pytorch_py3/lib/python3.7/site-packages/torchsort/ops.py", line 66, in _arange_like
ar = torch.arange(x.shape[1] - 1, -1, -1, dtype=x.dtype, device=x.device)
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
From https://pytorch.org/get-started/locally/ it looks like you need to install pytorch with:
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
After which torchsort should hopefully work after reinstalling
Thanks,but,It still doesn't work. I will use the cpu only
What error are you getting now?
the RTX3060 only can be installed like conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
, >=cudatoolkit 11, from nvidia channel .
I installed the pytorch first time like this.
So, I guess the problem is about the incompatible with new cuda versions for RTX30xx
In my case, The reason of this issue was that I didn't have NVCC. If you installed cudatoolkit using pip or conda, it doesn't include NVCC. I recommend that people who has this issue get additionally CUDA from NVIDIA and reinstall torchsort.
Hi, Yes I have had the same problem running on my GPU.
Please also see #35 for conda installation issues
i met the same issue
I realize now that initializing the functions to None
if the function is not available (here) results in a very unhelpful error message when the kernel has not been compiled - I will add proper error handling here to inform the user that the cuda extension needs to be compiled
on jupyter notebook is:
if x is on cpu(), run code is ok python 3.7.10, pytorch 1.9.0 , cudatoolkit=11.1, ubuntu 18.04