Repository navigation
Segmented scan agent with multiple segments per block - #6712
Open
oleksandr-pavlyk wants to merge 43 commits into
Open
oleksandr-pavlyk wants to merge 43 commits into
oleksandr-pavlyk wants to merge 43 commits into
Conversation
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
oleksandr-pavlyk
force-pushed
the
segmented-scan-agent-with-multiple-segments-per-block
branch
3 times, most recently
from
November 25, 2025 18:09
87fccc2 to
ea8e25b
Compare
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
oleksandr-pavlyk
force-pushed
the
segmented-scan-agent-with-multiple-segments-per-block
branch
from
November 26, 2025 21:38
ea8e25b to
85c74bc
Compare
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
oleksandr-pavlyk
force-pushed
the
segmented-scan-agent-with-multiple-segments-per-block
branch
from
November 28, 2025 16:31
63b6ae3 to
bcf2e58
Compare
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
/ok to test |
1 similar comment
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
oleksandr-pavlyk
force-pushed
the
segmented-scan-agent-with-multiple-segments-per-block
branch
from
November 30, 2025 17:38
10e7ccb to
5aee1ed
Compare
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
oleksandr-pavlyk
force-pushed
the
segmented-scan-agent-with-multiple-segments-per-block
branch
from
December 4, 2025 17:16
5aee1ed to
f66ffea
Compare
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
oleksandr-pavlyk
force-pushed
the
segmented-scan-agent-with-multiple-segments-per-block
branch
from
February 10, 2026 22:36
f66ffea to
125c54c
Compare
Exit early if remaining work is out of bound. Clamp amount of the segments for this thread to process to avoid probing out of bound.
This is to make it clear that max_segments_per_warp is the natural kernel tuning parameter. It is independent from max_segments_per_block.
1. Use _CCCL_DEDUCTION_GUIDE_ATTRIBUTES instead of _CCCL_DEVICE 2. Avoid allocating __shared__ temp-storage of empty type. 3. Add assertion that access to input/output offsets in multi-segment sequential iterator is done on a non-exhausted iterator.
oleksandr-pavlyk
force-pushed
the
segmented-scan-agent-with-multiple-segments-per-block
branch
from
July 6, 2026 15:33
e06e119 to
9906f29
Compare
This comment has been minimized.
This comment has been minimized.
…t-with-multiple-segments-per-block
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…t-with-multiple-segments-per-block
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
⏱️ CCCL compile-time benchmark comparison: Public headers compile-time benchResult: 0 regression row(s), 2 improvement row(s) above threshold.
Artifacts: reports and traces Direct file processing
🟢 Direct file processing — Improvements
|
Contributor
🥳 CI Workflow Results🟩 Finished in 1h 41m: Pass: 100%/272 | Total: 3d 14h | Max: 1h 31m | Hits: 83%/229151See results here. |
This branch has not been deployed
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
Closes #6783
Closes #8424
extend
agent_segmented_scanwith ability to to consume multiple segments per blockMaxSegmentsPerBlockwhich controls the size ofOffsetTarray in shared memory dedicated to storing inclusive-scan of segment sizes. The actual number of segments to process is passed dynamically toconsume_rangesmethod. It can not exceedMaxSegmentsPerBlock, however.multi_segment_iteratorclass, which is read- and write- transform iterator.AccumTbyBlockScan, andelement_idtosegment_idandrelative_offset(or rank) is encapsulated into searcher types.segment_id = element_id / segment_size.cuda::std::upper_boundcan be used for larger number of sizes, and linear search using dynamic for-loop for smaller sizesconsume_rangecall is made, which does not reconstruct head-flagsintroduce
agent_warp_segmented_scanwhich closely follows the logic ofagent_segmented_scanthat computes are block-granularity, but using warps to process given number of segmentsintroduce
agent_thread_segmented_scanwhich implement thread-granularity work. Each thread processes requested number of segments.Dispatch layer is modified to take 2 additional parameters (with default values), the number of segments to be processed by a worker (defaults to 1), and the type of worker requested (defaults to block).
This PR implements `cub::detail::segmented_scan::agent_segmented_scan_multiple_segments_per_block`. The agent processes statically known `int SegmentsPerBlock` segments per block in `consume_ranges` method, and implements a tail version as well.Checklist