Jittor / jittor

Jittor is a high-performance deep learning framework based on JIT compiling and meta-operators.
https://cg.cs.tsinghua.edu.cn/jittor/
Apache License 2.0
3.08k stars 311 forks source link

运行python3.7 -m jittor.test.test_example出错 #252

Open Boring545 opened 3 years ago

Boring545 commented 3 years ago

Describe the bug

我在ubuntu20.04环境下已经配好了所有的环境,按照教程走的时候在最后测试的时候出现错误, 我使用的编译器是g++,python是3.8,显卡驱动包括CUDA都已经安装。 我也尝试过clang++来进行上述操作,但也出现了bug,这里就暂时不贴了。 似乎在日志中定位到了一个地方, nvcc fatal : Value 'compute_86' is not defined for option 'gpu-architecture' 但我不太理解具体的意思。 请帮帮我,感谢。

Full Log

jasonbus@jasonbus:~$ python3 -m jittor.test.test_example [i 0724 13:34:31.119655 92 compiler.py:869] Jittor(1.2.3.79) src: /usr/local/lib/python3.8/dist-packages/jittor [i 0724 13:34:31.121917 92 compiler.py:870] g++ at g++(9.3.0) [i 0724 13:34:31.121984 92 compiler.py:871] cache_path: /home/jasonbus/.cache/jittor/default/g++ [i 0724 13:34:31.126270 92 init.py:286] Found nvcc(10.1.243) at /usr/bin/nvcc. [i 0724 13:34:31.175024 92 init.py:286] Found gdb(9.2) at /usr/bin/gdb. [i 0724 13:34:31.178286 92 init.py:286] Found addr2line(2.34) at /usr/bin/addr2line. [i 0724 13:34:31.193114 92 compiler.py:958] py_include: -I/usr/include/python3.8 -I/usr/include/python3.8 [i 0724 13:34:31.202042 92 compiler.py:960] extension_suffix: .cpython-38-x86_64-linux-gnu.so [i 0724 13:34:31.310115 92 compiler.py:1098] OS type:ubuntu OS key:ubuntu [i 0724 13:34:31.310636 92 init.py:178] Total mem: 15.57GB, using 5 procs for compiling. [i 0724 13:34:31.487350 92 jit_compiler.cc:22] Load cc_path: g++ [i 0724 13:34:31.487579 92 init.cc:55] Found cuda archs: [86,] [i 0724 13:34:31.541550 92 compile_extern.py:444] mpicc not found, distribution disabled. [i 0724 13:34:31.546603 92 compile_extern.py:270] Downloading cutt... [i 0724 13:34:31.553902 92 compile_extern.py:283] installing cutt... mkdir -p build g++ -fPIC -c -I /usr/include -std=c++11 -O3 -march=native -o build/cutt.o src/cutt.cpp echo -e 'build/\c' > build/cutt.d g++ -fPIC -M -I /usr/include -std=c++11 -O3 -march=native src/cutt.cpp >> build/cutt.d g++ -fPIC -c -I /usr/include -std=c++11 -O3 -march=native -o build/cuttplan.o src/cuttplan.cpp src/cuttplan.cpp: In function ‘bool operator==(const TensorSplit&, const TensorSplit&)’: src/cuttplan.cpp:332:1: warning: control reaches end of non-void function [-Wreturn-type] 332 | } | ^ echo -e 'build/\c' > build/cuttplan.d g++ -fPIC -M -I /usr/include -std=c++11 -O3 -march=native src/cuttplan.cpp >> build/cuttplan.d /usr/bin/nvcc -Xcompiler -fPIC -c -I /usr/include -std=c++11 -O3 -Xptxas -dlcm=ca -lineinfo -arch=compute_86 -code=sm_86 --cudart=shared -ccbin="g++" --resource-usage -Xcompiler "" -D_FORCE_INLINES -o build/cuttkernel.o src/cuttkernel.cu nvcc fatal : Value 'compute_86' is not defined for option 'gpu-architecture' make: *** [Makefile:154:build/cuttkernel.o] 错误 1 Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details import(pkg_name) File "/usr/local/lib/python3.8/dist-packages/jittor/init.py", line 25, in from . import compile_extern File "/usr/local/lib/python3.8/dist-packages/jittor/compile_extern.py", line 502, in setup_cutt() File "/usr/local/lib/python3.8/dist-packages/jittor/compile_extern.py", line 309, in setup_cutt install_cutt(cutt_path) File "/usr/local/lib/python3.8/dist-packages/jittor/compile_extern.py", line 288, in install_cutt run_cmd(f"make NVCC_GENCODE='{arch_flag} --cudart=shared -ccbin=\"{cc_path}\" ' nvcc_path='{nvcc_path}'", cwd=dirname) File "/usr/local/lib/python3.8/dist-packages/jittor_utils/init.py", line 143, in run_cmd raise Exception(err_msg) Exception: Run cmd failed: make NVCC_GENCODE=' -arch=compute_86 -code=sm_86 --cudart=shared -ccbin="g++" ' nvcc_path='/usr/bin/nvcc'

Jittor commented 3 years ago

您的cuda版本低了,可能需要安装 11.3以上,不过这个错误可以绕过去,您试试使用环境变量export cuda_archs=80或者export cuda_archs=70, 然后重新运行试试?

---原始邮件--- 发件人: @.> 发送时间: 2021年7月24日(周六) 中午1:44 收件人: @.>; 抄送: @.***>; 主题: [Jittor/jittor] 运行python3.7 -m jittor.test.test_example出错 (#252)

Describe the bug

我在ubuntu20.04环境下已经配好了所有的环境,按照教程走的时候在最后测试的时候出现错误, 我使用的编译器是g++,python是3.8,显卡驱动包括CUDA都已经安装。 我也尝试过clang++来进行上述操作,但也出现了bug,这里就暂时不贴了。 似乎在日志中定位到了一个地方, nvcc fatal : Value 'compute_86' is not defined for option 'gpu-architecture' 但我不太理解具体的意思。 请帮帮我,感谢。

Full Log

@.:~$ python3 -m jittor.test.test_example [i 0724 13:34:31.119655 92 compiler.py:869] Jittor(1.2.3.79) src: /usr/local/lib/python3.8/dist-packages/jittor [i 0724 13:34:31.121917 92 compiler.py:870] g++ at g++(9.3.0) [i 0724 13:34:31.121984 92 compiler.py:871] cache_path: /home/jasonbus/.cache/jittor/default/g++ [i 0724 13:34:31.126270 92 init.py:286] Found nvcc(10.1.243) at /usr/bin/nvcc. [i 0724 13:34:31.175024 92 init.py:286] Found gdb(9.2) at /usr/bin/gdb. [i 0724 13:34:31.178286 92 init.py:286] Found addr2line(2.34) at /usr/bin/addr2line. [i 0724 13:34:31.193114 92 compiler.py:958] py_include: -I/usr/include/python3.8 -I/usr/include/python3.8 [i 0724 13:34:31.202042 92 compiler.py:960] extension_suffix: .cpython-38-x86_64-linux-gnu.so [i 0724 13:34:31.310115 92 compiler.py:1098] OS type:ubuntu OS key:ubuntu [i 0724 13:34:31.310636 92 init.py:178] Total mem: 15.57GB, using 5 procs for compiling. [i 0724 13:34:31.487350 92 jit_compiler.cc:22] Load cc_path: g++ [i 0724 13:34:31.487579 92 init.cc:55] Found cuda archs: [86,] [i 0724 13:34:31.541550 92 compile_extern.py:444] mpicc not found, distribution disabled. [i 0724 13:34:31.546603 92 compile_extern.py:270] Downloading cutt... [i 0724 13:34:31.553902 92 compile_extern.py:283] installing cutt... mkdir -p build g++ -fPIC -c -I /usr/include -std=c++11 -O3 -march=native -o build/cutt.o src/cutt.cpp echo -e 'build/\c' > build/cutt.d g++ -fPIC -M -I /usr/include -std=c++11 -O3 -march=native src/cutt.cpp >> build/cutt.d g++ -fPIC -c -I /usr/include -std=c++11 -O3 -march=native -o build/cuttplan.o src/cuttplan.cpp src/cuttplan.cpp: In function ‘bool operator==(const TensorSplit&, const TensorSplit&)’: src/cuttplan.cpp:332:1: warning: control reaches end of non-void function [-Wreturn-type] 332 | } | ^ echo -e 'build/\c' > build/cuttplan.d g++ -fPIC -M -I /usr/include -std=c++11 -O3 -march=native src/cuttplan.cpp >> build/cuttplan.d /usr/bin/nvcc -Xcompiler -fPIC -c -I /usr/include -std=c++11 -O3 -Xptxas -dlcm=ca -lineinfo -arch=compute_86 -code=sm_86 --cudart=shared -ccbin="g++" --resource-usage -Xcompiler "" -D_FORCE_INLINES -o build/cuttkernel.o src/cuttkernel.cu nvcc fatal : Value 'compute_86' is not defined for option 'gpu-architecture' make: [Makefile:154:build/cuttkernel.o] 错误 1 Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details import(pkg_name) File "/usr/local/lib/python3.8/dist-packages/jittor/init.py", line 25, in from . import compile_extern File "/usr/local/lib/python3.8/dist-packages/jittor/compile_extern.py", line 502, in setup_cutt() File "/usr/local/lib/python3.8/dist-packages/jittor/compile_extern.py", line 309, in setup_cutt install_cutt(cutt_path) File "/usr/local/lib/python3.8/dist-packages/jittor/compile_extern.py", line 288, in install_cutt run_cmd(f"make NVCC_GENCODE='{arch_flag} --cudart=shared -ccbin="{cc_path}" ' nvcc_path='{nvcc_path}'", cwd=dirname) File "/usr/local/lib/python3.8/dist-packages/jittor_utils/init.py", line 143, in run_cmd raise Exception(err_msg) Exception: Run cmd failed: make NVCC_GENCODE=' -arch=compute_86 -code=sm_86 --cudart=shared -ccbin="g++" ' nvcc_path='/usr/bin/nvcc'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Boring545 commented 3 years ago

谢谢您,已经解决了,第一次用linux还不太熟悉

Jittor commented 3 years ago

不用客气,有问题随时联系😁

---原始邮件--- 发件人: @.> 发送时间: 2021年7月24日(周六) 中午1:58 收件人: @.>; 抄送: @.**@.>; 主题: Re: [Jittor/jittor] 运行python3.7 -m jittor.test.test_example出错 (#252)

谢谢您,已经解决了,第一次用linux还不太熟悉

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.