Feature/rle pipeline smem staging#8
Open
vyasr wants to merge 6 commits into
Open
Conversation
…next_chunked Implements task D of the chunked-smem-staging plan: double-buffered SMEM staging via cuda::pipeline in rle_stream::decode_next_chunked, addressed by chunk_size (4096 bytes). Broadcasts thread-0's cur offset through __shared__ before collective pipeline ops to avoid per-thread cur divergence and pipeline deadlock. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…_levels_kernel Implements task E of the chunked-smem-staging plan: preprocess_levels_kernel allocates pipeline_shared_state<2> and wires it to rle_stream::set_pipeline for both REPETITION and DEFINITION decoders. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Adds 4 targeted correctness tests for the chunked-RLE-staging path in preprocess_levels_kernel (Tasks D+E+F): - ExactBoundary: page rows == N * chunk_size - SingleLongLiteralRun: >32K rows in one RLE literal run - SkipAhead: skip_rows before decode_next_chunked - ZeroLengthPage: 0 rows after row-group filter
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…tream Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Split get_vlq32 into an offset+accessor primary and a thin pointer-cursor adapter. Callers that read from a moving global pointer are unchanged; the accessor form lets the chunked-expand path dispatch each byte between the double-buffered SMEM staging chunks and the raw global-mem fallback without duplicating the VLQ state machine. Removes the get_vlq32_at lambda inside rle_stream_chunked::decode_next in favor of the shared implementation.
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.
This PR implements a two-staged pipelining approach for filling shared memory buffers with run data for warps to consume. I did some coarse sweeps of how much smem to allocate to different stages, but the deltas were not huge, so there's probably limited room for this approach to help us without bigger kernel-level changes.