fix(CCCL): split compilation to isolate CCCL headers from torch/corex
Two problems from real BI-V100 build:
1. 'CUDA versions below 12 are not supported'
→ Add CCCL_IGNORE_DEPRECATED_CUDA_BELOW_12 (official suppress macro)
2. corex thrust/complex.h conflicts with CCCL thrust headers
→ Split into two compilation units:
- cccl_moe_sort_scatter.cu: CCCL headers only, C API, no torch
- cccl_moe_sort_scatter_pybind.cpp: torch headers only, no CCCL
Same pattern as proven cccl_allocator_preload.cu
3. Variadic device functions rejected by corex clang:
→ is_referenceable.h: __test(...) → __test(long)
→ invoke.h: __any(...) → template __any(_T)
→ conjunction.h: __and_helper(...) → __and_helper(long)
SFINAE still works: int overload wins, long is fallback.
This commit is contained in:
@@ -43,7 +43,8 @@ _CCCL_BEGIN_NAMESPACE_CUDA_STD
|
||||
|
||||
struct __any
|
||||
{
|
||||
_CCCL_API inline __any(...);
|
||||
template <class _T>
|
||||
_CCCL_API inline __any(_T);
|
||||
};
|
||||
|
||||
template <class _DecayedFp>
|
||||
|
||||
@@ -35,7 +35,7 @@ template <class... _Pred>
|
||||
_CCCL_HOST_DEVICE __expand_to_true<enable_if_t<_Pred::value>...> __and_helper(int);
|
||||
|
||||
template <class...>
|
||||
_CCCL_HOST_DEVICE false_type __and_helper(...);
|
||||
_CCCL_HOST_DEVICE false_type __and_helper(long);
|
||||
|
||||
// _And always performs lazy evaluation of its arguments.
|
||||
//
|
||||
|
||||
@@ -39,7 +39,7 @@ struct __cccl_is_referenceable_impl
|
||||
template <class _Tp>
|
||||
_CCCL_HOST_DEVICE static _Tp& __test(int);
|
||||
template <class _Tp>
|
||||
_CCCL_HOST_DEVICE static false_type __test(...);
|
||||
_CCCL_HOST_DEVICE static false_type __test(long);
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
|
||||
Reference in New Issue
Block a user