Skip to main content

cudaRuntimeGetVersion

Function cudaRuntimeGetVersion 

Source
pub unsafe extern "C" fn cudaRuntimeGetVersion(
    runtimeVersion: *mut c_int,
) -> cudaError_t
Expand description

Returns the CUDA Runtime version.

Returns in *runtimeVersion the version number of the current CUDA Runtime instance. The version is returned as (1000 major + 10 minor). For example, CUDA 9.2 would be represented by 9020.

As of CUDA 12.0, this function no longer initializes CUDA. The purpose of this API is solely to return a compile-time constant stating the CUDA Toolkit version in the above format.

As of CUDA 13.0, on Windows, the runtimeVersion may not be the same as the CUDA Toolkit version the app was built with. Windows will use the CUDA Runtime packaged with the display driver, and that version will be reported.

This function automatically returns cudaErrorInvalidValue if the runtimeVersion argument is NULL.

ยงParameters

  • runtimeVersion: - Returns the CUDA Runtime version.