Skip to main content

cudaDriverGetVersion

Function cudaDriverGetVersion 

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

Returns the latest version of CUDA supported by the driver.

Returns in *driverVersion the latest version of CUDA supported by the driver. The version is returned as (1000 major + 10 minor). For example, CUDA 9.2 would be represented by 9020. If no driver is installed, then 0 is returned as the driver version.

This function automatically returns cudaError_t::CUDA_ERROR_INVALID_VALUE if driverVersion is NULL.

Note that this function may also return error codes from previous, asynchronous launches.

Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.

Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.

§Parameters

  • driverVersion: Returns the CUDA driver version.

§Return value

See also: cudaRuntimeGetVersion, cuDriverGetVersion.