You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cuda.parallel doesn't use these optimizations, because generic operators are not classified as, say, cuda::std::plus.
Describe the solution you'd like
cuda.parallel should have a way of recognizing standard operators and mapping them to underlying C++ concepts.
Describe alternatives you've considered
This problem can be split into the interface and implementation components.
On the interface end, one way to achieve that would be through different overloads #2542.
But we can also consider introspecting the operator, or recognizing built-in functions like sum on Python end.
Regardless, before addressing the interface question, we need a machinery to support it on the implementation end.
This issue can be closed by a prototype of an operator specialization machinery that'd allow cuda.parallel to request standard operators like cuda::std::plus, cuda::minimum, cuda::maximum, etc.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is this a duplicate?
Area
cuda.parallel (Python)
Is your feature request related to a problem? Please describe.
Currently, cuda.parallel only provides generic version of parallel reduction:
cccl/python/cuda_parallel/cuda/parallel/experimental/algorithms/reduce.py
Lines 167 to 172 in 83b10c2
On the C++ end, we have specialized code paths for some operators:
cccl/cub/cub/warp/specializations/warp_reduce_shfl.cuh
Lines 610 to 625 in 83b10c2
cuda.parallel doesn't use these optimizations, because generic operators are not classified as, say,
cuda::std::plus
.Describe the solution you'd like
cuda.parallel should have a way of recognizing standard operators and mapping them to underlying C++ concepts.
Describe alternatives you've considered
This problem can be split into the interface and implementation components.
On the interface end, one way to achieve that would be through different overloads #2542.
But we can also consider introspecting the operator, or recognizing built-in functions like
sum
on Python end.Regardless, before addressing the interface question, we need a machinery to support it on the implementation end.
This issue can be closed by a prototype of an operator specialization machinery that'd allow cuda.parallel to request standard operators like
cuda::std::plus
,cuda::minimum
,cuda::maximum
, etc.Additional context
No response
The text was updated successfully, but these errors were encountered: