Revise Sort lowering and sort_actor assumptions#22315
Merged
rapids-bot[bot] merged 13 commits intorapidsai:mainfrom Apr 29, 2026
Merged
Revise Sort lowering and sort_actor assumptions#22315rapids-bot[bot] merged 13 commits intorapidsai:mainfrom
Sort lowering and sort_actor assumptions#22315rapids-bot[bot] merged 13 commits intorapidsai:mainfrom
Conversation
mroeschke
reviewed
Apr 28, 2026
mroeschke
reviewed
Apr 28, 2026
mroeschke
approved these changes
Apr 29, 2026
Member
Author
|
/merge |
3 tasks
vyasr
pushed a commit
to vyasr/cudf
that referenced
this pull request
May 4, 2026
- Closes rapidsai#22050 - **Updates `Sort` lowering**: - The "rapidsmpf" runtime no longer uses `Sort(ShuffleSorted(Sort(...)))` - We leave most `Sort` nodes alone. - We map `Sort` directly to `sort_actor` - The `sort_actor` performs it's own top/bottom-k optimization and performs chunk-wise sorting itself. **Motivation**: The `Sort(ShuffleSorted(Sort(...)))` pattern will be too messy when we start utilizing `OrderScheme` metadata (after rapidsai#22291). The current assumption that the child IR node is always a `Sort` is also not true/safe. **Note**: This PR technically adds code, but it will allow us to *remove* more code once "tasks" is removed (everything `ShuffleSorted` related). Authors: - Richard (Rick) Zamora (https://github.com/rjzamora) Approvers: - Matthew Roeschke (https://github.com/mroeschke) URL: rapidsai#22315
rapids-bot Bot
pushed a commit
that referenced
this pull request
May 7, 2026
- Follow up to #22315 - Further revises `sort_actor` in preparation for rapidsai/rapidsmpf#853 - Part of #22128 - Breaks apart `sort_actor` logic into modular steps, so we can avoid collecting boundaries when we already know the boundaries (future work). Authors: - Richard (Rick) Zamora (https://github.com/rjzamora) Approvers: - Matthew Murray (https://github.com/Matt711) - Matthew Roeschke (https://github.com/mroeschke) URL: #22350
galipremsagar
pushed a commit
to galipremsagar/cudf
that referenced
this pull request
May 8, 2026
…sai#22350) - Follow up to rapidsai#22315 - Further revises `sort_actor` in preparation for rapidsai/rapidsmpf#853 - Part of rapidsai#22128 - Breaks apart `sort_actor` logic into modular steps, so we can avoid collecting boundaries when we already know the boundaries (future work). Authors: - Richard (Rick) Zamora (https://github.com/rjzamora) Approvers: - Matthew Murray (https://github.com/Matt711) - Matthew Roeschke (https://github.com/mroeschke) URL: rapidsai#22350
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Sortlowering:Sort(ShuffleSorted(Sort(...)))- We leave mostSortnodes alone.Sortdirectly tosort_actor- Thesort_actorperforms it's own top/bottom-k optimization and performs chunk-wise sorting itself.Motivation: The
Sort(ShuffleSorted(Sort(...)))pattern will be too messy when we start utilizingOrderSchememetadata (after #22291). The current assumption that the child IR node is always aSortis also not true/safe.Note: This PR technically adds code, but it will allow us to remove more code once "tasks" is removed (everything
ShuffleSortedrelated).Checklist