Setting up GPU for fastai_v3

(Yash Mittal) #21

Got the same error in all configs

0 Likes

#22

Check this thread

0 Likes

(Willismar Medeiros) #23

I believe this one from @cpbotha tutorial

1 Like

(supersummi) #24

Hi,
I can’t make the code of lesson1-pets run on my GPU, it is defaulting back and using the CPU.

Using the same conda environment with keras and tensorflow it works with the command
os.environ[“CUDA_VISIBLE_DEVICES”] = ‘0’
But this command seems not to be working with fast.ai…

Another attempt was:
device = torch.device(‘cuda’ if torch.cuda.is_available() else ‘cpu’)
print(Using device: device)
This is printing: Using device cuda
But the CPU gets really loud so I can tell that the model is trained on the cpu.

Any suggestions?

1 Like

#26

Hi, I just started and have the same issue. I was wondering if fastai was using my GPU or not. I end up using the util gpu-z where you can have a look at gpu clock and gpu load and then I can see that as the model train the gpu clock increase to handle the work load.

So try that to see if your is using gpu or not.

Cheers

0 Likes

(hector) #27

Try checking GPU usage with nvidia-smi command to make sure if GPU is being used or not

0 Likes

(supersummi) #28

The GPU seems to be used by my environment.
The process:
0 9492 C …n\Anaconda3\envs\dl-gpu_py36\python.exe N/A
is listed.

0 Likes