Skip to content

[FlyDSL] [Test] Allow one BF16 ULP in atomic split-K graph replay - #8351

Closed
zufayu wants to merge 1 commit into
ROCm:mainfrom
zufayu:codex/hgemm-graph-ulp-hotfix
Closed

zufayu wants to merge 1 commit into
ROCm:mainfrom
zufayu:codex/hgemm-graph-ulp-hotfix

Conversation

@zufayu

@zufayu zufayu commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the repeated K-tile coverage launches bitwise exact
  • allow only the immediately adjacent BF16 values for changed-input graph replay when split_k > 1
  • explicitly reject non-finite output and capture-time stale-input reuse

Why

The gfx950 packed BF16 atomic split-K path can add the same partials in a different order during CUDA Graph replay. In the observed failure (M=19, N=120, K=1088, split_k=9), 1 of 2,280 outputs differed by one BF16 ULP while eager execution and exact split coverage passed.

A general rtol/atol relaxation would hide too much. This check accepts only the reference or either adjacent representable BF16 value; missing/repeated tiles, stale input, non-finite output, and differences larger than one ULP still fail.

Longer-term operator-contract work is tracked in #8349.

Failure example: https://github.com/ROCm/aiter/actions/runs/44492331393/job/136021417288

Validation

  • git diff --check
  • python -m py_compile op_tests/test_flydsl_hgemm.py
  • gfx950 execution not available in the local Windows environment

@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 8351 --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 [Test] Allow one BF16 ULP in atomic split-K graph replay [FlyDSL] [Test] Allow one BF16 ULP in atomic split-K graph replay Nov 20, 2026
@aiter-bot

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision dac7c008581e · 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 behavior would each changed op test fail on before this PR, and why is that coverage not already provided by an existing canonical test?
  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 — missing ### Reviewed revision in the PR description
  • FAIL — missing ### Behavior and intent in the PR description
  • FAIL — missing ### Validation and unverified scope in the PR description
  • FAIL — missing ### PR-specific question in the PR description
  • FAIL — missing ### Changed op tests in the PR description
  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA
  • FAIL — Behavior and intent has no substantive answer
  • FAIL — Validation and unverified scope has no substantive answer
  • FAIL — PR-specific question has no substantive answer
  • FAIL — changed op test not explained in Changed op tests: op_tests/test_flydsl_hgemm.py
  • FAIL — Changed op tests must explain why each changed op test is necessary and non-redundant

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

@zufayu

zufayu commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #8531 — the commit is cherry-picked there verbatim (747f357, "[Test] tolerate one BF16 ULP in split-K graph replay"), with #8374's root cause and measurements written into that PR's description.

Combining them was the practical call: this PR could not go green on its own. Its MI300X shard 5 failed with AttributeError: 'NoneType' object has no attribute 'keywords' — the MoE clamped-SiLU dispatch bug on main, which #8531 fixes — while #8531's MI35X shard 6 was failing on exactly the assertion this PR relaxes. Each was held red by the other's unfixed bug.

One failure here is not carried over: MI300X shard 7, test_mla_sparse.py assert quant_err < 0.05. It does not reproduce on #8531 or on #8353, both of which pass shard 7, so it looks stale against the 2026-11-20 base this branch was cut from rather than a live problem.

Closing as superseded; the fix lands with #8531.

@zufayu zufayu closed this Nov 24, 2026
zufayu added a commit that referenced this pull request Nov 24, 2026
…ship its gfx942 instances, and de-flake split-K graph replay (#8531)

Three independent failures a CI run hits:

- MI300X shard 5 crashed with AttributeError: 'NoneType' object has no attribute 'keywords'. A clamped per-token FP8 SiLU on gfx942 took the FlyDSL whole-graph default, whose metadata has stage1=None. Keep that default only where CK rejects the shape (inter_dim not a multiple of 128).
- With routing fixed, a 304-CU limit-7 call selects the tuned gfx942 256x16...MulABScale row from #7361, which a GPU_ARCHS=gfx942;gfx950 wheel never built: Unknown or incompatible CK MoE kernel. Emit every built arch's CK MoE instance list into the lookup; heuristic dispatch still follows get_gfx().
- MI35X shard 6 flaked on test_flydsl_hgemm's bit-exact split-K graph replay. BF16 output with split_k > 1 accumulates via BufferAtomicPkAdd, so the result is atomic-order dependent (#8374). Accept one BF16 ULP there only, with a finiteness check and a guard that the replay did not reuse the captured input.

Supersedes #8353 and #8351.

Fixes #8334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:mi300x Run MI300X standard and OPUS CI on PRs FlyDSL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants