Assertion failed: "acp->isUsedAsSingleSemanticType()"

That’s a message from the OptiX internal compiler. This indicates it has trouble translating something in your PTX input code or something is missing.

Please check if your nvcc command line to compile the OptiX *.cu device code to the *.ptx input source is using the same options as in the example you’re porting.

Have a look at this thread which explains how to get those printed by the CMake generated solution:
[url]https://devtalk.nvidia.com/default/topic/1052501/optix/how-would-you-generally-compile-and-run-a-program-which-has-optix-without-make-or-cmake-/[/url]

Things to look out for:

  • Do not use -g or -G debug flags.
  • Use --keep-device-functions or --relocatable-device-code=true otherwise callable programs will be eliminated as dead code since CUDA 8.0 because it doesn’t see a call to it. (Note that NVRTC doesn’t support the former option.)
  • Use streaming multiprocessor targets 3.0 or 5.0.
  • Do not use SM 7.5 as PTX target. That won’t be parsed correctly in shipping OptiX versions.
  • Use --use_fast_math to avoid slow trigonometric, square root, reciprocal, or inadvertent double floating point calculations. The resulting PTX source should contain .approx instructions and only floats instead.