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
torch.cuda.is_available() is false after installed cuda 9.1. Anyone can help me out? #6098
Comments
@HongweiLuan Could you please show me the code of your function definition of |
@HongweiLuan And are you compiling a CUDA version? It will only happen when you are using a CPU-only package. Do you have cudnn in your CUDA 9.1 install? |
I am also having the same issue, on ubuntu (fresh install) compiling from source, master branch with cuda 9.1 and newest cudnn.
|
@peterjc123 Thank you very much for your response. the code is below. I copied the source files of cudnn to cuda library. I also tried to cuda.find_nvcc() and find_cuda_version() from pytorch.tools.setup_helpers import cuda. This works. However, torch.cuda.is_available() gives me false. When I checked the code in the cuda.py, hasattr(torch._C, '_cuda_isDriverSufficient') also gives me false. I am not sure whether torch._C is not working or my Driver is not updated. I tried to update it to M391 but it downgraded to 388 when I installed cuda 9.1. Thanks print('@%s: ' % os.path.basename(file)) if 1: if 1:
print('') |
+1 |
cuda 9.1 requires the latest nvidia driver. check if you have the lastest version. |
I have the latest nvidia driver and still getting the same issue. I even installed the CUDA SDK. My laptop is a SurfaceBook running bash on ubuntu on Windows 10 which has a GPU. Any suggestions? torch.backends.cudnn.enabled() returns true thanks! |
+1 |
issue fixed for me windows 10 installed CUDA tool kit https://developer.nvidia.com/cuda-downloads Check if your CUDA_HOME, CUDA_PATH & CUDA_PATH_V8 is set up properly. If not add it. then re install pytorch with cuda 90 compatibility https://pytorch.org/ ......................................................................> |
@vivekanandgoud , Yet I still get:
Any idea? |
I had the same issue with |
This worked for me on Linux: 1- Uninstall the package via pip: pip uninstall setuptools 2- Reinstall using the following command: conda install -c anaconda setuptools |
PyTorch GitHub Issues Guidelines
We like to limit our issues to bug reports and feature requests. If you have a question or would like help and support, please visit our forums: https://discuss.pytorch.org/
If you are submitting a feature request, please preface the title with [feature request].
When submitting a bug report, please include the following information (where relevant):
In addition, including the following information will also be very helpful for us to diagnose the problem:
Traceback (most recent call last):
File "C:/Users/hanyi/Downloads/Kaggle/20180306/build/mask-rcnn-resnet50-ver-01.a.tar/mask-rcnn-resnet50-ver-01.a/common.py", line 94, in
print ('\t\ttorch.backends.cudnn.version() =', torch.backends.cudnn.version())
File "C:\Users\hanyi\Anaconda3\lib\site-packages\torch\backends\cudnn_init_.py", line 65, in version
if libcudnn() is None:
File "C:\Users\hanyi\Anaconda3\lib\site-packages\torch\backends\cudnn_init.py", line 53, in _libcudnn
compile_version = torch._C._cudnn_version()
AttributeError: module 'torch._C' has no attribute '_cudnn_version'
The text was updated successfully, but these errors were encountered: