Skip to content

Fuse block-banking cat into attn_res_gate via close_block/WRITE_BLOCK… - #4726

Open
yanxuer-999 wants to merge 2 commits into
ROCm:mainfrom
yanxuer-999:attn_cat_fuse
Open

Fuse block-banking cat into attn_res_gate via close_block/WRITE_BLOCK…#4726
yanxuer-999 wants to merge 2 commits into
ROCm:mainfrom
yanxuer-999:attn_cat_fuse

Conversation

@yanxuer-999

Copy link
Copy Markdown
Contributor

…_CAT

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

…_CAT

Co-authored-by: Cursor <cursoragent@cursor.com>
@yanxuer-999
yanxuer-999 requested a review from a team August 13, 2026 07:53
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 4726 --add-label <label>

@zufayu
zufayu requested a review from vgokhale August 14, 2026 01:31
- Skip redundant reshape()/contiguous() dispatcher calls in attn_res_gate
  when q/prefix/block_residual/add_hidden* are already the exact
  shape/layout the kernel wants (the common case for ATOM's AttnRes,
  whose inputs are already contiguous from the previous layer).
- Guard the per-call ATTN_RES_GATE debug log behind isEnabledFor(INFO)
  so f-string formatting isn't paid on every call when info logging is
  disabled.
- Add ATTN_RES_TRITON_AUTOTUNE (default off), an fla-style live-search
  escape hatch that wraps attnres_fwd_kernel with @triton.autotune over
  (BL, num_warps, num_stages). Production still uses the static
  per-token-count table in the wrapper (bounded compile cost,
  CUDAGraph-safe); this flag exists to regenerate/verify that table
  offline. Confirmed the table is already at/near the tiling optimum
  for Kimi-K3's real (T, B) shapes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant