Comparing Optix performance to CUDA

Even if all device programs are inside a single file, note that using callables will require either the NVCC --keep-device-functions or --relocatable-device-code=true option. NVRTC only supports the latter. Otherwise the callables get removed as dead code because there is no call to them inside the module’s remaining code.

That’s actually a setting in the OptiX SDK examples’ CMakeLists.txt files.
Or here in my OptiX 7 examples