[places] Add checked execution grid reshaping#9898
Conversation
Preserve linear place order while changing grid coordinates, and provide a convenience operation for collapsing contiguous axes. Reject malformed grid shapes before they can produce inconsistent indexing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesAdds Grid transformations
Suggested labels: Suggested reviewers: Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cudax/include/cuda/experimental/__places/places.cuh (1)
1539-1541: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winimportant:
make_grid(::std::vector<exec_place>)still aborts onplaces.empty()in debug builds because of_CCCL_ASSERT, so callers can’t rely onstd::invalid_argumenthere. Drop the assertion and add a regression test formake_grid({}).
🧹 Nitpick comments (1)
docs/cudax/places.rst (1)
437-465: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: Document that reshape rejects zero extents and that collapse requires
0 <= first <= last < 4, withstd::invalid_argumentfor violations. The current text explains semantics but omits the invocation constraints. As per path instructions, focus on technical accuracy and API/version consistency for documentation changes.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 74863ac0-8edd-4349-97f7-7d989ecc9518
📒 Files selected for processing (2)
cudax/include/cuda/experimental/__places/places.cuhdocs/cudax/places.rst
|
/ok to test c93c5f6 |
|
/ok to test 7aa089a |
🥳 CI Workflow Results🟩 Finished in 1h 03m: Pass: 100%/57 | Total: 1d 01h | Max: 1h 03m | Hits: 14%/188486See results here. |
Summary
exec_place::reshape()to change grid coordinates while preserving linear place ordercollapse_axes()for merging contiguous processor-grid axesTest plan
pre-commit run --files cudax/include/cuda/experimental/__places/places.cuh docs/cudax/places.rstcmake --build build/preset-latest --target cudax.test.places.unittest_headers.__places.places -j 4ctest --test-dir build/preset-latest --output-on-failure -R '^cudax\.test\.places\.unittest_headers\.__places\.places$'