Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Fix bad cast in util_device. #404

Merged
merged 1 commit into from
Dec 14, 2021
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
8 changes: 3 additions & 5 deletions cub/util_device.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,9 @@ CUB_RUNTIME_FUNCTION inline cudaError_t PtxVersionUncached(int& ptx_version)
#if CUB_INCLUDE_HOST_CODE
cudaFuncAttributes empty_kernel_attrs;

do {
if (CubDebug(result = cudaFuncGetAttributes(&empty_kernel_attrs, empty_kernel)))
break;
}
while(0);
result = cudaFuncGetAttributes(&empty_kernel_attrs,
reinterpret_cast<void*>(empty_kernel));
CubDebug(result);

ptx_version = empty_kernel_attrs.ptxVersion * 10;
#endif
Expand Down