cule icon indicating copy to clipboard operation
cule copied to clipboard

AttributeError: module 'torch.cuda' has no attribute 'get_arch_list'

Open xy2012 opened this issue 4 years ago • 3 comments

I tried to build a docker following the Dockerfile. When executing the last command--python setup.py install--in cule folder, I got the error:

Traceback (most recent call last): File "setup.py", line 12, in codes = [arch[-2] + '0' for arch in torch.cuda.get_arch_list()] AttributeError: module 'torch.cuda' has no attribute 'get_arch_list'

In the docker, my os is 18.04.2-Ubuntu with cuda 10.0 , torch 1.2.0. I noticed that there is no get_arch_list() method in /usr/local/lib/python3.6/dist-packages/torch/cuda/init.py. Though torch 1.8.0 has attribute 'get_arch_list', torch 1.2.0 seems to be the highest version that matches with cuda 10.0.

I'm confused. How can I fix the bug? Many thanks.

xy2012 avatar Apr 08 '21 15:04 xy2012

Me too

danielsnider avatar May 20 '21 17:05 danielsnider

I'm finding that the code works better when running from commit "Updated support for multiple architectures during compilation". Since then they tried updating the Cuda and PyTorch version which leads to more problems for me.

danielsnider avatar May 26 '21 15:05 danielsnider

You might also want to try: https://github.com/NVlabs/cule/issues/34#issuecomment-1166889998

Rohan138 avatar Jun 27 '22 05:06 Rohan138