Skip to content

Commit

Permalink
Clarify PtxVersion and SmVersion (NVIDIA#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber authored and pciolkosz committed Aug 4, 2024
1 parent 1b14e37 commit 81229fd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cub/cub/util_device.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,9 @@ struct SmVersionCacheTag
{};

/**
* \brief Retrieves the PTX version that will be used on \p device (major * 100 + minor * 10).
* \brief Retrieves the PTX virtual architecture that will be used on \p device (major * 100 + minor * 10).
*
* \note This function may cache the result internally.
*
* \note This function is thread safe.
*/
_CCCL_HOST inline cudaError_t PtxVersion(int& ptx_version, int device)
Expand All @@ -408,10 +407,9 @@ _CCCL_HOST inline cudaError_t PtxVersion(int& ptx_version, int device)
}

/**
* \brief Retrieves the PTX version that will be used on the current device (major * 100 + minor * 10).
* \brief Retrieves the PTX virtual architecture that will be used on the current device (major * 100 + minor * 10).
*
* \note This function may cache the result internally.
*
* \note This function is thread safe.
*/
CUB_RUNTIME_FUNCTION inline cudaError_t PtxVersion(int& ptx_version)
Expand All @@ -438,7 +436,7 @@ CUB_RUNTIME_FUNCTION inline cudaError_t PtxVersion(int& ptx_version)
}

/**
* \brief Retrieves the SM version of \p device (major * 100 + minor * 10)
* \brief Retrieves the SM version (i.e. compute capability) of \p device (major * 100 + minor * 10)
*/
CUB_RUNTIME_FUNCTION inline cudaError_t SmVersionUncached(int& sm_version, int device = CurrentDevice())
{
Expand All @@ -464,10 +462,9 @@ CUB_RUNTIME_FUNCTION inline cudaError_t SmVersionUncached(int& sm_version, int d
}

/**
* \brief Retrieves the SM version of \p device (major * 100 + minor * 10)
* \brief Retrieves the SM version (i.e. compute capability) of \p device (major * 100 + minor * 10).
*
* \note This function may cache the result internally.
*
* \note This function is thread safe.
*/
CUB_RUNTIME_FUNCTION inline cudaError_t SmVersion(int& sm_version, int device = CurrentDevice())
Expand Down

0 comments on commit 81229fd

Please sign in to comment.