RTX4090报错,cuda12兼容性问题

我使用intel core i7-13700K,RTX4090。我在windows11下使用jittor会识别gpu并下载cuda11.2包,但使用cpu运算,ubuntu22.04下同样识别gpu并下载cuda11.2包,但报错。

RTX4090原生支持cuda12,且旧版本nvcc可能不兼容新架构的编译,此前编译时遇到过此类问题。可能是这个原因吗,或者是由于其他可能的操作配置问题。

临时更换RTX2080ti可以运行。但我希望尝试使用4090的设备。

ubuntu22.04记录:

[i 0408 18:28:02.514394 08 compiler.py:955] Jittor(1.3.7.12) src: /home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor
[i 0408 18:28:02.515433 08 compiler.py:956] g++ at /usr/bin/g++(11.3.0)
[i 0408 18:28:02.515458 08 compiler.py:957] cache_path: /home/loping151/.cache/jittor/jt1.3.7/g++11.3.0/py3.9.16/Linux-5.15.0-5x44/13thGenIntelRCx2d/default
[i 0408 18:28:02.526062 08 install_cuda.py:93] cuda_driver_version: [12, 0]
[i 0408 18:28:02.527497 08 __init__.py:411] Found /home/loping151/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc(11.2.152) at /home/loping151/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc.
[i 0408 18:28:02.548540 08 __init__.py:411] Found gdb(12.1) at /usr/bin/gdb.
[i 0408 18:28:02.549770 08 __init__.py:411] Found addr2line(2.38) at /usr/bin/addr2line.
[i 0408 18:28:02.607237 08 compiler.py:1010] cuda key:cu11.2.152_sm_89
[i 0408 18:28:02.671440 08 __init__.py:227] Total mem: 62.59GB, using 16 procs for compiling.
/usr/include/stdio.h(189): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(201): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(223): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(260): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(285): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(294): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(303): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(309): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(315): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(830): error: attribute "__malloc__" does not take arguments

/usr/include/stdlib.h(566): error: attribute "__malloc__" does not take arguments

/usr/include/stdlib.h(570): error: attribute "__malloc__" does not take arguments

/usr/include/stdlib.h(799): error: attribute "__malloc__" does not take arguments

/usr/include/c++/11/type_traits(1406): error: type name is not allowed

/usr/include/c++/11/type_traits(1406): error: type name is not allowed

/usr/include/c++/11/type_traits(1406): error: identifier "__is_same" is undefined

/usr/include/wchar.h(155): error: attribute "__malloc__" does not take arguments

/usr/include/wchar.h(582): error: attribute "__malloc__" does not take arguments

/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/src/misc/cstr.h(19): error: no instance of overloaded function "std::unique_ptr<_Tp [], _Dp>::reset [with _Tp=char, _Dp=std::default_delete<char []>]" matches the argument list
            argument types are: (char *)
            object type is: jittor::unique_ptr<char []>

/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/src/misc/cstr.h(25): error: no instance of overloaded function "std::unique_ptr<_Tp [], _Dp>::reset [with _Tp=char, _Dp=std::default_delete<char []>]" matches the argument list
            argument types are: (char *)
            object type is: jittor::unique_ptr<char []>

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long, std::is_same<int, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long, _Ret=int, _CharT=char, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6620): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long, std::is_same<long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long, _Ret=long, _CharT=char, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6625): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const unsigned long, std::is_same<unsigned long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=unsigned long, _Ret=unsigned long, _CharT=char, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6630): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long long, std::is_same<long long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long long, _Ret=long long, _CharT=char, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6635): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const unsigned long long, std::is_same<unsigned long long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=unsigned long long, _Ret=unsigned long long, _CharT=char, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6640): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const float, std::is_same<float, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=float, _Ret=float, _CharT=char, _Base=<>]" 
/usr/include/c++/11/bits/basic_string.h(6646): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const double, std::is_same<double, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=double, _Ret=double, _CharT=char, _Base=<>]" 
/usr/include/c++/11/bits/basic_string.h(6650): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long double, std::is_same<long double, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long double, _Ret=long double, _CharT=char, _Base=<>]" 
/usr/include/c++/11/bits/basic_string.h(6654): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long, std::is_same<int, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long, _Ret=int, _CharT=wchar_t, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6751): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long, std::is_same<long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long, _Ret=long, _CharT=wchar_t, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6756): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const unsigned long, std::is_same<unsigned long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=unsigned long, _Ret=unsigned long, _CharT=wchar_t, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6761): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long long, std::is_same<long long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long long, _Ret=long long, _CharT=wchar_t, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6766): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const unsigned long long, std::is_same<unsigned long long, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=unsigned long long, _Ret=unsigned long long, _CharT=wchar_t, _Base=<int>]" 
/usr/include/c++/11/bits/basic_string.h(6771): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const float, std::is_same<float, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=float, _Ret=float, _CharT=wchar_t, _Base=<>]" 
/usr/include/c++/11/bits/basic_string.h(6777): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const double, std::is_same<double, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=double, _Ret=double, _CharT=wchar_t, _Base=<>]" 
/usr/include/c++/11/bits/basic_string.h(6781): here

/usr/include/c++/11/ext/string_conversions.h(85): error: no instance of overloaded function "_Range_chk::_S_chk" matches the argument list
            argument types are: (const long double, std::is_same<long double, int>)
          detected during instantiation of "_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT *, _CharT **, _Base...), const char *, const _CharT *, std::size_t *, _Base...) [with _TRet=long double, _Ret=long double, _CharT=wchar_t, _Base=<>]" 
/usr/include/c++/11/bits/basic_string.h(6785): here

36 errors detected in the compilation of "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/src/misc/nan_checker.cu".
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/loping151/.conda/envs/dl2023/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor_utils/__init__.py", line 197, in do_compile
    return cc.cache_compile(cmd, cache_path, jittor_path)
RuntimeError: [f 0408 18:28:03.202718 08 log.cc:608] Check failed ret(256) == 0(0) Run cmd failed: "/home/loping151/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc"  "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/src/misc/nan_checker.cu"     -std=c++14 -Xcompiler -fPIC  -Xcompiler -march=native  -Xcompiler -fdiagnostics-color=always   -I"/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/src" -I/home/loping151/.conda/envs/dl2023/include/python3.9 -I/home/loping151/.conda/envs/dl2023/include/python3.9 -DHAS_CUDA -DIS_CUDA -I"/home/loping151/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/include" -I"/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/extern/cuda/inc"   -I"/home/loping151/.cache/jittor/jt1.3.7/g++11.3.0/py3.9.16/Linux-5.15.0-5x44/13thGenIntelRCx2d/default/cu11.2.152_sm_89"   -O2   -c -o "/home/loping151/.cache/jittor/jt1.3.7/g++11.3.0/py3.9.16/Linux-5.15.0-5x44/13thGenIntelRCx2d/default/cu11.2.152_sm_89/obj_files/nan_checker.cu.o" -x cu --cudart=shared -ccbin="/usr/bin/g++"   -w  -I"/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/extern/cuda/inc" 
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/loping151/Documents/dl2023/main.py", line 1, in <module>
    import jittor as jt
  File "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/__init__.py", line 18, in <module>
    from . import compiler
  File "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/compiler.py", line 1353, in <module>
    compile(cc_path, cc_flags+opt_flags, files, 'jittor_core'+extension_suffix)
  File "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/compiler.py", line 151, in compile
    jit_utils.run_cmds(cmds, cache_path, jittor_path, "Compiling "+base_output)
  File "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor_utils/__init__.py", line 251, in run_cmds
    for i,_ in enumerate(p.imap_unordered(do_compile, cmds)):
  File "/home/loping151/.conda/envs/dl2023/lib/python3.9/multiprocessing/pool.py", line 870, in next
    raise value
RuntimeError: [f 0408 18:28:03.202718 08 log.cc:608] Check failed ret(256) == 0(0) Run cmd failed: "/home/loping151/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc"  "/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/src/misc/nan_checker.cu"     -std=c++14 -Xcompiler -fPIC  -Xcompiler -march=native  -Xcompiler -fdiagnostics-color=always   -I"/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/src" -I/home/loping151/.conda/envs/dl2023/include/python3.9 -I/home/loping151/.conda/envs/dl2023/include/python3.9 -DHAS_CUDA -DIS_CUDA -I"/home/loping151/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/include" -I"/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/extern/cuda/inc"   -I"/home/loping151/.cache/jittor/jt1.3.7/g++11.3.0/py3.9.16/Linux-5.15.0-5x44/13thGenIntelRCx2d/default/cu11.2.152_sm_89"   -O2   -c -o "/home/loping151/.cache/jittor/jt1.3.7/g++11.3.0/py3.9.16/Linux-5.15.0-5x44/13thGenIntelRCx2d/default/cu11.2.152_sm_89/obj_files/nan_checker.cu.o" -x cu --cudart=shared -ccbin="/usr/bin/g++"   -w  -I"/home/loping151/.conda/envs/dl2023/lib/python3.9/site-packages/jittor/extern/cuda/inc" 

进程已结束,退出代码1

我切换了系统。这是win11下的log

[i 0408 10:41:30.568000 04 compiler.py:955] Jittor(1.3.7.12) src: c:\users\wangk\.conda\envs\dl2023\lib\site-packages\jittor
[i 0408 10:41:30.592000 04 compiler.py:956] cl at C:\Users\wangk\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe(19.29.30133)
[i 0408 10:41:30.593000 04 compiler.py:957] cache_path: C:\Users\wangk\.cache\jittor\jt1.3.7\cl\py3.9.16\Windows-10-10.x0b\13thGenIntelRCx2d\default
[i 0408 10:41:30.611000 04 install_cuda.py:93] cuda_driver_version: [12, 0, 0]
[i 0408 10:41:30.659000 04 __init__.py:411] Found C:\Users\wangk\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe(11.2.67) at C:\Users\wangk\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe.
[i 0408 10:41:31.129000 04 __init__.py:411] Found gdb(7.6.1) at C:\Programs\MinGW\bin\gdb.EXE.
[i 0408 10:41:31.168000 04 __init__.py:411] Found addr2line(2.32) at C:\Programs\MinGW\bin\addr2line.EXE.
[i 0408 10:41:31.191000 04 compiler.py:1010] cuda key:cu11.2.67
[i 0408 10:41:31.192000 04 __init__.py:227] Total mem: 63.79GB, using 16 procs for compiling.
[i 0408 10:41:32.546000 04 jit_compiler.cc:28] Load cc_path: C:\Users\wangk\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe
[i 0408 10:41:32.561000 04 init.cc:62] Found cuda archs: [89,]
[w 0408 10:41:32.803000 04 compiler.py:1381] CUDA arch(89)>86 will be backward-compatible
[i 0408 10:41:32.819000 04 compile_extern.py:522] mpicc not found, distribution disabled.
[w 0408 10:41:32.926000 04 compile_extern.py:203] CUDA related path found in LD_LIBRARY_PATH or PATH(['', 'C', '\\Users\\wangk\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\bin', '', 'C', '\\Users\\wangk\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\lib', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jt1.3.7\\cl\\py3.9.16\\Windows-10-10.x0b\\13thGenIntelRCx2d\\default', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jt1.3.7\\cl\\py3.9.16\\Windows-10-10.x0b\\13thGenIntelRCx2d\\default\\cu11.2.67', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\bin', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib\\x64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\win10_kits\\lib\\ucrt\\x64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\win10_kits\\lib\\um\\x64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\VC\\lib', '', 'c', '\\users\\wangk\\.conda\\envs\\dl2023\\libs', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\VC\\_\\_\\_\\_\\_\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Library\\mingw-w64\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Library\\usr\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Library\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Scripts', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\bin', 'C', '\\Programs\\Anaconda3\\condabin', 'C', '\\Program Files\\Microsoft MPI\\Bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\libnvvp', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\libnvvp', 'C', '\\Windows\\system32', 'C', '\\Windows', 'C', '\\Windows\\System32\\Wbem', 'C', '\\Windows\\System32\\WindowsPowerShell\\v1.0', 'C', '\\Windows\\System32\\OpenSSH', 'C', '\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common', 'C', '\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR', 'C', '\\Program Files\\MATLAB\\R2022b\\bin', 'C', '\\Program Files\\dotnet', 'C', '\\Program Files\\NVIDIA Corporation\\Nsight Compute 2019.5.0', 'C', '\\Program Files\\Git\\cmd', 'C', '\\Programs\\Microsoft VS Code\\bin', 'C', '\\Users\\wangk\\AppData\\Local\\JetBrains\\Toolbox\\scripts', 'C', '\\Programs\\Anaconda3', 'C', '\\Programs\\Anaconda3\\Scripts', 'C', '\\Programs\\Anaconda3\\Library\\mingw-w64\\bin', 'C', '\\Programs\\Anaconda3\\Library\\bin', 'C', '\\Programs\\Anaconda3\\Library\\usr\\bin', 'C', '\\Programs\\texlive\\2022\\bin\\win32', 'C', '\\Users\\wangk\\AppData\\Local\\Microsoft\\WindowsApps', 'C', '\\Users\\wangk\\AppData\\Local\\Pandoc', 'C', '\\Programs\\MinGW\\bin', 'C', '\\Program Files\\Git\\bin', 'C', '\\Program Files (x86)\\Nmap']), This path may cause jittor found the wrong libs, please unset LD_LIBRARY_PATH and remove cuda lib path in Path. 
Or you can let jittor install cuda for you: `python3.x -m jittor_utils.install_cuda`
[w 0408 10:41:32.926000 04 compile_extern.py:203] CUDA related path found in LD_LIBRARY_PATH or PATH(['', 'C', '\\Users\\wangk\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\bin', '', 'C', '\\Users\\wangk\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\lib', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jt1.3.7\\cl\\py3.9.16\\Windows-10-10.x0b\\13thGenIntelRCx2d\\default', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jt1.3.7\\cl\\py3.9.16\\Windows-10-10.x0b\\13thGenIntelRCx2d\\default\\cu11.2.67', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\bin', '', 'C', '\\Users\\wangk\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib\\x64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\win10_kits\\lib\\ucrt\\x64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\win10_kits\\lib\\um\\x64', '', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\VC\\lib', '', 'c', '\\users\\wangk\\.conda\\envs\\dl2023\\libs', 'C', '\\Users\\wangk\\.cache\\jittor\\msvc\\VC\\_\\_\\_\\_\\_\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Library\\mingw-w64\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Library\\usr\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Library\\bin', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\Scripts', 'C', '\\Users\\wangk\\.conda\\envs\\dl2023\\bin', 'C', '\\Programs\\Anaconda3\\condabin', 'C', '\\Program Files\\Microsoft MPI\\Bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\libnvvp', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\libnvvp', 'C', '\\Windows\\system32', 'C', '\\Windows', 'C', '\\Windows\\System32\\Wbem', 'C', '\\Windows\\System32\\WindowsPowerShell\\v1.0', 'C', '\\Windows\\System32\\OpenSSH', 'C', '\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common', 'C', '\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR', 'C', '\\Program Files\\MATLAB\\R2022b\\bin', 'C', '\\Program Files\\dotnet', 'C', '\\Program Files\\NVIDIA Corporation\\Nsight Compute 2019.5.0', 'C', '\\Program Files\\Git\\cmd', 'C', '\\Programs\\Microsoft VS Code\\bin', 'C', '\\Users\\wangk\\AppData\\Local\\JetBrains\\Toolbox\\scripts', 'C', '\\Programs\\Anaconda3', 'C', '\\Programs\\Anaconda3\\Scripts', 'C', '\\Programs\\Anaconda3\\Library\\mingw-w64\\bin', 'C', '\\Programs\\Anaconda3\\Library\\bin', 'C', '\\Programs\\Anaconda3\\Library\\usr\\bin', 'C', '\\Programs\\texlive\\2022\\bin\\win32', 'C', '\\Users\\wangk\\AppData\\Local\\Microsoft\\WindowsApps', 'C', '\\Users\\wangk\\AppData\\Local\\Pandoc', 'C', '\\Programs\\MinGW\\bin', 'C', '\\Program Files\\Git\\bin', 'C', '\\Program Files (x86)\\Nmap']), This path may cause jittor found the wrong libs, please unset LD_LIBRARY_PATH and remove cuda lib path in Path. 
Or you can let jittor install cuda for you: `python3.x -m jittor_utils.install_cuda`
step 0, loss = 0.30003634095191956
step 1, loss = 390.97833251953125
step 2, loss = 672204.0625
step 3, loss = 228.69183349609375
step 4, loss = 104.243896484375
step 5, loss = 12.620445251464844
step 6, loss = 11.399105072021484
step 7, loss = 8.917252540588379
step 8, loss = 6.840869426727295
step 9, loss = 7.588629245758057
step 10, loss = 10.915828704833984

我已经尝试过了清空系统的cuda路径。观察资源管理器和nvidia-smi,训练没有使用cuda。jt.get_device_count()返回1,jt.flags.use_cuda返回0.确实没有使用cuda。我的代码是gitub首页的ann例子,只是将所有中间层维度换为10000


令人悲伤。我目前确信nvcc至少是导致错误的原因之一

解决啦,没想到吧

我改了jittor的部分代码,大概是g++的寻找,因为在ubuntu22.04上g++是11版本,我使用g++ -10,做了一些软链接解决了so.6等问题。

但是这不重要,因为我成功的在windows下使用了RTX4090。我其实只是忘记了jt.flags.use_cuda = 1。希望能有点提示。。因为确实因为4090的cuda支持我有点PTSD了。

我现在使用CUDA12.1和cudnn8.9.0。