[Bugfix][Triton] Avoid RDNA4 unified attention LDS overflow - #4385
Open
hogeheer499-commits wants to merge 1 commit into
Open
[Bugfix][Triton] Avoid RDNA4 unified attention LDS overflow#4385hogeheer499-commits wants to merge 1 commit into
hogeheer499-commits wants to merge 1 commit into
Conversation
Signed-off-by: JS van Dijk <267467744+hogeheer499-commits@users.noreply.github.com>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
hogeheer499-commits
marked this pull request as ready for review
July 25, 2026 20:13
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
Prevent the Triton 3D unified-attention kernel from selecting a two-stage
configuration whose staged K/V tiles already consume the full 64 KiB LDS
budget on
gfx1200andgfx1201.Motivation
With a 256-wide BF16 KV head and
TILE_SIZE=64, Triton 3.6 reports:The K/V tiles alone require 64 KiB at two stages, leaving no room for Triton's
256-byte scratch allocation. This causes a hard startup failure in the
downstream vLLM report.
The Qwen3.6-27B model from that report uses a 256-wide full-attention head:
https://huggingface.co/Qwen/Qwen3.6-27B-FP8/blob/main/config.json
Changes
gfx1200andgfx1201only when that footprint reaches the64 KiB LDS limit.
gfx1151.the configurations that must remain unchanged.
Testing
7 passed:pytest op_tests/triton_tests/attention/test_unified_attention.py -k test_select_3d_config_respects_rdna_lds_limit -qgfx1200andgfx1201:gfx1151execution:numerical comparison
gfx1201selector path uses one stage and also passes thenumerical comparison
git diff --checkpass.I do not have native
gfx1200/gfx1201hardware, so the affected targets werecompiler-validated with Triton's architecture override. Native RDNA4 CI or
maintainer validation would still be valuable.
No new dependencies or breaking changes.
Fixes #4329.