2

I'm trying to compile a PyCUDA kernel. The compilation fails with the error:

pycuda.driver.CompileError: nvcc preprocessing of C:\Users\itay\AppData\Local\Temp\tmp78b6tln1.cu failed
[command: nvcc --preprocess -arch sm_52 -m64 -Ic:\users\itay\sources\pythonmaps\env\lib\site-packages\pycuda\cuda C:\Users\itay\AppData\Local\Temp\tmp78b6tln1.cu --compiler-options -EP]

Running the same command from a command prompt works fine.

The CompileError exception has a strerr attribute which contains the stderr of the compilation. It is empty. Only by placing a break-point inside PyCUDA did I find the actual error, which was reported by nvcc to stdout.

Is there a way to get the compilation output without placing breakpoints in PyCUDA?

zmbq
  • 38,013
  • 14
  • 101
  • 171

0 Answers0