I wanted to run our OptiX application on another (older) computer.
The following runtime error occured:
Unknown error (Details: Function “RTresult _rtContextLaunch1D(RTcontext_api*, unsigned int, RTsize)” caught exception: Encountered a CUDA error: driver().cuLaunchGrid(m_function, m_gridWidth, m_gridHeight) returned (701): Launch out of resources, [12124202])
I debugged using trial & error and found out that the Lbvh acceleration structure was causing the error. When I changed it to e.g. Sbvh, everything worked as it should.
Lbvh builds the acceleration structure on the device as far as I remember. Your device may run out of resources to complete the operation. Does it happen in the building phase or during the launch?
I guess it happens during the building phase, but since the accelerations structures do not seem to be built before calling “context->lauch()”, I don’t know exactly.
However, I do not get any rtPrintf output from the ray generation program since the program is terminated before.
You can trigger the compilation and acceleration structure building steps OptiX does once before rendering by calling launch() with zero size (e.g. ctx->launch(0, 0);) If it fails at that time it’s not due to the rendering.
Lbvh is not supported for SM 1.0 devices (it requires SM 1.1+). OptiX should have automatically switch Lbvh to another builder automatically, but it erroneously did not.
This site details the different SM capabilities of NVIDIA GPUs.