CUDA 9.2 runtime/driver version mismatch

I have CUDA 9.2.88 installed on Ubuntu 16.04.04 using the Debian packages from NVIDIA’s repo. When I query the CUDA runtime version via cudaRuntimeGetVersion, I get 9000; when I query the driver version via cudaDriverGetVersion, I get 9020. I also noticed that cufftGetVersion returns 9000. Is this discrepancy expected? Aside from version 396.26-0ubuntu1 of the NVIDIA driver package, I don’t have any other versions of libcuda.so on my system.

My motivation for asking is determining which version number to use for determining whether a certain feature is present; cufftSetCompatibilityMode was removed in CUDA 9.1 (see [url]https://docs.nvidia.com/cuda/cufft/index.html#unique_1820586464[/url]).

cufftGetVersion() would typically match the version of your installed CUDA toolkit and runtime, as the toolkit comes bundled with cuFFT and the runtime libraries.

But you might need a compile-time version check to prevent using unavailable/deprecated API functions. The CUDART_VERSION #define might be the right one. The define would indicate 1000 x major + 10 x minor version, e.g. 7050 for CUDA toolkit 7.5

Christian