Exceptions cause CUDA 7 error

I’ve just upgraded to OptiX 3.8 final and CUDA 7.0, which the documentation seems to indicate is the preferred CUDA version. When my code includes a line to throw an RT_EXCEPTION_*, I get the following error:

Unknown error (Details: Function "_rtContextLaunch3D" caught exception: Encountered a CUDA error: result returned (700): Unknown, [6619204])

Interestingly, the error doesn’t happen the first time the kernel is run (it runs several times in a row), and it doesn’t happen when an exception is thrown (the exception is in an if statement which is never called). However, removing the line that throws the exception causes the error to go away.

If I point VS2013 to use CUDA 6.5 instead of CUDA 7.0, there is no error. My program does have CUDA kernels as well as OptiX.

OptiX 3.8, CUDA 7.0, Driver 348.07, Windows 7, 2x Tesla K40

I guess you should record an OptiX API capture (see https://devtalk.nvidia.com/default/topic/803116/optix/error-with-rtpmodelupdate/post/4436953/#4436953) and send it to the developers.

Agreed. Send us a trace. This sounds like a CUDA compiler error that they fixed recently. Try driver 353.06, if you can get it, or send us a trace.

I updated the driver to 353.30 on a machine with a Quadro K4000 (otherwise the same setup) and still experienced the same error. I’ve sent a trace to optix-help@nvidia.com.