AttributeError: 'jittor_core.Flags' object has no attribute 'cuda_archs'

我的cuda版本为11.3 cudnn为8.4 jittor版本为1.3.4.7
系统为18.04 两张2080 Driver Version: 470.129.06
安装好jittor后报错如下

(jittor) pc@pc:~/Downloads$ python3.7 -m jittor.test.test_cuda
[i 0522 13:06:49.134703 36 compiler.py:951] Jittor(1.3.4.7) src: /home/pc/anaconda3/envs/jittor/lib/python3.7/site-packages/jittor
[i 0522 13:06:49.137530 36 compiler.py:952] g++ at g++(7.5.0)
[i 0522 13:06:49.137590 36 compiler.py:953] cache_path: /home/pc/.cache/jittor/jt1.3.4/g++7.5.0/py3.7.13/Linux-5.4.0-11x44/AMDRyzenThreadx2b/default
[i 0522 13:06:49.144154 36 install_cuda.py:53] cuda_driver_version: [11, 4]
[i 0522 13:06:49.147752 36 __init__.py:411] Found /home/pc/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc(11.2.152) at /home/pc/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc.
[i 0522 13:06:49.207305 36 __init__.py:411] Found gdb(8.1.1) at /usr/bin/gdb.
[i 0522 13:06:49.210916 36 __init__.py:411] Found addr2line(2.30) at /usr/bin/addr2line.
[i 0522 13:06:49.333040 36 compiler.py:1006] cuda key:cu11.3.58_sm_75
[i 0522 13:06:49.492586 36 __init__.py:227] Total mem: 62.67GB, using 16 procs for compiling.
Compiling jittor_core(147/147) used: 20.511s eta: 0.000s
[i 0522 13:07:10.273677 36 jit_compiler.cc:28] Load cc_path: g++
[i 0522 13:07:10.273708 36 jit_compiler.cc:31] Load nvcc_path: /usr/local/cuda/bin/nvcc
Traceback (most recent call last):
  File "/home/pc/anaconda3/envs/jittor/lib/python3.7/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/pc/anaconda3/envs/jittor/lib/python3.7/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/pc/anaconda3/envs/jittor/lib/python3.7/site-packages/jittor/__init__.py", line 18, in <module>
    from . import compiler
  File "/home/pc/anaconda3/envs/jittor/lib/python3.7/site-packages/jittor/compiler.py", line 1348, in <module>
    if len(flags.cuda_archs):
AttributeError: 'jittor_core.Flags' object has no attribute 'cuda_archs'

可以参考

AttributeError: ‘jittor_core.Flags’ object has no attribute ‘cuda_archs’

1 个赞

?什么递归回答 :rofl:
您给的链接仍然是这个问题
不过还是感谢您来回答这个问题

不过我最后解决掉了,我的解法是直接卸载现有的cuda然后让计图自己安装cuda和cudnn-dev
不过最后要记得export nvcc_path

请问让jittor自己安装是怎样安装呀?我也遇到这个问题,怀疑是cuda版本与jittor不匹配 :joy: