[Bugfix] Align SM70 paged prefill accumulators - #226
Merged
Merged
Conversation
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com> (cherry picked from commit e9a7f9a)
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.
Purpose
Port and complete the hardware gate for #123 / #98 on current main. The D=128 paged-prefill FP32 WMMA accumulator buffer started at a 16-byte boundary, while WMMA matrix load/store requires 256-bit (32-byte) alignment. The resulting undefined behavior was observed as run-to-run prefill jitter and could fork greedy output after server restart.
Change
Test Plan
sm_70.Test Result
pytest --confcutdir=tests/kernels/attention tests/kernels/attention/test_sm70_flash_v100_paged_prefill_determinism.py: 2 passed.0.00086688995, mean abs error3.2426e-05, cosine0.9999999404.0.00109624863, mean abs error2.6168e-05, cosine1.0.git diff --checkpassed.Supersedes #123 without changing the kernel algorithm or dispatch.