SforAiDl / KD_Lib

A Pytorch Knowledge Distillation library for benchmarking and extending works in the domains of Knowledge Distillation, Pruning, and Quantization.
https://kd-lib.readthedocs.io/
MIT License
609 stars 58 forks source link

Issue with CUDA #129

Closed OriAlpha closed 2 years ago

OriAlpha commented 2 years ago

I am facing issue with cuda, I have used following command to install PyTorch conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=11.3 -c pytorch -c conda-forge

When I try using my gpu, it fails and uses cpu as default. Error as: Either an invalid device or CUDA is not available. Defaulting to CPU.

I am following distillation example on readme

NeelayS commented 2 years ago

Are you sure that you have correctly installed the cudatoolkit version compatible with your GPU and other software? Could you run the following code snipped in your Python evironment and let me know the output

import torch
torch.cuda.is_available()
OriAlpha commented 2 years ago

i found the issue, but thanks