错误总结

1. OptiX Error: Unknown error (Details: Function "_rtContextCompile" caught excepti
on: Inconsistent device bitness detected with given input PTX: traverse_geometry
_3, [1573417])

Solution:that error usually happens when you're trying to use 32-bit PTXes with a 64-bit OptiX program. Please check your PTX and OptiX application bitness in order for them to match.

2. Invalid source。可能是cu文件路径、函数名不对,也可能是编译时的CUDA版本和运行时的OPTIX版本不兼容。比如optix3.5.1和cuda6.5不兼容。

3. OptiX Error: Unknown error (Details: Function "_rtContextCompile" caught exception: Assertion failed: "instr->modifiers.CC == 0", [1312613])

to solve it, add --use_fast_math in nvcc when compiling the ptx

set include=%OPTIX_SDK%/include;%OPTIX_SDK%/include/common;%include%
for %%i in (*.cu) do nvcc --use_fast_math --machine 32 --output-file %%i.ptx -ptx %%i
4. 运行时optix::shared::CudaError,可能是访问了越界的显存资源,比如对纹理的uv坐标,可以使用clamp函数裁剪一下,再使用。

你可能感兴趣的:(错误总结)