How to support wide range of drivers - CUDA SDK version VS driver version


  1. If some application build with latest CUDA SDK (pure CUDA, without usage of CURAND or other libs) - it will not run on older drivers because of “CUDA driver version is insufficient for CUDA runtime version”, but many users can’t easily update their driver.

  2. In the same time old CUDA SDKs are not updated after some time (at least I think so), so they have bugs. Also sometimes new CUDA SDKs have new features and better compiler optimizations which could speed up computations.

So I see two corner cases - to compile with very old CUDA SDK and enjoy wide range of supported drivers, or to use latest CUDA SDK and enjoy new features and bug fixes but you will need to insist on driver update from users, which is not always possible (notebooks, fixed environment and so on).

I see only one workaround - build application twice - with old and with fresh SDKs. One application build will be fast and have all features, and another one will be for fallback in case of old drivers. But I want to have these two versions in the same build (for example this is possible with OpenCL with checking available OpenCL version).

Are there any recommended solution? May be some way to build fat binary with support for old drivers exists?

P.S. Approximate table of correspondence between CUDA SDK and minimum driver required you can see here.

The situation you describe is common where layered software stacks are used. Two common approaches are:

(1) Do the same thing CUDA does: Version your application, with each version requiring either a minimum or a specific CUDA version and/or GPU compute capability.

(2) Do not chase the latest CUDA version. Stick to an older CUDA version until your application absolutely requires features from a newer CUDA version. I have seen companies stick to the same tool chain for up to five years or so.