Skip to content

[Triton/Gluon] [CI] [Build] Bump triton 7cb7b059 -> 24d5394c (3.9.0) with gfx950 fixes and config retune - #8266

Merged
mengfei-jiang merged 12 commits into
ROCm:mainfrom
yuyzhang512:release-test/triton-release-1031
Nov 23, 2026
Merged

mengfei-jiang merged 12 commits into
ROCm:mainfrom
yuyzhang512:release-test/triton-release-1031

Conversation

@yuyzhang512

@yuyzhang512 yuyzhang512 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Bump the CI Triton from release_0914 triton 3.8.0 (git7cb7b059) to release_1031 triton 3.9.0 (gitf1bf9132), and fix the aiter breakages it exposes: an mxfp4 quant compile error, and FF fused small-M configs that no longer fit LDS (retuned so they are also faster). Two attention tests with known triton 3.9 issues are deselected in CI.

Motivation

On triton 3.9.0 (f1bf9132):

  • _dynamic_mxfp4_quant_kernel_asm_layout fails to compile: triton 3.9 rejects scalar[None, :] ("too many indices for tensor of rank 0").
  • The M_LEQ_4 / M_LEQ_8 buckets of 7 gfx950 FF-A16W16-fused-N=*-K=* configs, and the M_LEQ_64 bucket of 4 of them (N=11264/K=2048, N=16384/K=1280,2048,8192), use BM=32, BN=128, BK=256, ns=2. That tile needs 168864 B of LDS (limit 163840) and fails with OutOfResources. On 3.8 the ungated kernel already failed with it (168896 B). The other 3 files' M_LEQ_64 (BM=64, BN=256, BK=64, ns=3) fits and is unchanged.
  • test_mha_dao_ai_capture hits a GPU memory access fault in bwd_kernel_fused_causal (MHA backward with dropout), and 8 varlen head-dim 33/53 test_mha_dao_ai_backward_head_size cases give wrong gradients or fault on gfx942. Both are LLVM codegen issues in the Triton toolchain, not aiter bugs.

Changes

  • .github/scripts/install_triton.sh (run by setup.py during pip install aiter) and download_triton_wheel.sh (CI wheelhouse; it reuses the lookup via install_triton.sh --resolve, no copy):
    • Requires Python 3.11+ (triton==3.9.0 from pypi.amd.com/triton/release_1031, which has cp311-cp314 wheels only). On Python 3.10 both scripts print a reminder and stop before touching triton: install_triton.sh exits 0 so pip install aiter continues with the existing triton, download_triton_wheel.sh exits 1.
    • The ROCm version comes from rocm-core (dpkg or rpm) or, on pip ROCm SDK images, the pip rocm package. A failed rpm query no longer leaks its message into the version.
    • Candidate indices are the derived rocm-X.Y.0, then the newest one of the same ROCm major (rocm-7.2.0 for 7.x such as 7.12, rocm-10.2.0 for 10.x), then the default. Each is used only if it lists a wheel with this interpreter's full tag (cpXY[t]-cpXY[t]-linux_<arch>), probed with python3 urllib (no curl): HTTP 403/404 tries the next candidate, a network error is retried 3 times and then stops. A missing index used to let pip fall through to upstream PyPI triton.
    • Nothing is uninstalled until a usable source is found: a local wheelhouse counts only if it holds a matching wheel, otherwise an index must resolve. Any failure leaves the existing triton in place. The wheelhouse install is pinned to the version.
    • setup.py prints the Python 3.11+ reminder on Python 3.10 instead of "Replacing existing triton"; the README notes the Python and network requirements.
  • aiter/utility/fp4_utils.py: bs_offs_n = pid_n + tl.arange(0, 1) (rank-1, size-1) instead of the scalar pid_n. Broadcast-identical; compiles on 3.8 and 3.9.
  • 7 gfx950 FF-A16W16-fused-N=*-K=* configs:
    • M_LEQ_4, M_LEQ_8: BM=16, BN=128, BK=256, ns=2, nw=4, picked from a 72-tile sweep on triton 3.9.
    • M_LEQ_64 (the 4 files above): BK 256 -> 128, num_stages 2 -> 3, picked from a second sweep that also varied waves_per_eu, matrix_instr_nonkdim, num_stages and num_warps. The other 3 files' M_LEQ_64 is unchanged.
    • Fits LDS on 3.8 and 3.9.
  • .github/workflows/triton-test.yaml: deselect test_mha_dao_ai_capture[mha-cpu] and [mha-cuda] on MI35X and MI300X (the gqa variants pass), and the 8 varlen head-dim 33/53 test_mha_dao_ai_backward_head_size cases on MI300X, with a link to the LLVM fix.
  • .github/scripts/flash_attention/test.sh: deselect three flash-attention cases that fault or hang on triton 3.9 in bwd_kernel_fused_causal (same LLVM miscompile, fix pending in [InlineSpiller][AMDGPU] Skip undef lanes when spilling a partial-def super-register llvm/llvm-project#226689): test_flash_attn_output[0.0-0.17-2048-2048-128-True-False-False-False-mha-dtype0-True/False] and test_flash_attn_varlen_output[0.0-0.17-1024-1024-32-True-False-True-False-mha-dtype0-False]. All 396 dropout cases of both tests were run one per process on MI350X; only these three fail, every time.
  • op_tests/triton_tests/gemm/feed_forward/test_ff_a16w16_fused.py: tests for the retuned buckets (gated M=4/64, ungated M=8/64).
  • .github/workflows/aiter-release.yaml: comment reworded; release builds on pip ROCm SDKs still keep the SDK's own triton.

User-facing effects: pip install aiter (via setup.py -> install_triton.sh) now installs triton 3.9.0 on Python 3.11+; on Python 3.10 it prints that Python 3.10 is not supported by triton 3.9.0 and keeps the existing triton. The FF fused kernels pick new tiles on gfx950. No API change.

Performance (if applicable)

MI350X (gfx950), bf16. Before = triton 3.8.0 + old configs (current main). After = triton 3.9.0 f1bf9132 + this PR. triton.testing.do_bench(warmup=25, rep=100), median of 4 rounds on 4 GPUs, variants interleaved per GPU; round-to-round spread <= 1.13x. TFLOPS, higher is better.

Hardware Workload/configuration Before (TFLOPS) After (TFLOPS) Change
MI350X ff fused gated, hidden 2048, inter 5632, M=1 1.97 2.02 +2.6%
MI350X ff fused gated, hidden 2048, inter 5632, M=8 15.15 15.88 +4.7%
MI350X ff fused gated, hidden 2048, inter 5632, M=16 29.43 34.73 +18.1%
MI350X ff fused gated, hidden 2048, inter 5632, M=64 99.16 110.04 +11.0%
MI350X ff fused gated, hidden 1280, inter 8192, M=8 18.77 19.44 +3.6%
MI350X ff fused gated, hidden 1280, inter 8192, M=64 109.63 115.89 +5.7%
MI350X ff fused gated, hidden 2048, inter 8192, M=8 20.82 21.43 +3.0%
MI350X ff fused gated, hidden 2048, inter 8192, M=32 71.31 84.63 +18.7%
MI350X ff fused gated, hidden 8192, inter 8192, M=8 23.31 24.04 +3.0%
MI350X ff fused gated, hidden 8192, inter 8192, M=32 82.28 95.97 +16.5%
MI350X ff fused gated, hidden 8192, inter 8192, M=64 130.90 139.52 +6.5%
MI350X ff fused gated, hidden 4096, inter 11008, M=8 26.82 27.14 +1.3%
MI350X ff fused gated, hidden 5120, inter 13824, M=8 27.76 28.11 +1.1%
MI350X ff fused gated, hidden 4096, inter 14336, M=8 28.50 28.97 +1.6%
MI350X ff fused gated, all 7 shapes, M <= 8 (median) +1.6% (range +0.5% to +4.7%)
MI350X ff fused gated, 4 shapes, M 16-64 (median) +13.2% (range +5.7% to +19.5%)
MI350X ff fused ungated, all 7 shapes, M 1-64 fails (LDS overflow) runs fixed

Against the plain BK 256 -> 128 fix on triton 3.9: the retuned M_LEQ_4 / M_LEQ_8 tiles give +10.2% (range +1.9% to +18.5%) TFLOPS and num_stages=3 in M_LEQ_64 gives +18.0% (range -0.3% to +33.0%) (medians over gated + ungated). Every gated case is now at least as fast as triton 3.8 + old configs.

Triton 3.8 A/B (old vs new configs, same triton): gated +3.4% TFLOPS (range +0.6% to +17.1%; M <= 8 +1.6%, M 16-64 +10.5%). Ungated: old configs fail all 33 cases with LDS overflow, new configs run them. So the retune is an improvement on its own, not only a triton 3.9 workaround.

Full per-case tables (66 cases, 3.8 old / 3.9 BK128 / 3.9 final / 3.8 final) are in the attached perf report.

Testing

  • Unit tests added or updated
  • Performance benchmarks run
  • Tested on MI250X
  • Tested on MI300X

Documentation

  • Docstrings updated
  • User guide updated
  • Performance guide updated
  • No documentation change is needed, with the reason stated below

No API change. The install-time triton choice is automatic and logged by install_triton.sh; AITER_USE_SYSTEM_TRITON=1 still keeps an existing triton.

Dependencies

  • No new third-party dependencies added
  • New dependencies are listed and justified below

Existing dependency version change: CI Triton 3.8.0 (release_0914) -> 3.9.0 (release_1031, f1bf9132).

Breaking Changes

None.

PR Self-Review

Reviewed revision

8ad1dae69

Behavior and intent

  • CI now tests aiter against triton 3.9.0 (f1bf9132).
  • The mxfp4 quant kernel compiles on triton 3.9.
  • The FF fused small-M buckets select tiles that fit LDS on both triton 3.8 and 3.9. Without this, every one of these buckets fails to compile on 3.9, and the ungated ones already failed on 3.8. The retuned tiles also recover the slowdown that a plain BK 256 -> 128 change caused: every gated case is at least as fast as before, M 16-64 by 13%.
  • pip install aiter installs triton 3.9.0 on Python 3.11+. On Python 3.10 it prints a reminder that Python 3.11+ is required and keeps the existing triton (previously it uninstalled triton and then failed, leaving none). An unknown ROCm version no longer silently gets upstream PyPI triton.
  • The MHA variants of one attention test and 8 gfx942 backward cases are skipped in CI until the Triton toolchain ships the LLVM fix.

Validation and unverified scope

Validated on MI350X (gfx950), ROCm 7.1, with triton 3.8.0 (7cb7b059) and 3.9.0 (f1bf9132):

  • op_tests/triton_tests/gemm/feed_forward/test_ff_a16w16_fused.py: 740 passed, 128 skipped, 0 failed on both 3.8 and 3.9.
  • That suite covers only 1 of the 18 retuned buckets, so every retuned bucket was also checked against the torch reference: M 1/4/8 (84 checks, 77 pass) and M 16/32/64 (48 checks, 41 pass), on both versions.
    • All misses are ungated, activation=None, large intermediate, 1-9 elements over tolerance (<= 0.1%).
    • The plain BK=128 configs miss as many (7 at M <= 8, 5-7 at M 16-64). The ungated kernel accumulates its output with bf16 tl.atomic_add, one per N-tile, which leaves some rounding error. This PR keeps BN=128 so the number of atomic adds does not change. BN=64 gave up to 1.5x the TFLOPS but doubled these misses.
  • mxfp4 quant with the fp4_utils.py fix: test_fp4_utils_dynamic_mxfp4_quant and test_fused_dynamic_mxfp4_quant_moe_sort pass on f1bf9132 (61 passed, 24 skipped). test_gemm_a4w4 (same kernel via per_1x32_f4_quant_triton) was verified on the earlier triton 3.9.0 build 65ee8992, not re-run on f1bf9132.
  • test_mha_dao_ai_capture on MI350X:
  • Install scripts: ROCm fallback through --resolve with simulated dpkg / rpm / pip-only ROCm (7.1 -> rocm-7.1.0, 7.12 -> rocm-7.2.0, 10.1 -> rocm-10.1.0, 10.5 -> rocm-10.2.0, rpm without rocm-core and no ROCm -> rocm-7.2.0). End to end in a fresh Python 3.12 venv: download wheelhouse; install from the index; from a matching wheelhouse; from an empty wheelhouse (falls back to the index); wrong-tag wheelhouse with the index unreachable (exit 1, triton unchanged); Python 3.10 (install exits 0 with the reminder and triton unchanged, download exits 1). No curl is used.
  • The narrowed deselect IDs match: collecting test_mha_dao_ai_capture with them gives 2 deselected, 2 (gqa) run.
  • New retuned-bucket tests: pass on triton 3.8 and 3.9.

Unverified:

PR-specific question

The CI changes add no permissions, secrets or triggers. triton-test.yaml and aiter-test.yaml run on pull_request (not pull_request_target), so fork PRs get a read-only GITHUB_TOKEN and no secrets; the reusable prepare-triton-wheel.yaml they call (workflow_call) sets permissions: contents: read. The install scripts take no PR text or user input: they read the ROCm version from local packages and fetch fixed https://pypi.amd.com/triton/... URLs over HTTPS. The deselect list is static. Fork PR code can already run in these jobs (they execute the PR's tests); this change does not move it to a more privileged path.

Changed op tests

op_tests/triton_tests/gemm/feed_forward/test_ff_a16w16_fused.py: the gfx950 launch tests test_ff_a16w16_fused_gated_m8_launch / _ungated_m8_launch now also run the retuned buckets (gated M=4 and M=64 on N=16384/K=8192 for M_LEQ_4 and M_LEQ_64; ungated M=8 and M=64 on N=16384/K=1280 for M_LEQ_8 and M_LEQ_64), each against the torch reference on the config=None path. No new test functions. Not redundant: get_x_vals() jumps from M=3 to M>=32 and does not hit these specialized configs.

@yuyzhang512
yuyzhang512 requested a review from a team November 19, 2026 05:56
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
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:windows Windows JIT op smoke test on the Radeon R9700 ROCm runner
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: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
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 8266 --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.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

@github-actions github-actions Bot changed the title [Triton] Bump triton 7cb7b059 -> f1bf9132 (3.9.0) with gfx950 fixes and config retune [Triton/Gluon] [CI] Bump triton 7cb7b059 -> f1bf9132 (3.9.0) with gfx950 fixes and config retune Nov 19, 2026
@aiter-bot

aiter-bot commented Nov 19, 2026 •

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision 1b229a81352c · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. What permissions and untrusted-input boundary does this CI change have, and can fork PR code or text reach a privileged execution path?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@yuyzhang512

Copy link
Copy Markdown
Contributor Author

Updated the config to avoid exceeding the kernel's LDS limit.

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

Failed RPM queries can leave diagnostic text in ROCM_VERSION, bypassing pip detection and selecting the wrong ROCm wheel index in both Triton scripts.

1 open issue
What changed in this PR

Updates AITER CI to Triton 3.9.0 and adjusts quantization and gfx950 feed-forward settings for compatibility with the new compiler.

Changes:

  • Updates Triton installation and download scripts, including pip-based ROCm detection and an index fallback.
  • Fixes MXFP4 scale-index broadcasting and retunes seven gfx950 feed-forward configurations to reduce shared-memory use.
  • Deselects attention tests affected by reported Triton toolchain issues.
File Description
aiter/​utility/​fp4_utils.py Uses a rank-1 scale index for Triton 3.9 compatibility.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​ff_a16w16_fused/​FF-A16W16-fused-N=28672-K=4096.json Retunes M ≤ 8 tiles and warp counts.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​ff_a16w16_fused/​FF-A16W16-fused-N=27648-K=5120.json Retunes M ≤ 8 tiles and warp counts.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​ff_a16w16_fused/​FF-A16W16-fused-N=22016-K=4096.json Retunes M ≤ 8 tiles and warp counts.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​ff_a16w16_fused/​FF-A16W16-fused-N=16384-K=8192.json Retunes small-M tiles and M ≤ 64 pipeline settings.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​ff_a16w16_fused/​FF-A16W16-fused-N=16384-K=2048.json Retunes small-M tiles and M ≤ 64 pipeline settings.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​ff_a16w16_fused/​FF-A16W16-fused-N=16384-K=1280.json Retunes small-M tiles and M ≤ 64 pipeline settings.
aiter/​ops/​triton/​configs/​gfx950/​triton/​gemm/​ff_a16w16_fused/​FF-A16W16-fused-N=11264-K=2048.json Retunes small-M tiles and M ≤ 64 pipeline settings.
.github/​workflows/​triton-test.yaml Adds targeted attention-test exclusions.
.github/​scripts/​install_triton.sh Installs Triton 3.9.0 and extends ROCm index selection.
.github/​scripts/​download_triton_wheel.sh Downloads Triton 3.9.0 with matching ROCm index selection.

Review effort: Balanced

Comment thread .github/scripts/install_triton.sh Resolved
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
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:windows Windows JIT op smoke test on the Radeon R9700 ROCm runner
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: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
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 8266 --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.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

gyohuangxin
gyohuangxin previously approved these changes Nov 20, 2026

@valarLip valarLip left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

⚠️ Action required before merge (7)

  1. Get a green ci:atom_full at the final head before merge. The only run that finished is 44658378692, at 2ffcf7a. DeepSeek-R1-0528 (FP4, MTP) passed, but only by +0.005 to +0.009. DeepSeek-V4-Pro (KV budget -0.07 GB), V4-Pro DSpark (HIP OOM) and V4.1-Flash DSpark (server not up after 2700 s) failed before evaluation, also at 98753cd, so no accuracy number exists for dsv4pro or dsv4.1flash. Then either show the same failure on a triton-3.8 baseline, or root-cause it.
  2. Don't leave Python 3.10 without triton. release_1031 and PyPI have no cp310 wheel for triton 3.9.0. install_triton.sh:28 uninstalls triton, then :88 fails. setup.py:150-154 swallows the error, so pip install on py3.10 (python_requires>=3.10, py3.10 release wheels) ends with no triton. Branch on the Python version before the uninstall (keep the current triton and warn for <3.11). Also drop "no user-facing change".
  3. Apply the Copilot rpm fix to download_triton_wheel.sh:16 too () || ROCM_VERSION="", thread r4625198574). Today, on an rpm host without rocm-core, the "package rocm-core is not installed" text becomes the ROCm version. That skips the new pip fallback, and the >10.2 probe then picks rocm-10.2.0, while install_triton.sh picks 7.2.0 in the same image. Hit via the prepare-triton-wheel.yaml:104-107 host fallback (ubuntu-latest ships rpm).
  4. Fall back when the derived index does not exist, for every version. A pip-only ROCm 7.x SDK (e.g. rocm==7.12.0a…) now maps to release_1031/rocm-7.12.0, which returns 403. The curl probe only runs above 10.2, so pip silently installs upstream PyPI triton 3.9.0. triton-kernels==1.0.0 then fails after the old triton was removed. Base used the AMD rocm-7.2.0 index. Probe every computed index (guarded by command -v curl), falling back to TRITON_DEFAULT_ROCM_VERSION, or to 10.2.0 above 10.2.

Nits (all requested):
5. Narrow the test_mha_dao_ai_capture deselect. It also drops forward, varlen and kvcache CUDA-graph capture coverage, which no other test has. On MI35X, deselect only [mha-cpu]/[mha-cuda] (your body says gqa passes), or split out the dropout-backward step. Add an issue link to both workflow comments.
6. Back the retune with tests and data. CI reaches 1 of the 18 retuned buckets and no ungated specialized shape; the ungated LDS overflow on 3.8 shipped undetected. Add M ∈ {4, 64} gated cases plus one ungated specialized shape (e.g. hidden 2048, inter 11264). Attach the cited 66-case report, which is not attached. Add a triton 3.8 old-vs-new config A/B for the gated buckets, since 3.8 users get these tiles too.
7. Fix the squash text and description (squash = COMMIT_MESSAGES):

  • bf6fde9 says "BK 256→128 … keeps num_stages=2".
  • 85fee57 says "M_LEQ_64 is unchanged".
  • The body says all 7 files' M_LEQ_64 used BM32/BK256/ns2; 22016/27648/28672 did not.
  • "Reviewed revision 63b81cf" is stale.
  • Also reword aiter-release.yaml:456-457 ("no triton builds for pip ROCm SDKs"), which is no longer true for 10.x.

Reviewed at 69d712f (Deep tier; 4 hunters, 2 verifiers). No file overlap or textual conflict with #7544/#8093/#7905/#8216. #7544 and #8093 (3.9 perf recoveries) should land with or before this PR. The fp4_utils fix compiles on 3.9 and is broadcast-identical. The new tiles fit LDS. CI "fail" checks are cancelled duplicate runs; Triton MI35X/MI300X shards pass at head; standard-shard failures are infra (artifact timeout / docker rate limit), re-run pending.

@yuyzhang512

yuyzhang512 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

⚠️ Action required before merge (7)

  1. Get a green ci:atom_full at the final head before merge. The only run that finished is 44658378692, at 2ffcf7a. DeepSeek-R1-0528 (FP4, MTP) passed, but only by +0.005 to +0.009. DeepSeek-V4-Pro (KV budget -0.07 GB), V4-Pro DSpark (HIP OOM) and V4.1-Flash DSpark (server not up after 2700 s) failed before evaluation, also at 98753cd, so no accuracy number exists for dsv4pro or dsv4.1flash. Then either show the same failure on a triton-3.8 baseline, or root-cause it.
  2. Don't leave Python 3.10 without triton. release_1031 and PyPI have no cp310 wheel for triton 3.9.0. install_triton.sh:28 uninstalls triton, then :88 fails. setup.py:150-154 swallows the error, so pip install on py3.10 (python_requires>=3.10, py3.10 release wheels) ends with no triton. Branch on the Python version before the uninstall (keep the current triton and warn for <3.11). Also drop "no user-facing change".
  3. Apply the Copilot rpm fix to download_triton_wheel.sh:16 too () || ROCM_VERSION="", thread r4625198574). Today, on an rpm host without rocm-core, the "package rocm-core is not installed" text becomes the ROCm version. That skips the new pip fallback, and the >10.2 probe then picks rocm-10.2.0, while install_triton.sh picks 7.2.0 in the same image. Hit via the prepare-triton-wheel.yaml:104-107 host fallback (ubuntu-latest ships rpm).
  4. Fall back when the derived index does not exist, for every version. A pip-only ROCm 7.x SDK (e.g. rocm==7.12.0a…) now maps to release_1031/rocm-7.12.0, which returns 403. The curl probe only runs above 10.2, so pip silently installs upstream PyPI triton 3.9.0. triton-kernels==1.0.0 then fails after the old triton was removed. Base used the AMD rocm-7.2.0 index. Probe every computed index (guarded by command -v curl), falling back to TRITON_DEFAULT_ROCM_VERSION, or to 10.2.0 above 10.2.

Nits (all requested): 5. Narrow the test_mha_dao_ai_capture deselect. It also drops forward, varlen and kvcache CUDA-graph capture coverage, which no other test has. On MI35X, deselect only [mha-cpu]/[mha-cuda] (your body says gqa passes), or split out the dropout-backward step. Add an issue link to both workflow comments. 6. Back the retune with tests and data. CI reaches 1 of the 18 retuned buckets and no ungated specialized shape; the ungated LDS overflow on 3.8 shipped undetected. Add M ∈ {4, 64} gated cases plus one ungated specialized shape (e.g. hidden 2048, inter 11264). Attach the cited 66-case report, which is not attached. Add a triton 3.8 old-vs-new config A/B for the gated buckets, since 3.8 users get these tiles too. 7. Fix the squash text and description (squash = COMMIT_MESSAGES):

  • bf6fde9 says "BK 256→128 … keeps num_stages=2".
  • 85fee57 says "M_LEQ_64 is unchanged".
  • The body says all 7 files' M_LEQ_64 used BM32/BK256/ns2; 22016/27648/28672 did not.
  • "Reviewed revision 63b81cf" is stale.
  • Also reword aiter-release.yaml:456-457 ("no triton builds for pip ROCm SDKs"), which is no longer true for 10.x.

Reviewed at 69d712f (Deep tier; 4 hunters, 2 verifiers). No file overlap or textual conflict with #7544/#8093/#7905/#8216. #7544 and #8093 (3.9 perf recoveries) should land with or before this PR. The fp4_utils fix compiles on 3.9 and is broadcast-identical. The new tiles fit LDS. CI "fail" checks are cancelled duplicate runs; Triton MI35X/MI300X shards pass at head; standard-shard failures are infra (artifact timeout / docker rate limit), re-run pending.

Thanks for the thorough review. I rewrote the branch into 4 commits with accurate messages (5806063eb CI install, 811687cc7 mxfp4 fix, 6ea75a654 config retune + tests, 29a869b66 deselects); the final tree is unchanged by the rewrite. Point by point:

1. ci:atom_full at the final head — can't run right now: the atom_full runners are unavailable for machine reasons. The same triton build (3.9.0 f1bf9132, byte-identical in release_tmp2 and release_1031) ran ci:atom_full in #7329 at af30d45: https://github.com/ROCm/aiter/actions/runs/44001619017. 14 accuracy jobs passed (including DeepSeek-V4-Pro, V4-Pro DSpark, V4.1-Flash DSpark, R1-0528 MTP/FP4, Kimi-K3, gpt-oss-120b, Qwen3-235B, Llama-3.3-70B), 9 were cancelled and none failed. That run had #7329's aiter code, without this PR's config retune, so I'll still re-run it here at the final head once the runners are back.

2. Python 3.10 left without triton — fixed in 5806063eb.

  • Python 3.10 is not supported (release_1031 only has cp311–cp314 wheels). Both scripts now check the Python version first and print a reminder instead of failing halfway: install_triton.sh keeps the existing triton and exits 0, so pip install aiter continues; download_triton_wheel.sh exits 1.
  • The index is resolved before anything is uninstalled. If no AMD build matches, the script exits non-zero and leaves the existing triton in place, so the setup.py fallback no longer ends with no triton.
  • I dropped the "no user-facing change" claim. The description now says pip install aiter installs triton 3.9.0 on Python 3.11+ and prints the Python 3.11+ reminder on 3.10.

3. rpm fix in download_triton_wheel.sh — done. Both scripts now share the same resolution code, including rpm ... 2>/dev/null) || ROCM_VERSION="".

4. Probe every derived index — done.

  • Candidates are tried in order: rocm-X.Y.0, then the newest build of the same ROCm major (rocm-7.2.0 for 7.x such as 7.12, rocm-10.2.0 for 10.x), then the default.
  • Each is used only if its page lists a wheel for this triton version and Python tag.
  • Triton is installed from the AMD index only (no --extra-index-url fall-through), and the final check rejects a triton without a local +amd label.
  • Pip-only ROCm 7.12 now skips the 403 index and uses rocm-7.2.0; 10.x without an index uses rocm-10.2.0. I checked 9 simulated environments plus an end-to-end install in a fresh venv; details are in the description.

5. Narrow the capture deselect — done in 29a869b66.

6. Tests and data for the retune — done.

  • 6ea75a654 adds gated M=4 and M=64 (N=16384, K=8192) and ungated M=8 and M=64 (N=16384, K=1280), checked against the torch reference. They pass on 3.8 and 3.9.
  • The 66-case report is attached: 3.8 old / 3.9 BK128 / 3.9 final / 3.8 final, TFLOPS, 4 rounds on 4 GPUs.
  • 3.8 A/B with the same triton (old vs new configs): gated +3.4% TFLOPS (M ≤ 8 +1.6%, M 16–64 +10.5%), and ungated goes from 33/33 LDS overflow to all running. So the retune is an improvement on 3.8 too, not just a 3.9 workaround.

7. Stale messages — done. The branch history is rewritten into 4 commits whose messages describe the final change (the old ones still described the plain BK 256 -> 128 fix and a full capture-test deselect), the description is updated, and the aiter-release.yaml:456-457 comment is reworded.

@yuyzhang512
yuyzhang512 force-pushed the release-test/triton-release-1031 branch from 36ca989 to 4a7b793 Compare November 20, 2026 09:49
@yuyzhang512
yuyzhang512 force-pushed the release-test/triton-release-1031 branch from 1c5d0ad to 1b229a8 Compare November 23, 2026 12:14

@Dewei-Wang-sh Dewei-Wang-sh 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

@mengfei-jiang
mengfei-jiang merged commit 93f8642 into ROCm:main Nov 23, 2026
90 checks passed
coderfeli added a commit that referenced this pull request Nov 24, 2026
Picks up the Triton 3.9.0 bump (#8266): CI installs that Triton wheel, and
without the matching aiter/utility/fp4_utils.py op_tests/test_gemm_a4w4.py
fails to compile its quant kernel.
Fyzyukk added a commit to Fyzyukk/aiter that referenced this pull request Nov 25, 2026
…main, ROCm#8266)

The CI image is on triton 3.9, which rejects scalar[None, :] in
_dynamic_mxfp4_quant_kernel_asm_layout; op_tests/test_gemm_a4w4.py fails to compile it on
this branch. Same line as upstream main, so a later merge of main is a no-op here.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Fyzyukk added a commit to Fyzyukk/aiter that referenced this pull request Nov 25, 2026
…main, ROCm#8266)

The CI image is on triton 3.9, which rejects scalar[None, :] in
_dynamic_mxfp4_quant_kernel_asm_layout; op_tests/test_gemm_a4w4.py fails to compile it on
this branch. Same line as upstream main, so a later merge of main is a no-op here.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Fyzyukk added a commit to Fyzyukk/aiter that referenced this pull request Nov 25, 2026
…main, ROCm#8266)

The CI image is on triton 3.9, which rejects scalar[None, :] in
_dynamic_mxfp4_quant_kernel_asm_layout; op_tests/test_gemm_a4w4.py fails to compile it on
this branch. Same line as upstream main, so a later merge of main is a no-op here.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Fyzyukk added a commit to Fyzyukk/aiter that referenced this pull request Nov 25, 2026
…main, ROCm#8266)

The CI image is on triton 3.9, which rejects scalar[None, :] in
_dynamic_mxfp4_quant_kernel_asm_layout; op_tests/test_gemm_a4w4.py fails to compile it on
this branch. Same line as upstream main, so a later merge of main is a no-op here.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Fyzyukk added a commit to Fyzyukk/aiter that referenced this pull request Nov 25, 2026
…main, ROCm#8266)

The CI image is on triton 3.9, which rejects scalar[None, :] in
_dynamic_mxfp4_quant_kernel_asm_layout; op_tests/test_gemm_a4w4.py fails to compile it on
this branch. Same line as upstream main, so a later merge of main is a no-op here.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Fyzyukk added a commit to Fyzyukk/aiter that referenced this pull request Nov 25, 2026
…main, ROCm#8266)

The CI image is on triton 3.9, which rejects scalar[None, :] in
_dynamic_mxfp4_quant_kernel_asm_layout; op_tests/test_gemm_a4w4.py fails to compile it on
this branch. Same line as upstream main, so a later merge of main is a no-op here.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
vgokhale added a commit that referenced this pull request Nov 25, 2026
Bring in main 35df6ef. It has the Triton 3.9.0 bump (#8266), whose
fp4_utils.py fix the 1-GPU CI job needs: that job installs Triton 3.9.0.

Signed-off-by: Vinayak Gokhale <[email protected]>
vgokhale added a commit that referenced this pull request Nov 25, 2026
Bring in 14665de of #7792, which merges main 35df6ef. Main has the Triton 3.9.0
bump (#8266), whose fp4_utils.py fix the 1-GPU CI job needs.

Signed-off-by: Vinayak Gokhale <[email protected]>
azaidy pushed a commit that referenced this pull request Nov 25, 2026
…8701)

Triton 3.9 also pipelines the x tile through LDS when the tile feeds
more than one dot. The bf16x3 kernel feeds it to 3 dots, so each config
needs about 34.8 KB more LDS. With the w_bf16x3 weights, 6 compute-bound
buckets then need more than 160 KiB and fail with OutOfResources, for
example M_LEQ_256 with 168,832 B. Since the Triton 3.9 bump (#8266),
test_gemm_a16w32_takes_w_bf16x3[256] fails on main.

The new buckets are measured on Triton 3.9 at N=128, K=6144 with the
w_bf16x3 weights. M_LEQ_256 comes from a full sweep. M_LEQ_512,
M_LEQ_1024 and M_LEQ_8192 come from the 100 fastest configs at M=256 and
a grid of larger tiles. For M_LEQ_512 the second-best config on Triton
3.9 is used, because the best one is 46% slower on Triton 3.8. "any" is
a copy of M_LEQ_8192. DEFAULT.json gets the same values in the 4 buckets
that overflowed. All buckets fit on Triton 3.8 and 3.9.

test_gemm_a16w32_takes_w_bf16x3 now runs one M for each bucket, for the
tuned shape and for a DEFAULT.json shape. With the configs of main on
Triton 3.9, 8 of its 16 cases fail.

Signed-off-by: Vinayak Gokhale <[email protected]>
Arist12 added a commit to Arist12/aiter that referenced this pull request Nov 29, 2026
… down to 2048 keys

_gfx950_kv_splits caps the KV split at cdiv(seq_len_kv, 16384), so a
prefill chunk of a few rows over a long context runs on a few
workgroups (7 per row block at 107K keys, whatever the row count) and
idles most of the GPU. The splits own disjoint key columns and nothing
is reduced across them, so the floor only amortizes each split's Q and
weight loads; 2048 keys still does. Lower it to 2048 when the grid
being sized (row blocks x splits) fills less than one round of
workgroups. A grid that already fills a round keeps its split: without
that gate a lower floor cost up to 6% on Triton 3.8 (512 rows over 50K
keys with clean_logits=True: 150.4 -> 159.7 us, measured on an earlier
main with the same file). With 32 or fewer heads the 2-row grid is
sized first, so the larger split also moves some calls that main runs
as 1-row blocks over a full round to 2-row blocks (256 rows over 107K
keys: 1792 -> 6784 workgroups; 1.10-2.21x in the sweep below).

MI355X, aiter main 309ba2d (fp8_mqa_logits.py and its test are the same
on 1223841), torch 2.10.0+rocm7.2.4, Triton 3.6.0+rocm7.2.4.git4ed88892
and 3.8.0+amd.rocm7.2.0.git7cb7b059 (aiter CI's until ROCm#8266). Each arm
one HIP graph of one call, replays timed alone after a 512 MB write that
evicts the LLC, 5 rounds of main, patched, main, main, patched, main in
one process (the third arm is main again: A/A within 0.96-1.05), median
of 10 measurements per arm. 148 shapes: 32 and 64 heads of 128, 1 to
4712 rows, 8K to 262K keys plus the rows with clean_logits=False, and 32
heads over 8K to 50K pooled keys with clean_logits=True.

  rows    8K keys          32K keys         107K keys        262K keys
          (32 heads, Triton 3.6 | 3.8)
  1       97.7 -> 29.6 us  128.1 -> 33.8    175.6 -> 36.6    183.9 -> 40.9
          64.7 -> 23.6     83.0 -> 26.0     111.5 -> 28.3    115.5 -> 32.0
  42      95.5 -> 29.4     126.2 -> 37.4    177.1 -> 50.5    209.0 -> 92.0
          61.0 -> 22.5     78.0 -> 28.2     108.8 -> 52.5    131.0 -> 82.4
  256     99.5 -> 34.7     144.2 -> 73.6    397.5 -> 180.0   459.0 -> 458.5
          63.7 -> 36.8     92.9 -> 65.5     243.8 -> 156.6   397.0 -> 401.3
  4096    285.5 -> 286.3   766.7 -> 764.6   2278.1 -> 2274.2
          202.1 -> 201.7   638.1 -> 636.9   2110.1 -> 2097.6

The calls whose launch changes run 1.08-4.85x faster on Triton 3.6 (87
of 148 shapes) and flat to 3.94x on 3.8 (74); the others launch as on main,
with bit-identical logits, at 0.97-1.05x (within the A/A). On MI350X
with aiter CI's Triton 3.9.0+amd.rocm7.2.0.git24d5394c (main 1223841),
the same 74 calls run 1.00-4.02x (1.06-4.02x at 1-42 rows). The logits
are bit-identical to main's on Triton 3.6; on 3.8 and 3.9 the calls the
change moves from the 1-row to the 2-row block (32 of 148 shapes) sum
the heads in that block's order; over all their rows, the largest error
against an fp64 reference is 3.95e-4 of sum_h |w| relu(q.k) in both
arms, and per shape within 0.1% of main's.

op_tests/triton_tests/attention/test_fp8_mqa_logits.py: 253 passed with
and without the change, on both builds, and on MI350X with Triton 3.7.0,
3.8 and 3.9.0.

Co-authored-by: Jin Pan <[email protected]>
Co-authored-by: Jinwei Yao <[email protected]>
zufayu added a commit to ROCm/ATOM that referenced this pull request Dec 1, 2026
…it24d5394c)

The 1031 Triton release went public and the ground the pin stood on moved:
the release_1031 index (underscore) was pre-release staging and is now gone
entirely -- every subdir 403 -- and with it the pinned
3.9.0+amd.rocm10.1.0.gitf1bf9132 build, which is published nowhere else. The
nightly build dies at the Triton pin step until this lands.

The public release lives on release-1031 (hyphen), every ROCm subdir 7.0.0
through 10.3.0 carrying the same git24d5394c build. Repin to
3.9.0+amd.rocm10.3.0.git24d5394c from rocm-10.3.0: the subdir now matches the
line's 10.3 nightly SDK (10.2.0/10.3.0 were 403 when 10.1.0 was chosen), and
is where AITER's own install_triton.sh resolves on this image -- torch
depends on the pip rocm metapackage, so the script's ROCm probe sees 10.3.0
and tries rocm-10.3.0 before its 10.2.0 fallback. The build is the one
AITER's CI tests against: ROCm/aiter#8266 bumped AITER to it and retuned the
7 gfx950 FF-A16W16-fused configs for it -- the LDS overflow this pin exists
to avoid.

Three follow-ons in the pin commit's own scope:

- The atom_image re-pin/assert still excluded the rocm10-base flavor. Its
  reason -- a rocm10 build would have force-reinstalled a rocm7.2.0 wheel
  here -- died when the workflow started passing the line's own index and
  versions; the guard is gone, so the end-of-build assert covers the ROCm 10
  line too.
- The aiter editable reinstall in atom_image runs setup.py without
  AITER_USE_SYSTEM_TRITON (the ENV in build_aiter does not cross stages), so
  install_triton.sh ran there and re-resolved Triton -- the same build as the
  pin today, by index construction rather than by design. Set it for that
  one command: the pin, not aiter's resolver, owns the image's Triton.
- build_aiter's comment still said the base ships "the ROCm 10 SDK's 3.8.0
  build"; the base-stage and workflow comments still carried the "10.2.0 and
  10.3.0 are 403" rationale. All refreshed.

Co-Authored-By: Claude Code <[email protected]>
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.

7 participants