官方代码demo2运行出错,Failed reason:[f 0607 18:22:10.963000 08 parallel_compiler.cc:329] Error happend during compilation
您好,在准备Jittor比赛的过程中,运行官方代码 https://github.com/Jittor/jrender 出错,我的环境是windows11,已经按照官网 https://cg.cs.tsinghua.edu.cn/jittor/download/ 的步骤安装好,运行以下测试命令均无出错:
python -m jittor.test.test_core
python -m jittor.test.test_example
python -m jittor.test.test_cudnn_op
我的conda环境如下:
(jittor) PS D:\Dreams\NKU\JGAN\competition\jrender> conda list
# packages in environment at D:\Softwares\Anaconda3\envs\jittor:
#
# Name Version Build Channel
absl-py 1.1.0 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
bzip2 1.0.8 h8ffe710_4 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
ca-certificates 2022.5.18.1 h5b45459_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
certifi 2022.5.18.1 py38haa95532_0 defaults
colorama 0.4.4 pypi_0 pypi
configargparse 1.3 pypi_0 pypi
cycler 0.11.0 pypi_0 pypi
grpcio 1.46.3 pypi_0 pypi
imageio 2.9.0 pypi_0 pypi
imageio-ffmpeg 0.4.3 pypi_0 pypi
importlib-metadata 4.11.4 pypi_0 pypi
jittor 1.3.4.14 pypi_0 pypi
kiwisolver 1.4.2 pypi_0 pypi
libffi 3.4.2 h8ffe710_5 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libzlib 1.2.12 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
markdown 3.3.7 pypi_0 pypi
matplotlib 3.3.0 pypi_0 pypi
networkx 2.8.3 pypi_0 pypi
numpy 1.22.4 pypi_0 pypi
opencv-python 4.2.0.34 pypi_0 pypi
openssl 3.0.3 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
packaging 21.3 pypi_0 pypi
pillow 9.1.1 pypi_0 pypi
pip 22.1.2 pyhd8ed1ab_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
protobuf 3.20.1 pypi_0 pypi
pyparsing 3.0.9 pypi_0 pypi
python 3.8.13 hcf16a7b_0_cpython http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
python-dateutil 2.8.2 pypi_0 pypi
pywavelets 1.3.0 pypi_0 pypi
pywin32 304 pypi_0 pypi
scikit-image 0.19.2 pypi_0 pypi
scipy 1.8.1 pypi_0 pypi
setuptools 61.2.0 py38haa95532_0 defaults
six 1.16.0 pypi_0 pypi
sqlite 3.38.5 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tensorboard 1.14.0 pypi_0 pypi
tensorboardx 2.5.1 pypi_0 pypi
tifffile 2022.5.4 pypi_0 pypi
tk 8.6.12 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tqdm 4.46.0 pypi_0 pypi
ucrt 10.0.20348.0 h57928b3_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
vc 14.2 hb210afc_6 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
vs2015_runtime 14.29.30037 h902a5da_6 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
werkzeug 2.1.2 pypi_0 pypi
wheel 0.37.1 pyhd8ed1ab_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
wincertstore 0.2 py38_1003 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xz 5.2.5 h62dcd97_1 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
zipp 3.8.0 pypi_0 pypi
我的cuda版本是:
(jittor) PS D:\Dreams\NKU\JGAN\competition\jrender> python -m jittor_utils.install_cuda
[i 0607 18:29:39.785743 28 install_cuda.py:53] cuda_driver_version: [11, 6, 0]
[i 0607 18:29:39.785743 28 install_cuda.py:121] nvcc is installed at C:\Users\Lucas\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe
在运行demo2和demo3的过程中都出现了类似的问题,貌似是因为nvcc编译这个文件出错了
fault\cu11.2.67\jit\code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc:
完整的调试输出如下:
(jittor) PS D:\Dreams\NKU\JGAN\competition\jrender> python .\demo2-deform.py
[i 0607 18:11:04.494000 36 compiler.py:953] Jittor(1.3.4.14) src: d:\softwares\anaconda3\envs\jittor\lib\site-packages\jittor
[i 0607 18:11:04.510000 36 compiler.py:954] cl at C:\Users\Lucas\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe(19.29.30133)
[i 0607 18:11:04.510000 36 compiler.py:955] cache_path: C:\Users\Lucas\.cache\jittor\jt1.3.4\cl\py3.8.13\Windows-10-10.xcb\AMDRyzen55600Gxe6\default
[i 0607 18:11:04.512000 36 install_cuda.py:53] cuda_driver_version: [11, 6, 0]
[i 0607 18:11:04.526000 36 __init__.py:411] Found C:\Users\Lucas\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe(11.2.67) at C:\Users\Lucas\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe.
[i 0607 18:11:04.555000 36 compiler.py:1008] cuda key:cu11.2.67
[i 0607 18:11:04.556000 36 __init__.py:227] Total mem: 15.80GB, using 5 procs for compiling.
[i 0607 18:11:05.125000 36 jit_compiler.cc:28] Load cc_path: C:\Users\Lucas\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe
[i 0607 18:11:05.126000 36 init.cc:62] Found cuda archs: [75,]
[i 0607 18:11:05.226000 36 compile_extern.py:516] mpicc not found, distribution disabled.
[w 0607 18:21:30.347000 08 compile_extern.py:200] CUDA related path found in LD_LIBRARY_PATH or PATH([.....]), This path may cause jittor found the wrong libs, please unset LD_LIBRARY_PATH and remove cuda lib path in Path.
[i 0607 18:21:31.419000 08 cuda_flags.cc:32] CUDA enabled.
D:\Dreams\NKU\JGAN\competition\jrender\data\obj/sphere/sphere_1352.obj
Loss: 0.8434: 0%|▏ | 1/1000 [00:00<14:23, 1.16it/s][e 0607 18:22:10.962000 08 log.cc:565] cl : Command line warning D9025 : overriding '/EHa' with '/EHs'
code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc
cl : Command line warning D9025 : overriding '/EHa' with '/EHs'
code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc
C:/Users/Lucas/.cache/jittor/jt1.3.4/cl/py3.8.13/Windows-10-10.xcb/AMDRyzen55600Gxe6/default/cu11.2.67/jit/code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc(162): error: function "atomicAdd(double *, double)" has already been defined
1 error detected in the compilation of "C:/Users/Lucas/.cache/jittor/jt1.3.4/cl/py3.8.13/Windows-10-10.xcb/AMDRyzen55600Gxe6/default/cu11.2.67/jit/code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc".
code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc
Loss: 0.8434: 0%|▏ | 1/1000 [00:03<55:58, 3.36s/it]
Traceback (most recent call last):
File ".\demo2-deform.py", line 112, in <module>
main()
File ".\demo2-deform.py", line 97, in main
loop.set_description('Loss: %.4f' % (loss.item()))
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.item)).
Types of your inputs are:
self = Var,
args = (),
The function declarations are:
ItemData item()
Failed reason:[f 0607 18:22:10.963000 08 parallel_compiler.cc:329] Error happend during compilation:
[Error] source file location:C:\Users\Lucas\.cache\jittor\jt1.3.4\cl\py3.8.13\Windows-10-10.xcb\AMDRyzen55600Gxe6\default\cu11.2.67\jit\code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc
Compile operator(11/52)failed:Op(1959:0:2:2:i6:o2:s0,code->...)
Reason: [f 0607 18:22:10.962000 08 log.cc:608] Check failed ret(2) == 0(0) Run cmd failed: "C:\Users\Lucas\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe" "C:\Users\Lucas\.cache\jittor\jt1.3.4\cl\py3.8.13\Windows-10-10.xcb\AMDRyzen55600Gxe6\de
fault\cu11.2.67\jit\code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.cc" -shared -L"d:\softwares\anaconda3\envs\jittor\libs" -lpython38 -Xcompiler -EHa -Xcompiler -MD -
Xcompiler -utf-8 -I"C:\Users\Lucas\.cache\jittor\msvc\VC\include" -I"C:\Users\Lucas\.cache\jittor\msvc\win10_kits\include\ucrt" -I"C:\Users\Lucas\.cache\jittor\msvc\win10_kits\include\shared" -I"C:\Users\Lucas\.cache\jittor\msvc\win10_kits\include\
um" -DNOMINMAX -L"C:\Users\Lucas\.cache\jittor\msvc\VC\lib" -L"C:\Users\Lucas\.cache\jittor\msvc\win10_kits\lib\um\x64" -L"C:\Users\Lucas\.cache\jittor\msvc\win10_kits\lib\ucrt\x64" -I"d:\softwares\anaconda3\envs\jittor\lib\site-packages\jittor\src
" -I"d:\softwares\anaconda3\envs\jittor\include" -DHAS_CUDA -DIS_CUDA -I"C:\Users\Lucas\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\include" -I"d:\softwares\anaconda3\envs\jittor\lib\site-packages\jittor\extern\cuda\inc" -lcudart -L"C:\Users\Lucas\.cac
he\jittor\jtcuda\cuda11.2_cudnn8_win\lib\x64" -L"C:\Users\Lucas\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin" -I"C:\Users\Lucas\.cache\jittor\jt1.3.4\cl\py3.8.13\Windows-10-10.xcb\AMDRyzen55600Gxe6\default\cu11.2.67" -L"C:\Users\Lucas\.cache\jittor\
jt1.3.4\cl\py3.8.13\Windows-10-10.xcb\AMDRyzen55600Gxe6\default\cu11.2.67" -L"C:\Users\Lucas\.cache\jittor\jt1.3.4\cl\py3.8.13\Windows-10-10.xcb\AMDRyzen55600Gxe6\default" -l"jit_utils_core.cp38-win_amd64" -l"jittor_core.cp38-win_amd64" -x cu --cu
dart=shared -ccbin="C:\Users\Lucas\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe" --use_fast_math -w -I"d:\softwares\anaconda3\envs\jittor\lib\site-packages\jittor\extern/cuda/inc" -arch=compute_75 -code=sm_75 -o "C:\Users\Lucas\.cache\jittor\jt1.3.4\cl\py3.8.13\Windows-10-10.xcb\AMDRyzen55600Gxe6\default\cu11.2.67\jit\code__IN_SIZE_6__in0_dim_4__in0_type_float32__in1_dim_6__in1_type_float32__in2_dim_4__in2____hash_4cc0509b6d68fa54_op.dll" -Xlinker -EXPORT:"?jit_run@CodeOp@jittor@@QEAAXXZ"
希望能得到您们的解答。
现在jittor的网上bug解决方法还不多,这个感觉是jittor的生态还没很好建立起来。佩服你们的付出,一起推动国产深度框架的发展吧。
我也遇到了同样的问题
loss_item = loss.item() RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.item)).
Types of your inputs are: self = Var, args = (),
The function declarations are: ItemData item()
Failed reason:[f 1101 14:15:13.090000 16 parallel_compiler.cc:331] Error happend during compilation: [Error] source file location:C:\Users\dsc17.cache\jittor\jt1.3.8\cl\py3.8.18\Windows-10-10.xd6\13thGenIntelRCxf6\default\cu11.2.67\jit\cub_arg_reduce__Tx_float32__Toffsets_int32__FUNC_ArgMax__JIT_1__JIT_cuda_1__index_t_int32_hash_185c6e55f8d31f3f_op.cc Compile operator(16/66)failed:Op(14284:0:2:2:i2:o2:s0,cub_arg_reduce->...)
Reason: [f 1101 14:15:13.087000 16 log.cc:608] Check failed ret(1) == 0(0) Run cmd failed: "C:\Users\dsc17.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe" "C:\Users\dsc17.cache\jittor\jt1.3.8\cl\py3.8.18\Windows-10-10.xd6\13thGenIntelRCxf6\default\cu11.2.67\jit\cub_arg_reduce__Tx_float32__Toffsets_int32__FUNC_ArgMax__JIT_1__JIT_cuda_1__index_t_int32_hash_185c6e55f8d31f3f_op.cc" -shared -L"c:\c\anaconda\envs\pmp\libs" -lpython38 -Xcompiler -EHa -Xcompiler -MD -Xcompiler -utf-8 -I"C:\Users\dsc17.cache\jittor\msvc\VC\include" -I"C:\Users\dsc17.cache\jittor\msvc\win10_kits\include\ucrt" -I"C:\Users\dsc17.cache\jittor\msvc\win10_kits\include\shared" -I"C:\Users\dsc17.cache\jittor\msvc\win10_kits\include\um" -DNOMINMAX -L"C:\Users\dsc17.cache\jittor\msvc\VC\lib" -L"C:\Users\dsc17.cache\jittor\msvc\win10_kits\lib\um\x64" -L"C:\Users\dsc17.cache\jittor\msvc\win10_kits\lib\ucrt\x64" -I"c:\c\anaconda\envs\pmp\lib\site-packages\jittor\src" -I"c:\c\anaconda\envs\pmp\include" -DHAS_CUDA -DIS_CUDA -I"C:\Users\dsc17.cache\jittor\jtcuda\cuda11.2_cudnn8_win\include" -I"c:\c\anaconda\envs\pmp\lib\site-packages\jittor\extern\cuda\inc" -lcudart -L"C:\Users\dsc17.cache\jittor\jtcuda\cuda11.2_cudnn8_win\lib\x64" -L"C:\Users\dsc17.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin" -I"C:\Users\dsc17.cache\jittor\jt1.3.8\cl\py3.8.18\Windows-10-10.xd6\13thGenIntelRCxf6\default\cu11.2.67" -L"C:\Users\dsc17.cache\jittor\jt1.3.8\cl\py3.8.18\Windows-10-10.xd6\13thGenIntelRCxf6\default\cu11.2.67" -L"C:\Users\dsc17.cache\jittor\jt1.3.8\cl\py3.8.18\Windows-10-10.xd6\13thGenIntelRCxf6\default" -l"jit_utils_core.cp38-win_amd64" -l"jittor_core.cp38-win_amd64" -x cu --cudart=shared -ccbin="C:\Users\dsc17.cache\jittor\msvc\VC_____\bin\cl.exe" --use_fast_math -w -I"c:\c\anaconda\envs\pmp\lib\site-packages\jittor\extern/cuda/inc" -arch=compute_86 -code=sm_86 -I"C:\C\anaconda\envs\PMP\Lib\site-packages\jittor\extern\cuda\cub\inc" -I"C:\C\anaconda\envs\PMP\Lib\site-packages\jittor\extern\cuda\cub\ops" -I"c:\c\anaconda\envs\pmp\lib\site-packages\jittor\extern\cuda\inc" -I"c:\c\anaconda\envs\pmp\lib\site-packages\jittor\extern\cuda\cub\inc" -L"C:\Users\dsc17.cache\jittor\jt1.3.8\cl\py3.8.18\Windows-10-10.xd6\13thGenIntelRCxf6\default\cu11.2.67\custom_ops" -l"gen_ops_cub_argsort_cub_arg_reduce_cub_cumsum_cub____hash7542fc.cp38-win_amd64" -o "C:\Users\dsc17.cache\jittor\jt1.3.8\cl\py3.8.18\Windows-10-10.xd6\13thGenIntelRCxf6\default\cu11.2.67\jit\cub_arg_reduce__Tx_float32__Toffsets_int32__FUNC_ArgMax__JIT_1__JIT_cuda_1__index_t_int32_hash_185c6e55f8d31f3f_op.dll" -Xlinker -EXPORT:"?jit_run@CubArgReduceOp@jittor@@QEAAXXZ"
请问您解决了这个问题了吗? 可以帮帮我吗?
抱歉回复晚了。
时间过去了挺久,我看着这些记录,我记不得具体怎么解决了。但是我可以给您一个可以在 windows 11 下已经解决好的环境:
>>> conda list
# Name Version Build Channel
absl-py 1.1.0 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
bzip2 1.0.8 h8ffe710_4 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
ca-certificates 2022.6.15 h5b45459_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
certifi 2022.6.15 py38haa244fe_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
colorama 0.4.4 pypi_0 pypi
configargparse 1.3 pypi_0 pypi
cudatoolkit 11.6.0 hc0ea762_10 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
cupy 10.5.0 py38hf95616d_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
cycler 0.11.0 pypi_0 pypi
fastrlock 0.8 pypi_0 pypi
grpcio 1.46.3 pypi_0 pypi
imageio 2.9.0 pypi_0 pypi
imageio-ffmpeg 0.4.3 pypi_0 pypi
importlib-metadata 4.11.4 pypi_0 pypi
intel-openmp 2022.1.0 h57928b3_3787 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
jittor 1.3.4.15 pypi_0 pypi
kiwisolver 1.4.2 pypi_0 pypi
libblas 3.9.0 15_win64_mkl http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libcblas 3.9.0 15_win64_mkl http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libffi 3.4.2 h8ffe710_5 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
liblapack 3.9.0 15_win64_mkl http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libzlib 1.2.12 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
markdown 3.3.7 pypi_0 pypi
matplotlib 3.3.0 pypi_0 pypi
mkl 2022.1.0 h6a75c08_874 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
networkx 2.8.3 pypi_0 pypi
numpy 1.22.4 pypi_0 pypi
opencv-python 4.2.0.34 pypi_0 pypi
openssl 3.0.4 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
packaging 21.3 pypi_0 pypi
pillow 9.1.1 pypi_0 pypi
pip 22.1.2 pyhd8ed1ab_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
protobuf 3.20.1 pypi_0 pypi
pyparsing 3.0.9 pypi_0 pypi
python 3.8.13 hcf16a7b_0_cpython http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.8 2_cp38 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
pywavelets 1.3.0 pypi_0 pypi
pywin32 304 pypi_0 pypi
scikit-image 0.19.2 pypi_0 pypi
scipy 1.8.1 pypi_0 pypi
setuptools 61.2.0 py38haa95532_0 defaults
six 1.16.0 pypi_0 pypi
sqlite 3.38.5 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tbb 2021.5.0 h2d74725_1 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tensorboard 1.14.0 pypi_0 pypi
tensorboardx 2.5.1 pypi_0 pypi
tifffile 2022.5.4 pypi_0 pypi
tk 8.6.12 h8ffe710_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tqdm 4.46.0 pypi_0 pypi
ucrt 10.0.20348.0 h57928b3_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
vc 14.2 hb210afc_6 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
vs2015_runtime 14.29.30037 h902a5da_6 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
werkzeug 2.1.2 pypi_0 pypi
wheel 0.37.1 pyhd8ed1ab_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
wincertstore 0.2 py38_1003 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xz 5.2.5 h62dcd97_1 http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
zipp 3.8.0 pypi_0 pypi
总之,我一开始没有按照官方教程安装的,所以会有很多问题。建议您用官方的方法进行安装:jittor download