@Pritesh_Gohil
Thank you very much. It’s the same here. PyTorch is good but is clearly messy…

My ENV:

Device 0: "GeForce GTX 1050 Ti"
NVIDIA-SMI 450.57       Driver Version: 450.57       CUDA Version: 11.0


PyTorch Configuration

➜  pytorch python
Python 3.8.2 (default, Jul 16 2020, 14:00:26) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda
<module 'torch.cuda' from '/home/jiapei/.local/lib/python3.8/site-packages/torch/cuda/__init__.py'>
>>> torch.cuda.is_available()
False
>>> print(torch.version.cuda)
11.0
>>> torch.backends.cudnn.enabled
True
>>> 


Cuda

and:
➜  ~ cat /usr/local/cuda/version.txt 
CUDA Version 11.0.228

It is unbelievably weird that torch.cuda.is_available() failed to return a reasonable value…
I’m actually testing yolov5, which has the following line:
assert torch.cuda.is_available(), 'CUDA unavailable, invalid device %s requested' % device  # check availablity. Clearly, it’s going to fail the assertion.
It seems PyTorch supporting CUDA 11 should be the solution?
hmmmmm any further suggestions?
Pei