Repository navigation
[Bug] Attention with sink shouldn't be dispatched to assembly impl of flash_attn_varlen_func - #6906
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🟡 Changes recommended
Regression tests are needed to verify that both dispatchers bypass assembly and preserve sink arguments in the fallback.
1 open issue
What changed in this PR
This PR prevents sink-enabled attention calls from reaching unsupported v3 assembly kernels on gfx942/gfx950, covering both fixed-length and variable-length attention.
Changes:
- Exclude calls with
sink_ptror nonzerosink_sizefrom v3 assembly dispatch. - Document why sliding-window checks alone do not exclude sink requests.
| File | Description |
|---|---|
aiter/ops/mha.py |
Adds sink eligibility guards to both v3 forward dispatchers. |
Review effort: Balanced
… flash_attn_varlen_func Signed-off-by: Qiang Li <[email protected]>
94d4905 to
7933415
Compare
The v3 ASM gate itself landed in ROCm#6906. This covers hdim 192, North Mini and Command A Plus GQA ratios, and a numeric check that the sink moves the output. Co-authored-by: Cursor <[email protected]>
The test builds an NHD cache, so pin _SHUFFLE_KV_CACHE_ENABLED like the shared-KV test does; it failed with VLLM_ROCM_SHUFFLE_KV_CACHE_LAYOUT=1. Also note the third request's empty chunk and that the hd128 v3 sink drop is fixed in aiter 0.1.28 (ROCm/aiter#6906). Co-authored-by: Claude <[email protected]> Signed-off-by: Andreas Karatzas <[email protected]>
…el (#6893) The v3 ASM gate itself landed in #6906. This covers hdim 192, North Mini and Command A Plus GQA ratios, and a numeric check that the sink moves the output. Co-authored-by: Cursor <[email protected]>

Motivation
This impl doesn't support sink so it should explicitly reject the dispatch. Otherwise it will make models with sinks, like granite, fail on gfx942/950.