opacus icon indicating copy to clipboard operation
opacus copied to clipboard

CUDA 11.0 support

Open pepper-jk opened this issue 6 years ago • 4 comments

Feature

Does opacus support CUDA 11.0? If not, are you planning to support CUDA 11.0 in the future? If so when?

Alternatives

Can one build opacus or install a nightly to get CUDA 11.0 support?

Additional context

Our computation cluster now has nodes with CUDA 11.0, so I need to adjust my project to work with the new CUDA.

I followed the instructions of the admins including installing anything torch related with these instructions.

But when I run my code opacus seems to look for CUDA 10.2 libs:

$ cat log.txt 

------------------------ /usr/share/Modules/modulefiles ------------------------
dot         module-git  module-info modules     null        use.own

------------------------------- /etc/modulefiles -------------------------------
cuda/10.0          cuda/11.0(default) cuda/9.0
cuda/10.1          cuda/8.0           cuda/9.1
cuda/10.2          cuda/8.0-ga2       cuda/9.2
Traceback (most recent call last):
  File "/path/to/storage/code/HFL_PyTorch/src/federated-hierarchical_main.py", line 18, in <module>
    import privacy_engine_xl as dp_xl
  File "/path/to/storage/code/HFL_PyTorch/src/privacy_engine_xl.py", line 2, in <module>
    import opacus
  File "/path/to/storage/miniconda3/envs/HFL_opacus/lib/python3.8/site-packages/opacus/__init__.py", line 6, in <module>
    from .privacy_engine import PrivacyEngine
  File "/path/to/storage/miniconda3/envs/HFL_opacus/lib/python3.8/site-packages/opacus/privacy_engine.py", line 10, in <module>
    import torchcsprng as csprng
  File "/path/to/storage/miniconda3/envs/HFL_opacus/lib/python3.8/site-packages/torchcsprng/__init__.py", line 10, in <module>
    from torchcsprng._C import *
ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory

Also having issues upgrading to opacus==0.10.0, but this might be unrelated:

ERROR: Could not find a version that satisfies the requirement dataclasses==0.7 (from opacus==0.10.0) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
ERROR: No matching distribution found for dataclasses==0.7 (from opacus==0.10.0)

pepper-jk avatar Nov 11 '20 15:11 pepper-jk

Hi Opacus doesn't have an explicit dependency on the cuda versioning. However, one of our dependencies torchcsprng does. We don't have any insight on when they will support cuda 11

JohnlNguyen avatar Nov 11 '20 18:11 JohnlNguyen

As for opacus v0.10.0

did you follow https://github.com/pytorch/opacus#installation?

I was able to install pip install opacus==0.10.0 on colab

JohnlNguyen avatar Nov 11 '20 18:11 JohnlNguyen

Hi Opacus doesn't have an explicit dependency on the cuda versioning. However, one of our dependencies torchcsprng does. We don't have any insight on when they will support cuda 11

Thanks for the reply, I will try to opened an issue there: pytorch/csprng/issues/82

However I'd prefer for the issue to remain open until it is solved.

pepper-jk avatar Nov 11 '20 18:11 pepper-jk

As for opacus v0.10.0

did you follow https://github.com/pytorch/opacus#installation?

I was able to install pip install opacus==0.10.0 on colab

I'll take a look at this tomorrow. Thanks.

EDIT: I opened a new issue #91 for this.

pepper-jk avatar Nov 11 '20 18:11 pepper-jk