Dav
1
linux系统,安装计图后直接运行python文件中import jittor不产生报错,但是在jupyter notebook中运行时产生报错如下:
[i 1012 20:51:20.167353 60 __init__.py:411] Found addr2line(2.38) at /usr/bin/addr2line.
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Input In [5], in <cell line: 1>()
----> 1 import jittor as jt
File ~/anaconda3/lib/python3.9/site-packages/jittor/__init__.py:18, in <module>
16 ori_float = float
17 ori_bool = bool
---> 18 from . import compiler
19 from .compiler import LOG, has_cuda
20 from .compiler import compile_custom_ops, compile_custom_op
File ~/anaconda3/lib/python3.9/site-packages/jittor/compiler.py:1180, in <module>
1178 cc_flags += f" -I\"{os.path.join(jittor_path, 'src')}\" "
1179 cc_flags += py_include
-> 1180 check_cache_compile()
1181 LOG.v(f"Get cache_compile: {jit_utils.cc}")
1183 # check cuda
File ~/anaconda3/lib/python3.9/site-packages/jittor/compiler.py:891, in check_cache_compile()
889 with jit_utils.import_scope(import_flags):
890 jit_utils.try_import_jit_utils_core()
--> 891 assert jit_utils.cc
892 # recompile, generate cache key
893 compile(cc_path, cc_flags+f" {opt_flags} ", files, jit_utils.cache_path+'/jit_utils_core'+extension_suffix, True)
AssertionError:
Dav
4
运行import jittor
结果如下:
[i 1012 21:48:34.224540 20 compiler.py:955] Jittor(1.3.5.19) src: /home/david/anaconda3/lib/python3.9/site-packages/jittor
[i 1012 21:48:34.230749 20 compiler.py:956] g++ at /usr/bin/g++(11.2.0)
[i 1012 21:48:34.231124 20 compiler.py:957] cache_path: /home/david/.cache/jittor/jt1.3.5/g++11.2.0/py3.9.12/Linux-5.15.0-4x4c/IntelRCoreTMi7x12/default
[i 1012 21:48:34.388479 20 __init__.py:411] Found gdb(12.0.90) at /usr/bin/gdb.
[i 1012 21:48:34.395491 20 __init__.py:411] Found addr2line(2.38) at /usr/bin/addr2line.
AssertionError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import jittor
File ~/anaconda3/lib/python3.9/site-packages/jittor/init.py:18, in
16 ori_float = float
17 ori_bool = bool
—> 18 from . import compiler
19 from .compiler import LOG, has_cuda
20 from .compiler import compile_custom_ops, compile_custom_op
File ~/anaconda3/lib/python3.9/site-packages/jittor/compiler.py:1180, in
1178 cc_flags += f" -I"{os.path.join(jittor_path, ‘src’)}" "
1179 cc_flags += py_include
→ 1180 check_cache_compile()
1181 LOG.v(f"Get cache_compile: {jit_utils.cc}")
1183 # check cuda
File ~/anaconda3/lib/python3.9/site-packages/jittor/compiler.py:891, in check_cache_compile()
889 with jit_utils.import_scope(import_flags):
890 jit_utils.try_import_jit_utils_core()
→ 891 assert jit_utils.cc
892 # recompile, generate cache key
893 compile(cc_path, cc_flags+f" {opt_flags} ", files, jit_utils.cache_path+‘/jit_utils_core’+extension_suffix, True)
AssertionError:
cjld
5
删除cache:rm ~/.cache/jittor
, 然后更新jittor:python3.x -m pip install jittor -U
在是一下?
如果还是不行,可以设置环境变export log_v=10
, 然后把更丰富的报错信息提供给我们
Dav
6
再次安装后运行python3.7 -m jittor.test.test_example产生报错如下:
python3.9 -m jittor.test.test_example
[i 1012 22:53:49.090908 00 compiler.py:955] Jittor(1.3.5.19) src: /home/david/anaconda3/lib/python3.9/site-packages/jittor
[i 1012 22:53:49.095559 00 compiler.py:956] g++ at /usr/bin/g++(11.2.0)
[i 1012 22:53:49.095711 00 compiler.py:957] cache_path: /home/david/.cache/jittor/jt1.3.5/g++11.2.0/py3.9.12/Linux-5.15.0-4x4c/IntelRCoreTMi7x12/default
[i 1012 22:53:50.167318 00 __init__.py:411] Found gdb(12.0.90) at /usr/bin/gdb.
[i 1012 22:53:50.228776 00 __init__.py:411] Found addr2line(2.38) at /usr/bin/addr2line.
Traceback (most recent call last):
File “/home/david/anaconda3/lib/python3.9/runpy.py”, line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/home/david/anaconda3/lib/python3.9/runpy.py”, line 111, in _get_module_details
import(pkg_name)
File “/home/david/anaconda3/lib/python3.9/site-packages/jittor/init.py”, line 18, in
from . import compiler
File “/home/david/anaconda3/lib/python3.9/site-packages/jittor/compiler.py”, line 1180, in
check_cache_compile()
File “/home/david/anaconda3/lib/python3.9/site-packages/jittor/compiler.py”, line 891, in check_cache_compile
assert jit_utils.cc
AssertionError