Nsight Compute OptiX 7.7

Hey!

I am trying to profile a basic OptiX7.7 program (with Cuda Toolkit 12.0, as per the Release Note requirements), using NSight Compute 2025.2, and cannot seem to get the source code side of things working. I was hoping to use this to identify which parts of my program are taking up the most time, and focus any optimisations accordingly.

I am following the instructions in the programming guide (https://raytracing-docs.nvidia.com/optix7/guide/index.html#program_pipeline_creation#7017):

  • I am compiling a .ptx file using cmake, with --generate-line-info --relocatable-device-code=true --use_fast_math.
  • This is then read during the setup of the OptiX application, in which I am setting the OptixModuleCompileOptions.debugLevel to OPTIX_COMPILE_DEBUG_LEVEL_MODERATE, and OptixModuleCompileOptions.optLevel to OPTIX_COMPILE_OPTIMIZATION_LEVEL_3.
  • I am using Nsight Compute’s Profile activity, with OPTIX_FORCE_DEPRECATED_LAUNCHER=1 in the Environment field, with Import Source set to Yes, and the location of the .cu file (and .ptx file, just to be safe) provided as the Source Folders.

I am able to see the NVIDIA internal (optixLaunch) call’s, and their duration etc., but when I go to the Source tab, I just see “No source available.”.

I have tried a number of other options, with no success, including:

  • A variety of different optLevel and debugLevel configurations
  • Using a .optixir file instead, with extra debug info using -G

Any suggestions would be much appreciated!

Thanks!

Hey I don’t see anything wrong with your setup. Which driver are you using? Do you get source when profiling an OptiX SDK sample like optixPathTracer? I can try this in a day or two and see if it works for me.

Note that the OPTIX_FORCE_DEPRECATED_LAUNCHER env var is no longer necessary in 570 or 580 branch drivers. It should be ignored now, but if you’re using the latest driver, go ahead and remove it from your setup.

–
David.

Hi David,

Thanks so much for getting back to me!
I’m using driver version 570.133.07.
Removing the OPTIX_FORCE_DEPRECATED_LAUNCHER solved my problem!
The kernels now show up as optixLaunch, not NVIDIA internal (optixLaunch), and I can see my source code.

Cheers!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.