Optix 7.1: Issue with running samples on a Maxwell card

I was trying out the latest Optix SDK (7.1) and when I compiled and ran the optixPathTracer sample, I got the following error:

[ 4][ KNOBS]: All knobs on default.
[ 4][ DISK CACHE]: Opened database: “C:\Users\xxx\AppData\Local\NVIDIA\OptixCache\cache7.db”
[ 4][ DISK CACHE]: Cache data size: “0 Bytes”
[ 4][ DISKCACHE]: Cache miss for key: ptx-22328-key8fcea55469fcc8c3380e4cbebe3b51e2-sm_50-rtc0-drv451.48
[ 2][COMPILE FEEDBACK]: COMPILE ERROR: Malformed PTX input. See compile details for more information.
Error: Invalid target architecture. Maximum feasible for current context: sm_50, found: sm_60

Caught exception: OPTIX_ERROR_INVALID_PTX: Optix call ‘optixModuleCreateFromPTX( state.context, &module_compile_options, &state.pipeline_compile_options, ptx.c_str(), ptx.size(), log, &sizeof_log, &state.ptx_module )’ failed: C:\ProgramData\NVIDIA Corporation\OptiX SDK 7.1.0\SDK\optixPathTracer\optixPathTracer.cpp:716)
Log:
COMPILE ERROR: Malformed PTX input. See compile details for more information.
Error: Invalid target architecture. Maximum feasible for current context: sm_50, found: sm_60

Specs:
GTX 750Ti
Windows 10 64bit
CUDA 11.0
451.48 driver

Has support for Maxwell cards been dropped with this latest release?

Nope, the OptiX 7.1.0 Release Notes still contain this:
All NVIDIA GPUs of Compute Capability 5.0 (Maxwell) or higher are supported.

That looks to be an oversight, maybe left over when trying to suppress CUDA 11 deprecation warnings about SM 5.0.
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#deprecated-features

You should be able to fix that locally. Just search all OptiX SDK 7.1.0 CMakeLists.txt files for 60.

Looks like OptiX SDK 7.1.0\SDK\CMakeLists.txt sets it. Check lines 165 and 208 which set the architecture to SM 6.0
Change that to -arch sm_50 and -arch compute_50 respectively and you should be fine, except for CUDA 11 deprecation warnings.

1 Like

Thanks a lot Detlef! That worked :)