You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CI] [Test] Check that an A16W16 AOT replay cache serves a RUN_ONLY runtime - #6712
c315b6bba registers tests/test_flydsl_aot_replay.py in split_tests.sh, moves the probe's aiter imports inside try, and clears AITER_AOT_IMPORT and AITER_TRITON_ONLY.
8c790d5ad probes device 0 with _device_arch_and_cu (matching gemm_a16w16 on gfx950) and clears inherited CU_NUM, COMPILE_ONLY, AITER_AOT_REPLAY, FLYDSL_GPU_ARCH, and ARCH.
a9ec0d9fa and 0601e5384 assert FlyDSL dispatch (solMap["flydsl"]) and use seeded {-1, 0, 1} inputs so all 256 columns are distinct and exact in bf16.
Running the RUN_ONLY subprocess against an empty cache fails with no usable AOT cache for gemm_a16w16_gfx950.
Unverified: MI300X / MI250X in CI (the test skips off gfx950); FlyDSL policies other than the plain split-K row.
PR-specific question
CI permissions and untrusted-input boundary: .github/scripts/split_tests.sh only appends the static repo-relative string "tests/test_flydsl_aot_replay.py" to the ALL_FILES shard list; it reads no PR title, body, branch name, or external input and changes no workflow trigger (pull_request, not pull_request_target) or token permissions.
Runtime boundary: drift between the AOT replay and the runtime launch of gemm_a16w16 changes the FlyDSL cache key and causes a FLYDSL_RUNTIME_RUN_ONLY=1 miss, which test_a16w16_aot_cache_serves_a_run_only_process catches across two fresh processes.
Changed op tests
None. No op_tests/ file changes (tests/test_flydsl_aot_replay.py is under tests/).
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 6712 --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.
github-actionsBot
changed the title
[Bugfix] Match FlyDSL A16W16 AOT semaphore dtype to runtime
[FlyDSL] [Bugfix] Match FlyDSL A16W16 AOT semaphore dtype to runtime
Oct 20, 2026
LGTM. SplitKProtocol.take_ticket() explicitly uses an fx.Int64 pointer and performs atomic_add with fx.Int64(1), while the signal buffer is accessed as fx.Int32. Changing the AOT semaphore to torch.int64 therefore matches both the runtime allocation and the kernel’s actual access width—not just the cache signature.
Non-blocking suggestion: the new test mocks run_cached, so it verifies dtype consistency rather than compilation or disk-cache reuse. Consider adding the documented separate-process AOT → FLYDSL_RUNTIME_RUN_ONLY=1 check as a GPU regression test, covering at least one split_k > 1 case.
Review result: APPROVE
Yes, this PR can be approved based on the source review of commit d9b8763e2ceb.
Correctness: The semaphore uses 64-bit atomic operations; only the signal uses 32-bit accesses.
Blocking findings: None identified.
Follow-up: Automated GPU cache-reuse coverage would be useful but is not required for approval.
Validation scope: I reviewed the source but did not independently reproduce the author’s GPU results. This review has not been submitted to GitHub.
Mock ROCm architecture to make regression host-independent
tests/test_aot_drivers.py:49
The CPU regression still depends on the host architecture: _compile_hgemm_to_cache() validates parameters using gemm_kernel.get_rocm_arch(), not target_gfx. If that query returns gfx1250, the shared-memory capacity lookup fails and all four subcases raise ValueError before reaching the dtype assertions. Mock the query to return gfx950 alongside run_cached so this regression is independent of the host architecture.
- The comment said CI runs tests/ in a 10-minute step; aiter_test.sh runs each tests/ file under `timeout 60m`.
- State the real limit and why the 240 s budget still matters: a hung child fails with its output, not the file.
- The comment cited a 60m per-file limit from aiter_test.sh; CI sets AITER_TEST, so that arm never ran tests/ files
- The tests/ step it replaced (10 minutes, pytest -q tests) was removed from aiter-test.yaml by ROCm#8352
- State only what the budget does: a hung child fails this test with its output
…ettings and probe via chip_info
- Children no longer inherit COMPILE_ONLY, and FLYDSL_RUNTIME_ENABLE_CACHE is forced to 1
- The device probe reads the arch and CU count through get_gfx_runtime() and get_cu_num(), the pair tuned_gemm uses
- The probe prints nothing on a non-ROCm torch or when the helpers raise, so the test skips instead of failing
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The test fixture uses inherited CU_NUM rather than the runtime’s device-scoped CU count, which can produce an unselectable tuning row and a dispatch assertion failure unrelated to cache reuse.
The reason will be displayed to describe this comment to others. Learn more.
Addressed: the test now probes device 0 through the same device-scoped helper the runtime uses, _device_arch_and_cu(torch.device("cuda", 0)) (tests/test_flydsl_aot_replay.py:251), and clears the inherited CU_NUM for its child processes (:328). No further change.
…ks its row up
- Read device 0's arch and CU count through _device_arch_and_cu, which gemm_a16w16 uses on gfx950
- Skip unless get_gfx_runtime() agrees, as flydsl_hgemm requires, and catch AssertionError from mixed-CU hosts
- Clear CU_NUM, AITER_AOT_REPLAY, FLYDSL_GPU_ARCH and ARCH from the children's environment
- With CU_NUM=80 exported the old probe fails the test on a 256-CU gfx950; the new one passes
- Name the GPU test in the module docstring instead of calling it the last one
…onment from failing it
- Register tests/test_flydsl_aot_replay.py in split_tests.sh next to test_flydsl_aot_cache.py, as HK12 asks
- Import aiter inside the probe's try block so an unreadable arch skips the test instead of failing it
- Clear AITER_AOT_IMPORT and AITER_TRITON_ONLY from the children; with AITER_AOT_IMPORT exported the old test failed
github-actionsBot
changed the title
[Test] Check that an A16W16 AOT replay cache serves a RUN_ONLY runtime
[CI] [Test] Check that an A16W16 AOT replay cache serves a RUN_ONLY runtime
Nov 22, 2026
The reason will be displayed to describe this comment to others. Learn more.
They live under tests/ (alongside tests/test_flydsl_aot_cache.py from #8356 and tests/test_flydsl_aot_launch.py from #8451) for three reasons:
Runner dispatch in .github/scripts/aiter_test.sh:109:tests/test_*.py is matched by glob and run via python3 -m pytest -q "$file". Files under op_tests/flydsl_tests/ default to python3 "$file" unless each path is also hardcoded in aiter_test.sh (test_flydsl_aot_replay.py has no __main__ and would exit 0 running 0 tests; test_flydsl_aot_cache.py / test_flydsl_aot_launch.py require --child in __main__ and would fail).
Test contract (.github/instructions/aiter-ops-flydsl.instructions.md:14 / aiter-op-test):op_tests/flydsl_tests/** is scoped to @benchmark() + run_perftest + checkAllclose operator sweeps, whereas tests/test_flydsl_aot_{cache,launch,replay}.py are pytest unit/subprocess regression suites (mostly CPU dry_run checks).
If you'd like all three tests/test_flydsl_aot_{cache,launch,replay}.py consolidated into op_tests/flydsl_tests/ (with a matching op_tests/flydsl_tests/test_*.py pytest pattern in .github/scripts/aiter_test.sh and doc updates), I'm happy to send a dedicated follow-up PR—or do it here if you prefer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FLYDSL_RUNTIME_RUN_ONLY=1process must then rungemm_a16w16from that cache.int32->int64) is no longer needed.gemm_a16w16.Motivation
int32; the runtime usesint64.Changes
tests/test_flydsl_aot_replay.py: newtest_a16w16_aot_cache_serves_a_run_only_process.python -m aiter.aot.flydsl.gemm --csv <one ks7 row>into an empty cache (M=2, N=256, K=7168, split-K 7).FLYDSL_RUNTIME_RUN_ONLY=1process runsaiter.tuned_gemm.gemm_a16w16on that shape.gemm_a16w16dispatched to FlyDSL, so a missed row cannot pass on a fallback kernel._device_arch_and_cu, whichgemm_a16w16uses on gfx950, and requiresget_gfx_runtime()to agree.COMPILE_ONLY,CU_NUM,AITER_AOT_REPLAY,FLYDSL_GPU_ARCHorARCH.AITER_AOT_IMPORTorAITER_TRITON_ONLY, which makeimport aiter.tuned_gemmfail in the run-only child.GPU_ARCHS.aiterinside itstry, so an unreadable arch skips the test..github/scripts/split_tests.sh: lists the test next totests/test_flydsl_aot_cache.pyandtests/test_flydsl_aot_launch.py, so CI shards run it.Performance (if applicable)
Testing
Documentation
Docstrings updated
User guide updated
Performance guide updated
No documentation change is needed, with the reason stated below
Test-only change.
Dependencies
Breaking Changes
None.
PR Self-Review
Reviewed revision
df9ed677f1dcf957175661ea5060176f59ff1914Behavior and intent
df9ed677fmerges mainbf5994891a: keeps bothtests/test_flydsl_aot_launch.py([FlyDSL] [CI] Launch FlyDSL AOT cache entries through _run_compiled #8451) andtests/test_flydsl_aot_replay.pyinsplit_tests.sh.c315b6bbaregisterstests/test_flydsl_aot_replay.pyinsplit_tests.sh, moves the probe'saiterimports insidetry, and clearsAITER_AOT_IMPORTandAITER_TRITON_ONLY.8c790d5adprobes device 0 with_device_arch_and_cu(matchinggemm_a16w16on gfx950) and clears inheritedCU_NUM,COMPILE_ONLY,AITER_AOT_REPLAY,FLYDSL_GPU_ARCH, andARCH.a9ec0d9faand0601e5384assert FlyDSL dispatch (solMap["flydsl"]) and use seeded{-1, 0, 1}inputs so all 256 columns are distinct and exact in bf16.Validation and unverified scope
pytest -q tests/test_flydsl_aot_replay.py:df9ed677fwithflydsl==0.5.3: 22 passed, 2 skipped in 32.8 s (the skips report "torch already has out_dtype meta support").c315b6bba: 22 passed, 2 skipped in 23.9 s;-k run_only_processpasses withCU_NUM=80 AITER_AOT_IMPORT=1 AITER_TRITON_ONLY=1exported.bash .github/scripts/split_tests.sh --shards 8 --dry-runliststests/test_flydsl_aot_replay.py.RUN_ONLYsubprocess against an empty cache fails withno usable AOT cache for gemm_a16w16_gfx950.PR-specific question
.github/scripts/split_tests.shonly appends the static repo-relative string"tests/test_flydsl_aot_replay.py"to theALL_FILESshard list; it reads no PR title, body, branch name, or external input and changes no workflow trigger (pull_request, notpull_request_target) or token permissions.gemm_a16w16changes the FlyDSL cache key and causes aFLYDSL_RUNTIME_RUN_ONLY=1miss, whichtest_a16w16_aot_cache_serves_a_run_only_processcatches across two fresh processes.Changed op tests
None. No
op_tests/file changes (tests/test_flydsl_aot_replay.pyis undertests/).