The OptiX SDK examples should also build with CUDA 9.0 when using the right CMakeLists.txt as root.
The OptiX Release Notes lists the supported CUDA versions.
Below are the relevant excerpts from the OptiX SDK 7.1.0 release notes.
Development Environment Requirements (for compiling with OptiX)
● CUDA Toolkit 7, 8, 9, 10, 11
The OptiX 7.1.0 prebuilt samples on Windows have been built with CUDA 11, but any specified toolkit should work when compiling PTX for OptiX. OptiX uses the CUDA device API, but the CUDA runtime API objects can be cast to device API objects.
For running OptiX applications, the display driver needs to support the CUDA version a specific OptiX version has been built with.
Graphics Driver:
● OptiX 7.1.0 requires that you install a r450+ driver.
● Windows 7/8.1/10 64-bit; Linux RHEL 4.8+ or Ubuntu 10.10+ 64-bit
For OptiX 7.0.0 it’s the following:
Graphics Driver:
● OptiX 7.0.0 requires that you install the 435.80 driver on Windows or the 435.12 Driver for linux… Note
OptiX dll from the SDK are no longer needed since the symbols are loaded from the driver.
● Windows 7/8.1/10 64-bit; Linux RHEL 4.8+ or Ubuntu 10.10+ 64-bit
CUDA Toolkit
● It is not required to have any CUDA toolkit installed to be able to run OptiX-based applications.
Development Environment Requirements (for compiling with OptiX)
● CUDA Toolkit 7, 8, 9, 10
OptiX 7.0.0 has been built with CUDA 10.1, but any specified toolkit should work when compiling PTX for OptiX.
OptiX uses the CUDA device API, but the CUDA runtime API objects can be cast to device API objects.
The examples inside the SDK are beginner level examples and try to show individual features of the OptiX API.
There isn’t a simpler example than optixHello which isn’t even shooting a single ray.
For additional OptiX 7 examples from beginner to advanced level please have a look into the resources linked in the following sticky posts at the top of the OptiX sub-forum:
https://forums.developer.nvidia.com/t/optix-7-1-release/139962
https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/4
Mind that OptiX 7 only supports Maxwell and newer GPU architectures.
CUDA 11.0 dropped support for SM 3.0 and SM 3.2 (Kepler) and deprecated SM 3.5, SM 3.7 (Kepler) and SM 5.0 (first Maxwell). That should all not be an issue with CUDA 9 or 10.
The OptiX 7.1 examples build their PTX code with SM 6.0 (Pascal) to avoid the CUDA 11 deprecation warnings.
When targeting Maxwell GPUs, you’d need to set the SM version back to 5.0.
https://forums.developer.nvidia.com/t/optix-7-1-issue-with-running-samples-on-a-maxwell-card/140118/2