Add cudax::distributed and cudax::returned_to specifiers for cooperative algorithms#9862
Conversation
| { | ||
| enum class broadcasted_t : unsigned char | ||
| template <class _Derived> | ||
| class __result_policy_base |
There was a problem hiding this comment.
I wanted a common base class so that algorithms which handle multiple result policies can define the parameter as:
template <class Policy, ...>
algorithm(__result_policy_base<Policy> __res, ...)instead of a generic T
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe result policy utility adds ChangesResult policy integration
Suggested reviewers: Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d62a5015-08a4-4069-b0ec-64ecb1bb14b1
📒 Files selected for processing (3)
cudax/include/cuda/experimental/__coop/any_of.cuhcudax/include/cuda/experimental/__coop/reduce.cuhcudax/include/cuda/experimental/__utility/result_policy.cuh
cudax::distributed and cudax::returned_to specifiers for cooperative algorithms
0a52594 to
2a09676
Compare
This comment has been minimized.
This comment has been minimized.
4550350 to
76fdc8d
Compare
This comment has been minimized.
This comment has been minimized.
76fdc8d to
75d98f9
Compare
This comment has been minimized.
This comment has been minimized.
5c3e4da to
e2632e7
Compare
🥳 CI Workflow Results🟩 Finished in 47m 31s: Pass: 100%/57 | Total: 8h 11m | Max: 47m 28s | Hits: 79%/47414See results here. |
Description
Add 2 more specifiers:
cudax::distributedcudax::returned_to(rank)For use in cooperative/distributed algorithms. These are in addition to
cudax::broadcastedwhich allow the algorithm to specify how results are distributed across the participating callers.broadcasted: All participating ranks will receive an identical result.returned_to(rank): Only the specified rank will receive the result. All other ranks receive either no result or undefined values. It is up to the algorithm to define their precise value.distributed: All participating ranks receive some slice of the result. For example when sorting, all ranks will receive a slice of the globally sorted array. Or when doing an exclusive/inclusive scan, all ranks will receive their portion of the global scan.Checklist