I want to train a gpt2 model in my laptop and I have a GPU in it and my os is windows , but I always got this error in python:
torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available
when I tried to check the availability of GPU in the python console, I got true:
import torch
torch.cuda.is_available()
Out[4]: True
but I can't get the version by
nvcc version
#or nvcc --version
NameError: name 'nvcc' is not defined
I use this command to install CUDA
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
What can I do to make the GPU available for python?