From 3ce5bff10f8da9a7e2a3a9c5be8a574640199bbb Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 13 Aug 2026 10:36:27 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20use=20cccl=5Fpreload::cub=20namespace=20?= =?UTF-8?q?=E2=80=94=20CUB=5FWRAPPED=5FNAMESPACE=20requires=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- qwen3_6_scripts/cccl_preload/build_cccl_preload.sh | 1 + qwen3_6_scripts/cccl_preload/cccl_allocator_preload.cu | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qwen3_6_scripts/cccl_preload/build_cccl_preload.sh b/qwen3_6_scripts/cccl_preload/build_cccl_preload.sh index 30149448..f48cd0ce 100755 --- a/qwen3_6_scripts/cccl_preload/build_cccl_preload.sh +++ b/qwen3_6_scripts/cccl_preload/build_cccl_preload.sh @@ -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 diff --git a/qwen3_6_scripts/cccl_preload/cccl_allocator_preload.cu b/qwen3_6_scripts/cccl_preload/cccl_allocator_preload.cu index 50061632..47b33448 100644 --- a/qwen3_6_scripts/cccl_preload/cccl_allocator_preload.cu +++ b/qwen3_6_scripts/cccl_preload/cccl_allocator_preload.cu @@ -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,