project6-dev
|
4c365b8c03
|
feat(CCCL): device-level CUB algorithms for MoE dispatch
Add complete CCCL CUB header tree (1394 files) to cccl_preload/include/:
- cub/device/ — DeviceRadixSort, DeviceScan, DeviceHistogram, DeviceReduce, DeviceSelect
- cub/agent/ — all agent implementations (sort, scan, reduce, histogram, etc)
- cub/block/ — BlockScan, BlockReduce, BlockExchange, BlockLoad, BlockStore, etc
- cub/warp/ — WarpScan, WarpReduce, WarpExchange, WarpMergeSort
- cub/thread/ — thread-level operators
- thrust/ — sort_by_key, iterator utilities
- cuda/ — execution, stream, memory_resource, functional
New kernel: cccl_moe_sort_scatter.cu
- Uses CUB DeviceRadixSort::SortPairs to sort (expert_id, token_idx) pairs
- O(n) radix sort replaces O(n log n) torch.argsort in MoE prefill path
- Boundary detection + fill for expert offsets/sizes
- Compiled against CCCL upstream headers (not corex CUB) to avoid BI-V100 bugs
Previously only 288 CCCL headers (CachingDeviceAllocator only).
Now 1394 headers — full CUB device-level algorithm stack available for
all future kernels.
|
2026-08-13 11:18:52 +00:00 |
|
dylanyunlon
|
8d6f9eaeb0
|
feat: CCCL CachingDeviceAllocator preload — 完整依赖链 288 files
从 cccl_upstream 递归追踪 cub/util_allocator.cuh 的全部 include 依赖:
cub/ 9 files (config, util_*, version, detect_cuda_runtime)
cuda/ libcudacxx type_traits, concepts, algorithm, iterator...
nv/ target macros, preprocessor
总计 288 个头文件 (1.4MB),打包到 include/ 目录,编译时 -I include
即可完全脱离 CCCL 原始目录结构。
.cu 文件直接 #include <cub/util_allocator.cuh>,
走原版 CUB CachingDeviceAllocator,零 mock。
BI-V100 参数: growth=2 bins=[8..32] max_cached=8GB/device
|
2026-08-13 09:26:41 +00:00 |
|