Optix compiled with nvcc 13.4 and executed with R580, supported?

I ran our OptiX application built with a CUDA toolkit newer than the installed driver supports, and was surprised that it works. The CUDA compatibility guide says applications that compile device code to PTX will not work on older drivers, and an earlier answer here ( OptiX 8 Module Creation Version Mismatch? ) recommends keeping the toolkit version at or below what `cudaDriverGetVersion` reports.

The reason for the experiment is that I would like to use cuda 13.x features in vanilla cuda kernels within the application (or at least compile with cuda toolkit 13.x), but need to deploy to R580 machines. Currently the application is not using anything beyond cuda 12.

I setup and confirmed the following:

  • RHEL8 system
  • nvcc 13.4.3 → PTX .version 9.4 for all OptiX modules (checked in the generated .ptx)
  • Driver 580.178.04 (CUDA 13.0 per nvidia-smi), NVIDIA A40-12Q vGPU, OptiX 9.0 headers
  • optixModuleCreate succeeds for all modules and our full scenario test suite passes

Questions

  1. Is it supported behavior that the OptiX implementation in an R580 driver accepts PTX with a higher ISA version (9.4) than the driver’s CUDA version (13.0 / PTX 9.0)? Can we rely on it for shipping, or is it incidental?
  2. If it is supported: what is the actual constraint? (e.g. “any PTX ISA version as long as only instructions known to the driver’s OptiX compiler are used”, or a documented maximum)

Hi @john.2,

Currently yes we try to accept PTX generated by a new toolkit as long as all the instructions in it are supported by the older toolkit used for the driver you’re targeting, so your guess is pretty close.

Note that this means newer drivers and/or code changes and features in the newer nvcc or toolkits could break you or your users when something changes, despite our best efforts to maintain compatibility. So the official answer I have to give is that the CUDA compatibility guide is correct. While we try to keep newer PTX working, it is only internally supported and not publicly supported or guaranteed, so you technically cannot rely on this for shipping, it is effectively an incidental implementation detail at the moment.

That said, if you’re temporarily in a tight spot with a maximum driver requirement and it’s working in your testing, it might work just fine for your release, until the machines you’re deploying to are able to upgrade to an officially supported driver. Just keep in mind I’m speculating and not recommending that path, your mileage may vary. ;)

–
David.