Handle all-empty varlen batches - #32
Open
0z5a wants to merge 2 commits into
Open
Conversation
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.
Summary
cu_seqlenswith repeated offsets.initial_stateinfinal_state, or write zeros when no initial state is supplied.Dependency
This PR is stacked on #29. Until #29 merges, the diff includes its tile-prefix commit; after #29 lands, this PR can be rebased to contain only the empty-batch fix.
Reproduction
On the #29 baseline, mixed-empty batches (leading, middle, or consecutive empty sequences) already pass, while
T_total == 0aborts in the C++ extension when zero-extent TMA descriptors are constructed.Validation
RTX 5080 (SM120):
python -m pytest tests/test_empty_varlen.py -vv— 32 passed, covering mixed/all-empty batches, H=1/4, BF16/FP32 state, and calls with or withoutinitial_state.