mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.75k stars 407 forks source link

gpu runs failing: Invalid PTX input #426

Closed skcajs closed 1 month ago

skcajs commented 1 month ago

Hi, after finally successfully building the ptbr-4 project and enabling the gpu (I had to go down to CUDA version 12.1 and OptiX version 7.7 to get the build to finish successfully), I am hitting this error when trying to run an example:

[ tid 34004 @ 0.000s C:\Users\sjack\Documents\Code\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1105 ] FATAL OptiX call OPTIX_MODULE_CREATE_FN( optixContext, &moduleCompileOptions, &pipelineCompileOptions, ptx, strlen(ptx), log, &logSize, &optixModule ) failed with code 7200: "Invalid input" Logs: COMPILE ERROR: Invalid PTX input: ptx2llvm-module-001: error: Failed to parse input PTX string ptx2llvm-module-001, line 94729; fatal : Parsing error near '': syntax error Cannot parse input PTX string

(unknown ) 0x00014C2000008F50 - Q (unknown ) 0x00014C2000008F50 -Q (unknown ) 0x00014C2000008F50 - Q (unknown ) 0x00014C2000008F50 -Q (unknown ) 0x00014C2000008F50 - Q (unknown ) 0x00014C2000008F50 -Q (unknown ) 0x00014C2000008F50 - Q (unknown ) 0x00014C2000008F50 -Q (unknown ) 0x00014C2000008F50 - Q (unknown ) 0x00014C2000008F50 -Q (unknown ) 0x00007FFAA8152560 - BaseThreadInitThunk (unknown ) 0x00007FFAA90CAA20 - RtlUserThreadStart

The command I'm running is:

.\pbrt.exe C:\Users\sjack\Documents\Code\pbrt-v4-scenes\pbrt-book\book.pbrt --gpu

skcajs commented 1 month ago

I solved this by moving down to version 7,1 of Optix