AI-secure / CRFL

CRFL: Certifiably Robust Federated Learning against Backdoor Attacks (ICML 2021)
69 stars 15 forks source link

RuntimeError: No CUDA GPUs are available #1

Closed HengerLi closed 3 years ago

HengerLi commented 3 years ago

Hi, greeting! I spotted an issue when I try to reproduce the experiment on Google Colab, torch.cuda.isavailable() shows True, but torch detect no CUDA GPUs. Here is the full log: Traceback (most recent call last): File "main.py", line 141, in param.add(helper.dp_noise(param, helper.params['sigma_param'])) File "/content/gdrive/MyDrive/CRFL/utils/helper.py", line 78, in dp_noise noisedlayer = torch.cuda.FloatTensor(param.shape).normal(mean=0, std=sigma) File "/usr/local/lib/python3.7/dist-packages/torch/cuda/init.py", line 172, in _lazy_init torch._C._cuda_init() RuntimeError: No CUDA GPUs are available

ps: All modules in requirements.txt have installed. The python and torch versions are: 3.7.11 and 1.9.0+cu102

HengerLi commented 3 years ago

The problem solved when I reinstall torch and CUDA to the exact version the author used. Close the issue. Thanks :)