Conversation
Migrate APIs removed in CCCL 3.0 to their replacements so the same source compiles against both old CCCL 2.x and CCCL 3.x: - cub::Sum/Equality/Max -> cuda::std::plus/equal_to/cuda::maximum (aliased in cub.h under CUB_VERSION >= 300000) - cub::CTA_SYNC() -> __syncthreads() - cub::TransformInputIterator/CountingInputIterator -> thrust::transform_iterator/counting_iterator - cub::LaneId()/LaneMaskLt() -> cuda::ptx::get_sreg_laneid/lanemask_lt - cub::BaseTraits 5-param -> 4-param (guarded by CUB_VERSION) - __thrust_exec_check_disable__ -> _CCCL_EXEC_CHECK_DISABLE Add cccl.cmake CUDA 13 branch that checks out CCCL v3.1.0 and applies util_device.cuh.v3.1.0.patch (inline -> __forceinline__).
| #include <cub/version.cuh> | ||
| // Thrust iterators that replace cub::TransformInputIterator / | ||
| // cub::CountingInputIterator (both removed in CCCL 3.0). | ||
| #include <thrust/iterator/counting_iterator.h> |
There was a problem hiding this comment.
这些 Thrust iterator 头文件只在
__NVCC__ 分支中引入,但本次替换后的 thrust::counting_iterator / thrust::transform_iterator 也会在 __HIPCC__ 路径编译(例如 fused_token_prune_kernel.cu、reduce_function.h)。hipcub/hipcub.hpp 只提供 hipCUB/rocPRIM 迭代器,不会声明这些 thrust 类型,因此 HIP 编译会在这些翻译单元报类型未定义。请把两个 Thrust 头移到 CUDA/HIP 共用分支,或为 HIP 使用对应的 rocThrust 头/命名空间。
| # The latest commit has bugs in windows, so we set a fix commit. | ||
| set(CCCL_TAG 1f6e4bcae0fbf1bbed87f88544d8d2161c490fc1) | ||
| # CUDA 12.0+ uses CCCL 3.1.0; only CUDA < 12.0 keeps the old fix commit. | ||
| if(${CMAKE_CUDA_COMPILER_VERSION} LESS 12.0) |
There was a problem hiding this comment.
Paddle-Bot Review Board (review完成)
| 序号 | 位置 | 优先级 | 规则来源 | 状态 |
|---|---|---|---|---|
| 1 | HIP Thrust 头文件 | 仓库规则:功能正确性与兼容性 | 🚧 | |
| 2 | CUDA 12.x CCCL 分支 | 仓库规则:功能正确性与兼容性 | 🚧 |
Failed CI看板
日志分析报告失败的测试 case: 根本原因分析:
修复建议:
Powered by Nyanpasu with gpt-5.6-luna 默认推理级别, please check the suggestions carefully. |
PR Category
Environment Adaptation
PR Types
Others
Description
-- cub::Sum/Equality/Max -> cuda::std::plus/equal_to/cuda::maximum (aliased in cub.h under CUB_VERSION >= 300000)
是否引起精度变化
否