JDAI-CV / CoTNet

This is an official implementation for "Contextual Transformer Networks for Visual Recognition".
https://arxiv.org/pdf/2107.12292.pdf
Other
514 stars 78 forks source link

有关cupy问题 #7

Closed mapei319 closed 3 years ago

mapei319 commented 3 years ago

作者大大您好,请教一下,温十系统,cuda版本10.0,安装对应pip install cupy-cuda100,运行自己的程序出现以下错误,有什么解决办法吗?错误: Traceback (most recent call last): File "D:\ProgramData\Anaconda3\envs\mpsecond\lib\site-packages\cupy\cuda\compiler.py", line 623, in compile nvrtc.compileProgram(self.ptr, options) File "cupy_backends\cuda\libs\nvrtc.pyx", line 133, in cupy_backends.cuda.libs.nvrtc.compileProgram File "cupy_backends\cuda\libs\nvrtc.pyx", line 145, in cupy_backends.cuda.libs.nvrtc.compileProgram File "cupy_backends\cuda\libs\nvrtc.pyx", line 64, in cupy_backends.cuda.libs.nvrtc.check_status cupy_backends.cuda.libs.nvrtc.NVRTCError: NVRTC_ERROR_COMPILATION (6)

cupy.cuda.compiler.CompileException: Catastrophic error: cannot open source file "C:\Users\姗$毊鎿1\AppData\Local\Temp\tmppbfe3ifw\5670bca31c4c03ccc4fc7022a055bc13_2.cubin.cu"

YehLi commented 3 years ago

You can refer to https://github.com/cupy/cupy/issues/2100. The reason might be the Chinese characters in your path.

DAVID-Hown commented 2 years ago

Hello, I have also encountered the same problem. This error occurred when I was running other people's demo examples. This problem has bothered me for many days. error: Number of threads used: 32 Loading models parameters... ./models/trained/disparity-estimation-no-mask.tar Model disparity loaded succesfully. ./models/trained/disparity-refinement.tar Model refine loaded succesfully. ./models/trained/inpainting-color.tar Model inpaint loaded succesfully. Traceback (most recent call last): File "/usr/local/python39/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 681, in compile nvrtc.compileProgram(self.ptr, options) File "cupy_backends/cuda/libs/nvrtc.pyx", line 139, in cupy_backends.cuda.libs.nvrtc.compileProgram File "cupy_backends/cuda/libs/nvrtc.pyx", line 151, in cupy_backends.cuda.libs.nvrtc.compileProgram File "cupy_backends/cuda/libs/nvrtc.pyx", line 67, in cupy_backends.cuda.libs.nvrtc.check_status cupy_backends.cuda.libs.nvrtc.NVRTCError: NVRTC_ERROR_COMPILATION (6)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/DATA/jupyter/share/haodawei/improved-kbe/kbe.py", line 182, in ken_burn_pipe((tensorImage+1)/2, zoom_settings, output_path, pretrained_estim=pretrained_estim) File "/DATA/jupyter/share/haodawei/improved-kbe/utils/pipeline.py", line 112, in call numpyResult = process_kenburns({ File "/DATA/jupyter/share/haodawei/improved-kbe/utils/common.py", line 208, in process_kenburns tensorRender, tensorExisting = render_pointcloud(objectCommon['tensorInpaPoints'] + tensorShift, File "/DATA/jupyter/share/haodawei/improved-kbe/utils/common.py", line 435, in render_pointcloud launch_kernel('kernel_pointrender_updateZee', preprocess_kernel(''' File "cupy/_util.pyx", line 67, in cupy._util.memoize.decorator.ret File "/DATA/jupyter/share/haodawei/improved-kbe/utils/common.py", line 380, in launch_kernel return cupy.cuda.compile_with_cache(strKernel, tuple([ '-I ' + os.environ['CUDA_HOME'], '-I ' + os.environ['CUDA_HOME'] + '/include' ])).get_function(strFunction) File "/usr/local/python39/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 460, in compile_with_cache return _compile_module_with_cache(*args, **kwargs) File "/usr/local/python39/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 488, in _compile_module_with_cache return _compile_with_cache_cuda( File "/usr/local/python39/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 566, in _compile_with_cache_cuda ptx, mapping = compile_using_nvrtc( File "/usr/local/python39/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 317, in compile_using_nvrtc return _compile(source, options, cu_path, File "/usr/local/python39/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 301, in _compile compiled_obj, mapping = prog.compile(options, log_stream) File "/usr/local/python39/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 698, in compile raise CompileException(log, self.src, self.name, options, cupy.cuda.compiler.CompileException: /tmp/tmpl94lnfh3/6335edf91d36e122532b0e6f44001e82f777db6a.cubin.cu(2): catastrophic error: cannot open source file "/home/s182169/Master_thesis/GAN-Burns-effect/utils/helper_math.h"

1 catastrophic error detected in the compilation of "/tmp/tmpl94lnfh3/6335edf91d36e122532b0e6f44001e82f777db6a.cubin.cu". Compilation terminated. ———————————————— my env: OS : Linux-4.9.0-8-amd64-x86_64-with-glibc2.27 Python Version : 3.9.2 CuPy Version : 10.1.0 CuPy Platform : NVIDIA CUDA NumPy Version : 1.20.1 SciPy Version : 1.6.1 Cython Build Version : 0.29.24 Cython Runtime Version : None CUDA Root : /usr/local/cuda nvcc PATH : /usr/local/cuda/bin/nvcc CUDA Build Version : 10020 CUDA Driver Version : 10020 CUDA Runtime Version : 10020 cuBLAS Version : 10203 cuFFT Version : 10102 cuRAND Version : 10102 cuSOLVER Version : (10, 3, 0) cuSPARSE Version : 10301 NVRTC Version : (10, 2) Thrust Version : 100907 CUB Build Version : 100800 Jitify Build Version : 60e9e72 cuDNN Build Version : 8300 cuDNN Version : 8101 NCCL Build Version : 21104 NCCL Runtime Version : 2804 cuTENSOR Version : None cuSPARSELt Build Version : None Device 0 Name : Tesla V100-SXM2-32GB Device 0 Compute Capability : 70 Device 0 PCI Bus ID : 0000:18:00.0 Device 1 Name : Tesla V100-SXM2-32GB Device 1 Compute Capability : 70 Device 1 PCI Bus ID : 0000:3B:00.0 Device 2 Name : Tesla V100-SXM2-32GB Device 2 Compute Capability : 70 Device 2 PCI Bus ID : 0000:AF:00.0

richmengsix commented 11 months ago

Hi, @YehLi,

Do you know if there's any way to get around this? We are shipping cupy as software to our users, so we don't have full control of the user name embedded in the path.

mathmd commented 4 months ago

@richmengsix I have the same problem which is now solved once I change the name of the Users folder from the older one with Traditional Chinese character to a roman script one. The procedure is somehow risky since it involves editing the Registry. Another way to solve this is to create a new user account (but I didn't want to reinstall all my software packages).