NVlabs/cule

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

xy2012 opened this issue · 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.

Me too

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.

You might also want to try:
#34 (comment)