Skip to content

[Triton/Gluon] Bench UA add shuffled_kv_cache flag - #6284

Merged
azaidy merged 3 commits into
mainfrom
shaoclee/bench_ua_update
Oct 13, 2026
Merged

azaidy merged 3 commits into
mainfrom
shaoclee/bench_ua_update

Conversation

@k50112113

Copy link
Copy Markdown
Contributor

No description provided.

@k50112113
k50112113 requested a review from a team October 8, 2026 18:49
@github-actions

github-actions Bot commented Oct 8, 2026

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 (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
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 6284 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new store_true option defaults to true, making unshuffled benchmarking inaccessible.

1 open finding
What changed in this PR

Adds shuffled KV-cache benchmarking support to unified attention.

Changes:

  • Adds KV-cache shuffling and forwards the new option.
  • Labels shuffled benchmark results separately.
  • Adds a CLI flag for shuffled layouts.
File Description
op_tests/​op_benchmarks/​triton/​bench_unified_attention.py Adds shuffled KV-cache benchmark mode.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@azaidy azaidy self-assigned this Oct 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The benchmark unnecessarily retains large unshuffled caches, potentially doubling memory usage and causing OOM failures.

0 open findings

1 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Release source K/V tensors after shuffling when tests are disabled

op_tests/​op_benchmarks/​triton/​bench_unified_attention.py:289

When -test is not set, inputs still retains the full unshuffled K/V tensors after these shuffled copies are created, even though the reference path will not run. For the default 48-head case, each BF16 cache is 12 GiB, so this change raises live K/V storage from 24 GiB to 48 GiB and can make the benchmark OOM instead of measuring the kernel. Release the source entries after shuffling when args.test is false (while keeping the local shuffled tensors for the launch).

Low severity Correct help text describing shuffled layout backend support

op_tests/​op_benchmarks/​triton/​bench_unified_attention.py:503

This help text incorrectly presents the shuffled layout as Gluon-specific, but the option is also passed to and supported by the Triton backend. Describe it as the layout expected by Unified Attention when this flag is enabled so Triton users are not misled.

🧠 Review effort: Balanced

@azaidy azaidy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@azaidy
azaidy merged commit efe7fdb into main Oct 13, 2026
@azaidy
azaidy deleted the shaoclee/bench_ua_update branch October 13, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants