Upgrade from Optix 7.2 to 7.3 or 7.4 modules trouble

Hi folks. I’m on CentOS 8 with 495.44 driver. I’m attempting to upgrade from 7.2 to 7.4, and have also tried 7.3 along the way. I’m getting the follow error

Check failed: resultCode == OPTIX_SUCCESS (7204 vs. 0) Invalid use of optix device function

when calling optixModuleCreateFromPTX. For the 7.3 upgrade I do not have to change any code for my renderer to compile, and for 7.4, I only had to change OptixModuleCompileOptions::debugLevel.

Looking at the release notes I saw that some fields were added to OptixModuleCompileOptions and OptixPipelineCompileOptions, and it was recommended to zero-init the structures, which I was already doing.

Can anyone provide a hint for what might be going wrong between Optix 7.2 and Optix 7.3 that might result in the error mentioned above?

Interesting. I haven’t seen that error before.

That error can happen for multiple reasons which are too many to list.

Isn’t there any additional compilation error information?
Do you have set an OptixDeviceContextOptions log callback and set it to the maximum level 4?
Example code: https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/intro_runtime/src/Application.cpp#L762

Bummer. I’m already setting this to level 4.

After recompiling the shaders, I get errors like this

.../third-party/glm/glm/glm/detail/type_vec2.hpp(94): warning: __device__ annotation is ignored on a function("vec") that is explicitly defaulted on its first declaration

.../third-party/glm/glm/glm/detail/type_vec2.hpp(94): warning: __host__ annotation is ignored on a function("vec") that is explicitly defaulted on its first declaration

But otherwise there are no shader compilation errors nor C++ compilation errors/warnings

I’m curious what would be the approach folks would use to try to identify the problem to fix this? There is really not a lot of information here, and I would have expected something fairly obvious since my code worked (works) with 7.2

Hi Brian,
since those warnings are all we can go on, I’d follow that track. Are all the errors you’re getting warnings about vec constructors from the glm library? Have you checked if those also happen with 7.3 or 7.2?
Given that this is a (device code/CUDA) compile issue in the GLM library, are you on the latest known good version of that lib?
I would probably try to comment out the parts of your device programs that use those constructors, or more aggressively that use GLM and try to chase down the offending code.
–Frank