Repository navigation
Tests: keep the ROCm packed attention tests passing now that torch varlen runs there - #18362
Merged
Merged
Conversation
test_rocm_keeps_windowed_rows_off_flash_attn fakes torch.version.hip on a CUDA card. Now that ROCm can use torch's varlen once it passes the self-check, that check passes on the real card and torch varlen takes the rows before the flash-attn backend the test is about, so both cases failed. Pin torch's varlen off in the test, as on a ROCm build whose self-check failed.
On ROCm the int32 split test now runs torch's flash varlen (the self-check turns it on), and on Windows gfx1151 AOTriton rounds a bf16 ulp differently between the grouped and the whole-row launch (max abs diff 0.0078). CUDA keeps the exact comparison; ROCm compares within the self-check's 0.02 x max + 1e-3.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Follow-up to #18313. Two tests in
tests/test_hf_packed_attention.pyfail on ROCm since #18313 turned torch's flash varlen on there (seen on gfx1151 Linux and Windows 11). Test-only change, no library code touched.test_rocm_keeps_windowed_rows_off_flash_attnfakestorch.version.hipto test the flash-attn window gate. On a card where ROCm: use flash varlen for packed rows so hybrid packing is faster than padding #18313's self-check now passes, packed rows take torch varlen instead and never reach the flash-attn backend the test checks, so both window cases failed (B200 with ROCm faked, and gfx1151 Linux). The test now pins torch varlen off (_TORCH_VARLEN = [None]), the case it was written for. Removing the window gate still makes it fail, so it keeps guarding that gate.test_int32_guard_splits_documents_instead_of_the_dense_fallback[torch-*]now runs on ROCm and asserts bit equality between the split and whole-row results. AOTriton rounds one bf16 step (0.0078) differently per launch shape on Windows. CUDA keeps the exact comparison; ROCm uses the same tolerance as ROCm: use flash varlen for packed rows so hybrid packing is faster than padding #18313's self-check.AMD CI (oobabooga/unsloth) Windows rerun 44340636929 with both changes: 117 passed, 0 failed in this file; without them it fails 4.