How to run cuda kernels in sequence?

I need to run cuda kernels in sequence on one of the optixIntro sample project(no. 6) for debugging purpose.

I have tried “Enable Synchronous Launch Debugging” assuming this should result in a slow launch.
But the fps is still high about 50-60.

I have noticed cudA_LAUNCH_BLOCKING variable cause the kernels to run in sequnce, but don’t know where to set it.



I am not an expert on Cuda, but check this: 12.4. set cuda launch_blocking

Devtalk Community Manager