Function hip_sys::hiprt::hipCtxGetApiVersion
source · pub unsafe extern "C" fn hipCtxGetApiVersion(
ctx: *mut ihipCtx_t,
apiVersion: *mut i32
) -> hipError_tExpand description
@brief Returns the approximate HIP api version.
@param [in] ctx Context to check @param [out] apiVersion
@return #hipSuccess
@warning The HIP feature set does not correspond to an exact CUDA SDK api revision. This function always set *apiVersion to 4 as an approximation though HIP supports some features which were introduced in later CUDA SDK revisions. HIP apps code should not rely on the api revision number here and should use arch feature flags to test device capabilities or conditional compilation.
@see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice