官方代码实现卷积时将use_cuda设为1之后程序出错

环境:python 3.8 + jittor 1.3.5.14 + cuda 10.2

代码:

from email import header
import sys
import jittor as jt
if jt.has_cuda:
    jt.flags.use_cuda = 1
print(jt.compiler.has_cuda)
print(jt.flags.use_cuda)

from jittor.dataset.mnist import MNIST
import jittor.transform as trans
import matplotlib.pyplot as plt
from jittor import nn, Module
import numpy as np
import pylab as pl
import os as os
# %matplotlib inline
def conv(x, w):
    N,H,W,C = x.shape  #x.shape=[1,551,691,1]
    Kh, Kw, _C, Kc = w.shape #w.shape=[3,3,1,1]
    assert C==_C
    xx = x.reindex([N,H-Kh+1,W-Kw+1,Kh,Kw,C,Kc], [
        'i0', # Nid
        'i1+i3', # Hid+Khid
        'i2+i4', # Wid+KWid
        'i5', # Cid|
    ])
    #xx.shape=[1,549,689,3,3,1,1]
    ww = w.broadcast_var(xx)#w.shape=[3,3,1,1]  ww.shape=[1,549,689,3,3,1,1]
    yy = xx*ww
    y = yy.sum([3,4,5]) # Kh, Kw, c
    return y

# Let's disable tuner. This will cause jittor not to use mkl for convolution
jt.flags.enable_tuner = 0
img_path = "cat.jpg"

img = pl.imread(img_path)
pl.subplot(121)
pl.imshow(img)
kernel = np.array([
    [-1, -1, -1],
    [0, 0, 0],
    [1, 1, 1],
])
pl.subplot(122)
x = img[np.newaxis,:,:,:1].astype("float32")
w = kernel[:,:,np.newaxis,np.newaxis].astype("float32")

jx = jt.array(x)
jw = jt.array(w)

jy = conv(jx, jw).fetch_sync()
print()
print (jx.shape, jy.shape)
pl.imshow(jy[0,:,:,0])
pl.show()

程序在cpu下可以运行,但是当jt.flags.use_cuda=1时程序会产生如下报错:

Traceback (most recent call last):
  File "d:/Jittor/jittor_test.py", line 53, in <module>
    jy = conv(jx, jw).fetch_sync()
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.fetch_sync)).

Types of your inputs are:
 self   = Var,
 args   = (),

The function declarations are:
 ArrayArgs fetch_sync()

Failed reason:[f 0917 15:52:29.178000 20 parallel_compiler.cc:329] Error happend during compilation:
 [Error] source file location:C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc
Compile fused operator(0/1)failed:[Op(8:1:1:1:i1:o1:s0,broadcast_to->9),Op(6:1:1:1:i1:o1:s0,reindex->7),Op(10:2:1:1:i2:o1:s0,binary.multiply->11),Op(12:1:1:1:i1:o1:s0,reduce.add->13),]

Reason: [f 0917 15:52:29.178000 20 log.cc:608] Check failed ret(1) == 0(0) Run cmd failed: "C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin\nvcc.exe" "C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc"            -shared  -L"d:\python\python38\libs" -lpython38  -Xcompiler -EHa -Xcompiler -MD -Xcompiler -utf-8   -I"C:\Users\18326\.cache\jittor\msvc\VC\include" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\ucrt" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\shared" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\um" -DNOMINMAX  -L"C:\Users\18326\.cache\jittor\msvc\VC\lib" -L"C:\Users\18326\.cache\jittor\msvc\win10_kits\lib\um\x64" -L"C:\Users\18326\.cache\jittor\msvc\win10_kits\lib\ucrt\x64"  -I"d:\python\python38\lib\site-packages\jittor\src" -I"d:\python\python38\include" -DHAS_CUDA -DIS_CUDA -I"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\include" -I"d:\python\python38\lib\site-packages\jittor\extern\cuda\inc"  -lcudart -L"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\lib\x64" -L"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin"  -I"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89" -L"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89" -L"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default"  -l"jit_utils_core.cp38-win_amd64"  -l"jittor_core.cp38-win_amd64"  -x cu --cudart=shared -ccbin="C:\Users\18326\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe" --use_fast_math  -w  -I"d:\python\python38\lib\site-packages\jittor\extern/cuda/inc"  -arch=compute_61  -code=sm_61  -o "C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.dll" -Xlinker -EXPORT:"?jit_run@FusedOp@jittor@@QEAAXXZ"

您好,请您补充从 Jittor 开始运行的完整log信息,方便定位具体错误。

PS D:\Jittor> & d:/python/Python38/python38.exe d:/Jittor/jittor_test.py
[i 0917 20:36:36.400000 68 compiler.py:955] Jittor(1.3.5.14) src: d:\python\python38\lib\site-packages\jittor
[i 0917 20:36:36.440000 68 compiler.py:956] cl at C:\Users\18326\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe(19.29.30133)
[i 0917 20:36:36.441000 68 compiler.py:957] cache_path: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default
[i 0917 20:36:36.453000 68 install_cuda.py:88] cuda_driver_version: [10, 2, 0]
[i 0917 20:36:36.623000 68 __init__.py:411] Found C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin\nvcc.exe(10.2.89) at C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin\nvcc.exe.
[i 0917 20:36:36.747000 68 compiler.py:1010] cuda key:cu10.2.89
[i 0917 20:36:36.759000 68 __init__.py:227] Total mem: 15.88GB, using 5 procs for compiling.
[i 0917 20:36:38.086000 68 jit_compiler.cc:28] Load cc_path: C:\Users\18326\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe
[i 0917 20:36:38.099000 68 init.cc:62] Found cuda archs: [61,]
[i 0917 20:36:38.794000 68 compile_extern.py:517] mpicc not found, distribution disabled.
[w 0917 20:36:38.900000 68 compile_extern.py:200] CUDA related path found in LD_LIBRARY_PATH or PATH(['', 'C', '\\Users\\18326\\.cache\\jittor\\jtcuda\\cuda10.2_cudnn7_win\\lib64', '', 'C', '\\Users\\18326\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\bin', '', 'C', '\\Users\\18326\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\lib', '', 'C', '\\Users\\18326\\.cache\\jittor\\jt1.3.5\\cl\\py3.8.7\\Windows-10-10.xfe\\IntelRCoreTMi7x4f\\default', '', 'C', '\\Users\\18326\\.cache\\jittor\\jt1.3.5\\cl\\py3.8.7\\Windows-10-10.xfe\\IntelRCoreTMi7x4f\\default\\cu10.2.89', '', 'C', '\\Users\\18326\\.cache\\jittor\\jtcuda\\cuda10.2_cudnn7_win\\bin', '', 'C', '\\Users\\18326\\.cache\\jittor\\jtcuda\\cuda10.2_cudnn7_win\\lib\\x64', '', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\win10_kits\\lib\\ucrt\\x64', '', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\win10_kits\\lib\\um\\x64', '', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\VC\\lib', '', 'd', '\\python\\python38\\libs', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\VC\\_\\_\\_\\_\\_\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\libnvvp', 'D', '\\jdk18\\bin', 'C', '\\Program Files\\Common Files\\Oracle\\Java\\javapath', 'D', '\\VMware\\bin\\', 'C', '\\Windows\\system32', 'C', '\\Windows', 'C', '\\Windows\\System32\\Wbem', 'C', '\\Windows\\System32\\WindowsPowerShell\\v1.0\\', 'C', '\\Windows\\System32\\OpenSSH\\', 'D', '\\Xftp\\', 'D', '\\mysql\\mysql-5.7.30-winx64\\bin', 'D', '\\davinci\\davinci\\bin', 'D', '\\lux_downloader', 'D', '\\lux_downloader\\ffmpeg-n5.0-latest-win64-gpl-5.0\\bin', 'D', '\\Pycharm Envy\\pytorch\\Lib\\site-packages\\pyqt5_tools', 'C', '\\Program Files (x86)\\Wolfram Research\\WolframScript\\', 'D', '\\Matlab2020a\\runtime\\win64', 'D', '\\Matlab2020a\\bin', 'D', '\\Matlab2020a\\polyspace\\bin', 'C', '\\Program Files\\NVIDIA Corporation\\Nsight Compute 2019.5.0\\', 'C', '\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common', 'D', '\\python\\Python39\\Scripts\\', 'D', '\\python\\Python39\\', 'D', '\\python\\Python37\\Scripts\\', 'D', '\\python\\Python37\\', 'D', '\\python\\Python38\\Scripts\\', 'D', '\\python\\Python38\\', 'C', '\\Users\\18326\\AppData\\Local\\Microsoft\\WindowsApps', 'D', '\\Vscode\\Microsoft VS Code\\bin', 'D', '\\IntelliJ IDEA Community Edition 2022.2\\bin', '', '']), 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`
[i 0917 20:36:41.271000 68 cuda_flags.cc:32] CUDA enabled.
1
2
[e 0917 20:36:44.827000 68 log.cc:565] cl : Command line warning D9025 : overriding '/EHa' with '/EHs'
__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc
C:/Users/18326/.cache/jittor/jt1.3.5/cl/py3.8.7/Windows-10-10.xfe/IntelRCoreTMi7x4f/default/cu10.2.89/jit/__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc(141): error: extra text after expected end of number

1 error detected in the compilation of "C:/Users/18326/AppData/Local/Temp/tmpxft_00003f58_00000000-12___opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cpp1.ii".
__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc

Traceback (most recent call last):
  File "d:/Jittor/jittor_test.py", line 52, in <module>
    jy = conv(jx, jw).fetch_sync()
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.fetch_sync)).

Types of your inputs are:
 self   = Var,
 args   = (),

The function declarations are:
 ArrayArgs fetch_sync()

Failed reason:[f 0917 20:36:44.830000 68 parallel_compiler.cc:329] Error happend during compilation:
 [Error] source file location:C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc
Compile fused operator(0/1)failed:[Op(8:1:1:1:i1:o1:s0,broadcast_to->9),Op(6:1:1:1:i1:o1:s0,reindex->7),Op(10:2:1:1:i2:o1:s0,binary.multiply->11),Op(12:1:1:1:i1:o1:s0,reduce.add->13),]

Reason: [f 0917 20:36:44.828000 68 log.cc:608] Check failed ret(1) == 0(0) Run cmd failed: "C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin\nvcc.exe" "C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc"            -shared  -L"d:\python\python38\libs" -lpython38  -Xcompiler -EHa -Xcompiler -MD -Xcompiler -utf-8   -I"C:\Users\18326\.cache\jittor\msvc\VC\include" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\ucrt" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\shared" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\um" -DNOMINMAX  -L"C:\Users\18326\.cache\jittor\msvc\VC\lib" -L"C:\Users\18326\.cache\jittor\msvc\win10_kits\lib\um\x64" -L"C:\Users\18326\.cache\jittor\msvc\win10_kits\lib\ucrt\x64"  -I"d:\python\python38\lib\site-packages\jittor\src" -I"d:\python\python38\include" -DHAS_CUDA -DIS_CUDA -I"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\include" -I"d:\python\python38\lib\site-packages\jittor\extern\cuda\inc"  -lcudart -L"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\lib\x64" -L"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin"  -I"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89" -L"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89" -L"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default"  -l"jit_utils_core.cp38-win_amd64"  -l"jittor_core.cp38-win_amd64"  -x cu --cudart=shared -ccbin="C:\Users\18326\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe" --use_fast_math  -w  -I"d:\python\python38\lib\site-packages\jittor\extern/cuda/inc"  -arch=compute_61  -code=sm_61  -o "C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.dll" -Xlinker -EXPORT:"?jit_run@FusedOp@jittor@@QEAAXXZ"

您试试清除 cache 后还会出现这个问题吗?

python -m jittor_utils.clean_cache all

不行,清除之后,再运行程序,会把这个重新下载下来,然后产生一样的报错

PS D:\Jittor> & d:/python/Python38/python38.exe d:/Jittor/jittor_test.py
[i 0917 21:54:18.113634 64 lock.py:85] Create lock file:C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\jittor.lock
[i 0917 21:54:18.122647 64 install_msvc.py:8] Installing MSVC...
Downloading https://cg.cs.tsinghua.edu.cn/jittor/assets/msvc.zip to C:\Users\18326\.cache\jittor\msvc\msvc.zip
53.3MB [00:05, 10.3MB/s]                                                                                                                                         
[i 0917 21:54:25.498312 64 compiler.py:955] Jittor(1.3.5.14) src: d:\python\python38\lib\site-packages\jittor
[i 0917 21:54:25.630866 64 compiler.py:956] cl at C:\Users\18326\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe(19.29.30133)
[i 0917 21:54:25.631447 64 compiler.py:957] cache_path: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default
[i 0917 21:54:25.635474 64 install_cuda.py:88] cuda_driver_version: [10, 2, 0]
Downloading https://cg.cs.tsinghua.edu.cn/jittor/assets/cuda10.2_cudnn7_win.zip to C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win.zip
881MB [01:21, 11.3MB/s]
[i 0917 21:56:00.340350 64 __init__.py:411] Found C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin\nvcc.exe(10.2.89) at C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin\nvcc.exe.
[i 0917 21:56:00.439122 64 compiler.py:1010] cuda key:cu10.2.89
[i 0917 21:56:00.440119 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89
[i 0917 21:56:00.440119 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit
[i 0917 21:56:00.441116 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\obj_files
[i 0917 21:56:00.442113 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\gen
[i 0917 21:56:00.443112 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\tmp
[i 0917 21:56:00.444109 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\checkpoints
[i 0917 21:56:00.446135 64 __init__.py:227] Total mem: 15.88GB, using 5 procs for compiling.
Compiling jit_utils_core(5/5) used: 2.893s eta: 0.000s
Compiling jit_utils_core(5/5) used: 2.456s eta: 0.000s
Compiling jittor_core(148/148) used: 56.462s eta: 0.000ss
[i 0917 21:57:17.234000 64 jit_compiler.cc:28] Load cc_path: C:\Users\18326\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe
[i 0917 21:57:17.266000 64 init.cc:62] Found cuda archs: [61,]
[i 0917 21:57:17.462000 64 compile_extern.py:517] mpicc not found, distribution disabled.
[i 0917 21:57:17.462000 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\cutt
[i 0917 21:57:17.471000 64 compile_extern.py:334] Downloading cutt...
Downloading https://codeload.github.com/Jittor/cutt/zip/v1.2 to C:\Users\18326\.cache\jittor\cutt\cutt-1.2.zip
296kB [00:01, 152kB/s]  
[i 0917 21:57:19.516000 64 compile_extern.py:347] installing cutt...
Compiling libcutt(9/9) used: 96.922s eta: 0.000s
[i 0917 21:58:57.132000 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\custom_ops
[i 0917 21:58:59.137000 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\mkl
[i 0917 21:58:59.146000 64 compile_extern.py:65] Downloading mkl...
Downloading https://cg.cs.tsinghua.edu.cn/jittor/assets/dnnl_win_2.2.0_cpu_vcomp.zip to C:\Users\18326\.cache\jittor\mkl\dnnl_win_2.2.0_cpu_vcomp.zip
6.70MB [00:00, 7.27MB/s]
cnn_inference_f32.cpp
Use time: 19.03 ms per iteration.
Example passed on CPU.
Compiling gen_ops_mkl_conv_backward_w_mkl_conv_backward_x_mk___hashc4699b(7/7) used: 2.992s eta: 0.000s
[w 0917 21:59:06.748000 64 compile_extern.py:200] CUDA related path found in LD_LIBRARY_PATH or PATH(['', 'C', '\\Users\\18326\\.cache\\jittor\\jtcuda\\cuda10.2_cudnn7_win\\lib64', '', 'C', '\\Users\\18326\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\bin', '', 'C', '\\Users\\18326\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\lib', '', 'C', '\\Users\\18326\\.cache\\jittor\\jt1.3.5\\cl\\py3.8.7\\Windows-10-10.xfe\\IntelRCoreTMi7x4f\\default', '', 'C', '\\Users\\18326\\.cache\\jittor\\jt1.3.5\\cl\\py3.8.7\\Windows-10-10.xfe\\IntelRCoreTMi7x4f\\default\\cu10.2.89', '', 'C', '\\Users\\18326\\.cache\\jittor\\jtcuda\\cuda10.2_cudnn7_win\\bin', '', 'C', '\\Users\\18326\\.cache\\jittor\\jtcuda\\cuda10.2_cudnn7_win\\lib\\x64', '', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\win10_kits\\lib\\ucrt\\x64', '', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\win10_kits\\lib\\um\\x64', '', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\VC\\lib', '', 'd', '\\python\\python38\\libs', 'C', '\\Users\\18326\\.cache\\jittor\\msvc\\VC\\_\\_\\_\\_\\_\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\libnvvp', 'D', '\\jdk18\\bin', 'C', '\\Program Files\\Common Files\\Oracle\\Java\\javapath', 'D', '\\VMware\\bin\\', 'C', '\\Windows\\system32', 'C', '\\Windows', 'C', '\\Windows\\System32\\Wbem', 'C', '\\Windows\\System32\\WindowsPowerShell\\v1.0\\', 'C', '\\Windows\\System32\\OpenSSH\\', 'D', '\\Xftp\\', 'D', '\\mysql\\mysql-5.7.30-winx64\\bin', 'D', '\\davinci\\davinci\\bin', 'D', '\\lux_downloader', 'D', '\\lux_downloader\\ffmpeg-n5.0-latest-win64-gpl-5.0\\bin', 'D', '\\Pycharm Envy\\pytorch\\Lib\\site-packages\\pyqt5_tools', 'C', '\\Program Files (x86)\\Wolfram Research\\WolframScript\\', 'D', '\\Matlab2020a\\runtime\\win64', 'D', '\\Matlab2020a\\bin', 'D', '\\Matlab2020a\\polyspace\\bin', 'C', '\\Program Files\\NVIDIA Corporation\\Nsight Compute 2019.5.0\\', 'C', '\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common', 'D', '\\python\\Python39\\Scripts\\', 'D', '\\python\\Python39\\', 'D', '\\python\\Python37\\Scripts\\', 'D', '\\python\\Python37\\', 'D', '\\python\\Python38\\Scripts\\', 'D', '\\python\\Python38\\', 'C', '\\Users\\18326\\AppData\\Local\\Microsoft\\WindowsApps', 'D', '\\Vscode\\Microsoft VS Code\\bin', 'D', '\\IntelliJ IDEA Community Edition 2022.2\\bin', '', '', 'C', '\\Users\\18326\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\bin']), 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`
[i 0917 21:59:06.767000 64 compiler.py:34] Create cache dir: C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\cuda
Compiling libcuda_extern(3/3) used: 2.673s eta: 0.000s
[i 0917 21:59:09.719000 64 compile_extern.py:166] Downloading cub...
Downloading https://codeload.github.com/NVIDIA/cub/tar.gz/1.11.0 to C:\Users\18326\.cache\jittor\cub\cub-1.11.0.tgz
424kB [00:00, 461kB/s] 
Compiling gen_ops_cublas_acc_matmul_cublas_batched_matmul_cu___hashe0fa5d(8/8) used: 2.189s eta: 0.000s
Compiling gen_ops_cudnn_conv3d_backward_w_cudnn_conv3d_backw___hash78c3ee(16/16) used: 5.011s eta: 0.000s
[i 0917 21:59:27.893000 64 cuda_flags.cc:32] CUDA enabled.
1
2
[e 0917 21:59:29.932000 64 log.cc:565] cl : Command line warning D9025 : overriding '/EHa' with '/EHs'
__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc
C:/Users/18326/.cache/jittor/jt1.3.5/cl/py3.8.7/Windows-10-10.xfe/IntelRCoreTMi7x4f/default/cu10.2.89/jit/__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc(141): error: extra text after expected end of number

1 error detected in the compilation of "C:/Users/18326/AppData/Local/Temp/tmpxft_00003d80_00000000-12___opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cpp1.ii".
__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc

Traceback (most recent call last):
  File "d:/Jittor/jittor_test.py", line 52, in <module>
    jy = conv(jx, jw).fetch_sync()
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.fetch_sync)).

Types of your inputs are:
 self   = Var,
 args   = (),

The function declarations are:
 ArrayArgs fetch_sync()

Failed reason:[f 0917 21:59:29.938000 64 parallel_compiler.cc:329] Error happend during compilation:
 [Error] source file location:C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc
Compile fused operator(0/1)failed:[Op(8:1:1:1:i1:o1:s0,broadcast_to->9),Op(6:1:1:1:i1:o1:s0,reindex->7),Op(10:2:1:1:i2:o1:s0,binary.multiply->11),Op(12:1:1:1:i1:o1:s0,reduce.add->13),]

Reason: [f 0917 21:59:29.938000 64 log.cc:608] Check failed ret(1) == 0(0) Run cmd failed: "C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin\nvcc.exe" "C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.cc"            -shared  -L"d:\python\python38\libs" -lpython38  -Xcompiler -EHa -Xcompiler -MD -Xcompiler -utf-8   -I"C:\Users\18326\.cache\jittor\msvc\VC\include" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\ucrt" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\shared" -I"C:\Users\18326\.cache\jittor\msvc\win10_kits\include\um" -DNOMINMAX  -L"C:\Users\18326\.cache\jittor\msvc\VC\lib" -L"C:\Users\18326\.cache\jittor\msvc\win10_kits\lib\um\x64" -L"C:\Users\18326\.cache\jittor\msvc\win10_kits\lib\ucrt\x64"  -I"d:\python\python38\lib\site-packages\jittor\src" -I"d:\python\python38\include" -DHAS_CUDA -DIS_CUDA -I"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\include" -I"d:\python\python38\lib\site-packages\jittor\extern\cuda\inc"  -lcudart -L"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\lib\x64" -L"C:\Users\18326\.cache\jittor\jtcuda\cuda10.2_cudnn7_win\bin"  -I"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89" -L"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89" -L"C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default"  -l"jit_utils_core.cp38-win_amd64"  -l"jittor_core.cp38-win_amd64"  -x cu --cudart=shared -ccbin="C:\Users\18326\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe" --use_fast_math  -w  -I"d:\python\python38\lib\site-packages\jittor\extern/cuda/inc"  -arch=compute_61  -code=sm_61  -o "C:\Users\18326\.cache\jittor\jt1.3.5\cl\py3.8.7\Windows-10-10.xfe\IntelRCoreTMi7x4f\default\cu10.2.89\jit\__opkey0_broadcast_to__Tx_float32__DIM_7__BCAST_7__opkey1_reindex__Tx_float32__XDIM_4__YDI___hash_1d5a469be42f10ad_op.dll" -Xlinker -EXPORT:"?jit_run@FusedOp@jittor@@QEAAXXZ"

您好,经过测试,您可以升级到最新的显卡驱动,并且清空cache,就可以解决这个问题。

驱动更新后已解决!感谢