I’m encountering an error when trying to use PyTorch with GPU acceleration. When I run torch.cuda.is_available()
, it returns False
.
`>>> import torch
torch.cuda.is_available()
/home/ai-132/miniconda3/envs/pranjal2/lib/python3.11/site-packages/torch/cuda/init.py:118: UserWarning: CUDA initialization: CUDA unknown error – this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /opt/conda/conda-bld/pytorch_1712608853099/work/c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0
False
`
I was expecting it to be ture but it returned false.