Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify PtxVersion and SmVersion #2004

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading