pycuda.driver.CompileError: nvcc compilation of /tmp/tmp7hnwb4te/kernel.cu failed #422
Unanswered
tiandao091
asked this question in
Q&A
Replies: 2 comments
-
Looks like you've got a C/C++ error in your kernel code:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your information, but i can't find the kernel.cu file in this path "opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/pycuda/cuda kernel.cu". |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
python version: 3.9
cuda version: 11.6
pycuda version: pip install pycuda=2022.1
i test my first cuda code in python, but failed. The error information is here:
Traceback (most recent call last):
File "/home/hdb/project/DIP_db/test_pycuda/test_pycuda.py", line 30, in
mod = SourceModule(kernel_code)
File "/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/pycuda/compiler.py", line 352, in init
cubin = compile(
File "/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/pycuda/compiler.py", line 301, in compile
return compile_plain(source, options, keep, nvcc, cache_dir, target)
File "/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/pycuda/compiler.py", line 154, in compile_plain
raise CompileError(
pycuda.driver.CompileError: nvcc compilation of /tmp/tmp7hnwb4te/kernel.cu failed
[command: nvcc --cubin -arch sm_80 -I/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages/pycuda/cuda kernel.cu]
[stderr:
kernel.cu(6): error: expression must be a modifiable lvalue
1 error detected in the compilation of "kernel.cu".
I don't know why. So can you give me some advices?
Beta Was this translation helpful? Give feedback.
All reactions