Repository navigation
Conversation
The scan partitioner runs each chunk of the first and third steps as a task of its own, which now has the size of count iterations of the step's function. inclusive_scan and exclusive_scan size both steps by op called with the result so far and an element, the transform scans size the first step by the transformation. copy_if, partition_copy and unique_copy size the first step by the predicate or the comparison, their third step only copies elements and has no size. Signed-off-by: Hartmut Kaiser <[email protected]>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Algorithm task-size estimates libs/core/algorithms/include/hpx/parallel/algorithms/{copy,partition,unique}.hpp, libs/core/algorithms/include/hpx/parallel/algorithms/*scan.hpp |
The algorithms estimate task sizes from operation, predicate, projection, and iterator types. They attach estimates to selected scan-partitioner steps. |
Chunk-based task sizing libs/core/algorithms/include/hpx/parallel/util/scan_partitioner.hpp |
The partitioner adds sized_chunk and uses it to scale task sizes by each chunk’s iteration count. |
Task-size test coverage libs/core/algorithms/tests/unit/task_sizes/CMakeLists.txt, libs/core/algorithms/tests/unit/task_sizes/task_sizes_scans.cpp |
The test target checks task sizes for scans, transform scans, copy_if, partition_copy, and unique_copy, including cases that expect an unknown size. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Possibly related issues
- TheHPXProject/hpx issue 7837: This issue defines the task-size mechanism for scheduler decisions. This change applies task-size metadata to scan-partitioner tasks in the listed algorithms.
Suggested reviewers: dimitraka, v4xsh
Merge Risk: 
Minimal · up to 2fa18
-
No merge-blocking issue was identified in the scan task-sizing changes.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 9 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Up to standards ✅🟢 Issues
|
This is the fourth part of the task-size series (#7926, #7946, #7947), it applies on top of #7947 and is independent of the other open parts.
The scan partitioner runs each chunk of the first and third steps as a task of its own. These tasks now have the size of the iterations of their chunk: count calls of the step's function.
inclusive_scan, exclusive_scan and their transform variants size their steps by op called with the result so far and an element, the transform variants size the first step by the transformation. copy_if, partition_copy and unique_copy size the first step by the predicate or the comparison of two elements, their third step only copies the selected elements and stays unsized.
Tests: the new task_sizes_scans test and the existing tests of the changed algorithms pass on Windows.