Skip to content

Commit 3ed60f6

Browse files
authored
Simplify cuda_async_view_memory_resource constructor (#2055)
This replaces a check for async pool support with an equivalent utility function. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Mark Harris (https://github.com/harrism) - Nghia Truong (https://github.com/ttnghia) URL: #2055
1 parent f689207 commit 3ed60f6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cpp/include/rmm/mr/device/cuda_async_view_memory_resource.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ class cuda_async_view_memory_resource final : public device_memory_resource {
5757
}()}
5858
{
5959
// Check if cudaMallocAsync Memory pool supported
60-
auto const device = rmm::get_current_cuda_device();
61-
int cuda_pool_supported{};
62-
auto result =
63-
cudaDeviceGetAttribute(&cuda_pool_supported, cudaDevAttrMemoryPoolsSupported, device.value());
64-
RMM_EXPECTS(result == cudaSuccess && cuda_pool_supported,
60+
RMM_EXPECTS(rmm::detail::runtime_async_alloc::is_supported(),
6561
"cudaMallocAsync not supported with this CUDA driver/runtime version");
6662
}
6763

0 commit comments

Comments
 (0)