fix: use cccl_preload::cub namespace — CUB_WRAPPED_NAMESPACE requires it
CUB_DISABLE_NAMESPACE_MAGIC requires CUB_WRAPPED_NAMESPACE. CUB_WRAPPED_NAMESPACE=cccl_preload wraps cub into cccl_preload::cub. Source must use cccl_preload::cub::CachingDeviceAllocator.
This commit is contained in:
@@ -75,6 +75,7 @@ COMMON_FLAGS=(
|
||||
# CUB needs this for non-NVCC compilers
|
||||
-D__CUDA_ARCH_LIST__=700
|
||||
-DCUB_DISABLE_NAMESPACE_MAGIC
|
||||
-DCUB_WRAPPED_NAMESPACE=cccl_preload
|
||||
)
|
||||
|
||||
if [[ "${CXX}" == *clang++* ]]; then
|
||||
|
||||
@@ -41,8 +41,8 @@ static constexpr unsigned int ALLOC_MAX_BIN = 32; /* 4 GB */
|
||||
static constexpr size_t ALLOC_MAX_CACHED = (size_t)8 * 1024 * 1024 * 1024; /* 8GB */
|
||||
|
||||
/* ---- Global allocator singleton ---- */
|
||||
static cub::CachingDeviceAllocator& get_allocator() {
|
||||
static cub::CachingDeviceAllocator instance(
|
||||
static cccl_preload::cub::CachingDeviceAllocator& get_allocator() {
|
||||
static cccl_preload::cub::CachingDeviceAllocator instance(
|
||||
ALLOC_BIN_GROWTH,
|
||||
ALLOC_MIN_BIN,
|
||||
ALLOC_MAX_BIN,
|
||||
|
||||
Reference in New Issue
Block a user