Skip to content

[JIT] [Perf] Reduce Python overhead in tuned GEMM dispatch - #8030

Open
ZLkanyo009 wants to merge 1 commit into
mainfrom
lingzha/tgemm-eager-fast-path
Open

ZLkanyo009 wants to merge 1 commit into
mainfrom
lingzha/tgemm-eager-fast-path

Conversation

@ZLkanyo009

@ZLkanyo009 ZLkanyo009 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Reduce Python metadata and tensor-descriptor work in the ordinary tuned GEMM path. Calls continue through the registered custom ops and plugin routing; there is no parallel eager hipBLASLt bypass. This PR contains three GEMM product files and three directly related test files, with no CI, workflow, selector or snapshot-golden changes.

Changes

  • Cache architecture/CU metadata by explicit device, resolving an unindexed CUDA device before caching. Use dtype objects in the config LRU key and convert to the existing CSV strings on misses; keep the shape-recording flag cache.
  • Let only _hipb_mm opt into a private, locked, 1024-entry cache for its const mat2 descriptor. The key includes pointer, shape, strides, dtype and device. The cache retains no Tensor or Storage; subclasses and other arguments use the original conversion path.
  • Preserve registered public ops, plugin routing, fake implementations, output handling, logging, ABI checks and live stream selection. Main's M=0 return remains before any architecture/cache/backend lookup.
  • Keep the descriptor-cache CPU tests, tuned-config/device-cache lookup tests and public-dispatch operator test. The gfx1250 legacy fixture checks the actual TDM launcher, transposed B view, forwarded parameters and strict-target rejection.

This follows the maintainer's request to optimize the normal path. Acceptance of the opt-in compile_ops(tensor_cache_args=...) contract in the shared JIT core remains a separate design-review question.

Performance

The implementation at 2f20b055 was measured against c86d490828097b26aade3e6002a5537cc56ddb52, which includes merged #8116, on one gfx942 80-CU partition with Torch 2.10.0 / ROCm 7.2.4. Both arms used the same native build, real config lookup, selected solutions/kernels, inputs and output SHA-256 values. The parallel eager bypass has been removed.

Three paired rounds completed in order A1, B1, B2, A2, A3, B3. Each process measured all six cases with 31 warm-host, 31 cold-host and 20 GPU-event samples per case; table values are medians of the three per-round medians, in microseconds.

M × N × K Output Warm host base → head Cold host base → head Event span base → head
256 × 512 × 1024 allocate 48.868 → 46.660 103.431 → 99.418 81.881 → 82.421
256 × 512 × 1024 out 44.328 → 42.716 94.185 → 90.075 76.221 → 76.441
1056 × 324 × 10240 allocate 52.765 → 51.715 109.682 → 107.157 244.422 → 242.982
1056 × 324 × 10240 out 48.787 → 47.045 100.998 → 98.467 238.762 → 239.341
2112 × 513 × 2560 allocate 48.376 → 46.380 101.782 → 99.526 157.561 → 157.961
2112 × 513 × 2560 out 44.827 → 42.242 93.119 → 89.845 152.021 → 152.201

Stable performance improvement is not established by this run. Aggregate warm-host medians are 1.99%–5.77% lower and cold-host medians 2.22%–4.36% lower, but B1 is slower than A1 in every host case and the later two rounds reverse that sign. The between-round drift is material relative to the measured difference. No current-head model or TTFT gain is claimed.

Event spans change by −0.59% to +0.66% and include gaps waiting for host submission; they are not isolated kernel durations. The cold recipe is an 8 MiB NumPy sweep plus unrelated Python work, not a guarantee that every hardware cache is cold. Gate/selection file tracing was disabled for all measurement processes. Solutions were selected for correctness/repeatability, not speed.

Complete result, all round medians, protocol and evidence hashes. All nine workers exited successfully, all 63 exported files were verified, and the owned GPU resources were released.

Validation and limits

The following evidence retains its original revisions. Withdrawing the CI changes leaves all GEMM product and test blobs unchanged from d6ceec6a; it adds no new product, GPU or model measurement.

  • The existing nine descriptor CPU control-flow tests passed with zero skips, including independent execution, and five omitted-key-field mutations were detected. They execute extracted definitions with Tensor/FFI stand-ins, so they do not establish native ABI correctness.
  • Real-Torch lookup coverage combines 17 unchanged passing methods from the 6bf2b5cb full execution with the repaired gfx1250 method's 182 passing subcases. This is combined coverage, not a new full-suite run. The isolated CPU environment used Torch 2.10.0 / ROCm 7.2.4, prepared native modules, no compilation and no exposed GPU devices.
  • The bounded 2f20b055 GPU gate passed 12 public-dispatch cases, weight-lifetime/view checks, compile/graph checks and nine native-reuse rows. The broad many-configurations, concurrent-thread and short-lived-thread native checks were not run. Later main integration preserved the M=0 return and cache behavior in 12 CPU metadata cases plus an output-dtype rejection case; these used doubles.
  • Historical downstream runs at 2f20b055 include an actual R1 test passing at 0.965 against 0.93 and GPT-OSS at 0.8938589841 against 0.87. The V3.2 test failed before accuracy during graph setup: gemm_a8w8_blockscale_bpreshuffle, M=512/N=128/K=7168, BF16 output, no tuned config. That failure and the later CI investigation remain on record.

The SGLang explicit-method selection, timeout/retry/model-path adjustments, and added PR selectors for the descriptor and lookup suites are withdrawn from this PR. Main's existing CI is preserved. A green or skipped job that collects zero tests is not model validation; removing the selection change does not resolve the recorded V3.2 failure. The direct test sources remain available, but this PR no longer adds their CI wiring.

Stable performance improvement, full native/shared-path coverage and a passing V3.2 result remain unestablished. The public GEMM call contract is unchanged; no third-party dependency is added.

@ZLkanyo009
ZLkanyo009 requested a review from a team November 16, 2026 13:13
@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 8030 --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.

@aiter-bot

aiter-bot commented Nov 16, 2026 •

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision d0b7855627bf · 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. Which exact workload keys consume these configuration changes, and what evidence shows that unrelated shapes keep their previous selection?
  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_tuned_gemm_eager.py
  • FAIL — changed op test not explained in Changed op tests: op_tests/tuning_tests/test_a16w16_tuned_config_lookup.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.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Update: the plans hipb_mm keeps (commit 3) are now per thread, in 07fd771 (then merged with main at 65b9578; head 74df116).

  • Before, they lived in one global std::unordered_map with no lock, and a hit sets the bias pointer on the kept descriptor before hipblasLtMatmul. Two threads calling at once could race on insert / clear or hand one descriptor two bias pointers.
  • The map is now thread_local. Each thread builds, reuses and, at exit, releases its own plans, so no descriptor is shared. hipb_destroy_extension releases the calling thread's plans and bumps a generation counter; other threads drop plans built for the old extension before their next lookup.
  • GIL: the pybind binding of hipb_mm does not release it, so Python threads already take turns. This matters for callers that do not hold the GIL (free-threaded Python, or a binding that later releases it).

Validation (MI308X, module_hipbsolgemm rebuilt with the prebuilt module's flags):

  • op_tests/test_hipb_mm_reuse.py, 3 new cases:

    • 4 threads interleaving configurations and biases match a single thread bit for bit;
    • a thread that outlives a destroy / create rebuilds its plans;
    • short-lived threads release theirs.

    Because of the GIL these threads take turns, so the cases cover the per-thread paths, not a true concurrent race; the shared-map build passes them too. All 11 cases pass, and test_tuned_gemm_eager.py passes 59 / 59.

  • test_gemm_a16w16.py (normal, normal -b, skinny, out, compile) and the tuned-config lookup test give the same results as the baseline. The known out asm case and the 8 gfx1250 subtests fail on both.

  • Host time per call is unchanged, with the same output SHA-256.

  • TTFT, SGLang plugin, 8192 / 6080, c=1, 4 server runs × 17 rounds per build: median 208.3 ms per-thread vs 214.2 ms shared map, so no slowdown.

The PR description is updated accordingly.

cc @valarLip

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

CI: Standard Tests (1 GPU) (linux-aiter-mi35x-1, MI35X, 8, 5) failed in op_tests/test_hipb_mm_reuse.py::test_many_configurations (10 of 11 passed; test_tuned_gemm_eager.py passed in shard 1). Fixed in the test only, be8b061.

  • What failed: the test compares kept[i] with a call after destroying and recreating the extension. Every view in that test has its own leading dimension, so kept[i] is itself the first call of its configuration: both sides were freshly built descriptors and nothing was reused. Two fresh builds of the same solution giving different bits means the solution hipb_findallsols returned first for this 64x64x64 problem on gfx950 is not deterministic run to run (for instance a K-split kernel). That is a property of the kernel, not of the reuse, and the change itself behaves on gfx950 as on gfx942: the solution index, the descriptors and the hipblasLtMatmul call are the ones the old path built, and the status is checked as before.
  • The fix: _solution now returns the first of up to 8 solutions whose results match across two freshly built extensions, for every input the test compares (here the six checked leading dimensions), and skips if none does. All tests in the file use it. With that premise checked, test_kept_descriptors_match_fresh_ones now asserts build == reuse instead of skipping when they differ, so the reuse checks are stricter than before.
  • Verification: lint and collection pass locally. I have no gfx950 here and no GPU assigned for this round, so the MI35X run that this push triggered is the check; I will follow it.

#8038 (stacked on this PR) has merged this branch (f9ddb25).

cc @valarLip

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Follow-up on the test-only fix in be8b061: I re-ran op_tests/test_hipb_mm_reuse.py at be8b061 on MI308X (gfx942, 80 CU), with module_hipbsolgemm JIT-built from this head: 11 passed. So the deterministic-solution selection also holds on gfx942, where the main-branch MI300X job will run this file. The MI35X shard (Standard Tests (1 GPU) ... MI35X, 8, 5) is re-running on the new head.

cc @valarLip

Comment thread op_tests/test_hipb_mm_reuse.py Resolved
@ZLkanyo009

ZLkanyo009 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

test_many_configurations failed again on MI35X at be8b061 (job). This push adds a test-only commit, aadb785.

Why be8b061 was not enough. Its premise was wrong. Both MI35X runs used solution 441462 for the 64x64x64 problem. Decoding the gfx950 hipBLASLt library of ROCm 7.2.4 (the CI image's version) shows it is the hand-written kernel Custom_Cijk_Alik_Bljk_BBS_BH_MT256x256x64_MI16x16x1_UserArgs_shortname1_gfx950, which hipBLASLt's own selection table maps only to 4096x4096x8192-class problems. For 64x64x64 it runs one workgroup with GSU 1, no workspace and no atomics, and its beta = 0 store path never reads C. So it is not a K-splitting kernel.

Its disassembly shows what does happen:

  • It loads A and B straight into LDS (buffer_load_dwordx4 ... lds).
  • When K equals its depth (64), it skips the 16 prefetch loads of the second iteration.
  • Before reading LDS it still waits with s_waitcnt vmcnt(24) and vmcnt(16). Those thresholds assume 32 loads in flight, and no vmcnt(0) follows before the MFMAs.
  • With only 16 loads in flight, both waits pass at once, so the kernel can read LDS before its loads land.

Its result then depends on load latency and on what the LDS last held. That happens with fresh descriptors as much as with kept ones, since the old path runs the same kernel with the same arguments. Two agreeing runs right after a synchronize said nothing about 1100 back-to-back calls. This also fits the log: the printed elements (rows 0, 1 and 63) are equal and only some elements differ, whereas a reuse bug changes nearly every element (the mutants below show this). With K >= 512 the kernel takes its regular prefetch path. The other cases in this file all use K >= 512 and passed on MI35X; the bias-free bf16 ones most likely ran this kernel too (the run does not print which solution a passing case used). aiter's tuned tables do not use solutions 441460-441462.

What the test does now (aadb785):

  • test_many_configurations uses K = 512, several unroll steps of that kernel. It also calls the checked views again after the drop, so descriptors kept across the drop and descriptors rebuilt after it are both compared.
  • Every comparison of kept results goes through _check_reuse. The same call on two freshly built extensions decides how to compare:
    • If the two agree bit for bit, every kept result must match them bit for bit. Before failing, the check takes four more fresh results. If all six agree, the kept result fails as a reuse bug, and the message names the solution, its kernel and the differing elements.
    • If fresh results vary, the kernel itself is not reproducible for that input. Kept results are then held to a float32 torch reference instead (atol = rtol = 1e-2).
    • In both cases every fresh result is held to that reference, as the review asked. A kernel that computes the wrong product now fails instead of only being compared with itself.
  • _solution still prefers a solution that agrees across two fresh builds, but falls back to the first one instead of skipping.

Real bugs still fail. On MI308X I rebuilt module_hipbsolgemm with two mutations and ran the file as is and with the tolerance path forced for every comparison:

module_hipbsolgemm as is tolerance path forced
unchanged 11 passed 11 passed
bias pointer not updated on reuse both bias cases fail (all elements differ, max 5.3) the same 2 fail
ldb left out of the plan key test_configurations_do_not_mix and test_many_configurations fail (every row but row 0 differs, max 6.0) the same 2 fail

Local runs (MI308X, gfx942, at aadb785, module_hipbsolgemm JIT-built from this head): test_hipb_mm_reuse.py 11 passed (4 pytest runs and python3), every comparison on the bit-for-bit path; test_tuned_gemm_eager.py 59 passed. The file takes as long as before, about 31 s. gfx950 is covered by the MI35X run this push triggered.

#8038, which is stacked on this PR, has merged this branch (c8004f4). Both PR descriptions are updated.

cc @valarLip

@ZLkanyo009

ZLkanyo009 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@valarLip Pushed aadb785..f9d17dc: three commits from a self-review against the maintainer guidelines, and a merge of main (#7798 changed _gemm_a16w16, which conflicted). No review comments are open; zoe-cop's MI35X thread was answered at aadb785, where CI was green.

Self-review against the maintainer guidelines

Finding Commit Change
Both op tests were pytest files (fixtures, parametrize, pytest.main). 5a54959 They are plain aiter op tests now: helpers and @benchmark test functions at module level, main() with the parser and the sweeps, a markdown table per test function, an arch gate on get_gfx_runtime() in main(). CI runs them as before, as python3 <file>.
Several eager cases read the tuned CSVs and skipped where a shape was not tuned to hipBLASLt, MI35X among them. 5a54959 Each shape is routed to hipBLASLt by a lookup installed over get_GEMM_A16W16_config, the attribute both paths call through, so every case runs on every card.
To see which path ran, the tests replaced the module's custom-op attributes and reset its state. 5a54959 The path is read from the profiler: a custom-op call is a dispatcher event (aiter::gemm_a16w16 / _out), and the fast path records none. The first call of a process is checked first in main(), and AITER_TUNE_GEMM=1 in a child process.
The fast path read three torch mode checks through getattr(torch._C, ..., None) and turned itself off when one was missing. 674d326 torch 2.1 and 2.4 have all three, so that branch could not run. They are called directly.
_gemm_a16w16 and the fast path each derived the (gfx, cu_num) of the lookup. 674d326 Both call _gemm_gfx_cu; the fast path still keeps the result per device. #7798 moved that fallback to get_gfx_runtime(), and the merge keeps it in the shared helper.
A str(dtype) cache with no measured gain. 674d326 Removed: 45 ns uncached vs 28 ns cached per call on this host, two per GEMM.
The path checks compared torch-path and compiled results with torch.equal; on another card hipBLASLt may pick a kernel that is not reproducible run to run. f9d17dc They go through _check_bits like the rest of the file: the bits must match where the op reproduces itself, and every result is held to a float32 reference.

Found while rewriting: torch.set_default_device installs a TorchFunctionMode, so every call under it takes the custom op. The test covers that now, and the description names it.

test_hipb_mm_reuse.py keeps the cases, _solution, _check_reuse and K = 512 of aadb785, so the MI35X fix stays as it was.

Verification (MI308X, gfx942, at f9d17dc, module_hipbsolgemm JIT-built from this branch's C++, which has not changed since 07fd771):

  • black 26.10.1 and ruff 0.16.0: clean.
  • python3 op_tests/test_tuned_gemm_eager.py: passes in 32 s (96 sweep cases, 29 path checks). Its table gives the host time per call; the medians per shape are 61–62 µs for the custom op and 31–32 µs for the fast path.
  • python3 op_tests/test_hipb_mm_reuse.py: passes in 32 s, every comparison on the bit-for-bit path.
  • Each of these makes the new tests fail: no grad check, the weight-handle key without the shape, bias dropped, no torch-function check, no libtype check (crashes), no shape-recording check, and the two hipbsolgemm.cu mutants from aadb785 (bias pointer not updated on reuse, ldb left out of the plan key), JIT-built.
  • op_tests/test_gemm_a16w16.py -t normal, -t compile, -t out and op_tests/tuning_tests/test_a16w16_tuned_config_lookup.py: the same results as at aadb785 (-t out fails on the known asm tuned 256x256x4096 case, and the lookup test has the same 8 gfx1250 errors, on both).
  • No numeric path changed, so GSM8K was not rerun.

Waiting for the MI35X run on f9d17dc. #8038, which is stacked on this PR, has merged this branch (4541de3).

ZLkanyo009 added a commit that referenced this pull request Nov 17, 2026
`plain_eager` read torch._C._len_torch_dispatch_stack,
_are_functorch_transforms_active and _is_tracing through getattr with a
None default, and `probes_available` turned the FP8 GEMM and quant fast
paths off when one was missing. torch 2.1 and 2.4 have all three, so that
branch could not run (the same change as #8030's 674d326). The checks
are now called directly, and `probes_available` is gone from the two
callers. `plain_tensor_type` is private: only `plain_eager` uses it.

No change in behaviour. On MI308X (gfx942): op_tests/test_a8w8_eager.py,
test_quant.py, test_gemm_a8w8_bpreshuffle_out.py and
test_gemm_a8w8_bpreshuffle_pad_k.py (84 passed, 21 skipped) pass.

Co-authored-by: Cursor <[email protected]>
ZLkanyo009 added a commit that referenced this pull request Nov 17, 2026
Same structure as #8030's test_tuned_gemm_eager.py: plain aiter op test
functions, main() with the parser and the sweeps, a markdown table per
test function, an arch gate on get_gfx_runtime().

- The GEMM shapes are routed by a function installed over
  get_GEMM_config_with_quant_type, the attribute both paths call through:
  each shape runs once as a CK row and once with no row, so the test no
  longer reads the tuned CSVs and runs the same cases on every card. A
  CKTile row and a K-padded weight check that the fast path declines.
- Which path ran is read from the profiler, as in #8030's test.
- GEMM results are compared with the custom op bit for bit and with a
  float32 dequantized product; quant results with the custom op bit for
  bit, their scales with aiter.pertoken_quant, and every dequantized
  value to within one quantization step of the input. The tables carry
  device time, host time per call, TFLOPS / TB/s and error.
- AITER_LOG_MORE=2 is set in a child process instead of patching the
  module.

On MI308X (gfx942) the file passes in 21 s. Host time per call, custom op
vs fast path: GEMM 23.4-24.2 vs 14.7-15.0 us, quant 31.6-32.6 vs
21.1-21.4 us (the 2112-row shapes). Each of these mutations makes it
fail: no grad check in plain_eager, a non-CK row taken as CK, no K
check, a static quant scale ignored, the quant stream not set.

Co-authored-by: Cursor <[email protected]>
@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

MI35X run on f9d17dc (44050614739): 7 of 8 standard-test shards pass, including the two files this PR changes (test_tuned_gemm_eager.py in shard 1, test_hipb_mm_reuse.py in shard 7).

Shard 5 fails in op_tests/flydsl_tests/test_flydsl_allreduce_rank_agreement.py::test_matching_ranks_build[fused] with AttributeError: 'CustomAllreduce' object has no attribute '_is_gfx1250'. The failure comes from main, through the merge at e06d286:

This PR touches neither file, so the failure is the same without it. Merging main again will clear it once main fixes that test.

cc @valarLip

@ZLkanyo009 ZLkanyo009 changed the title [Perf] tuned_gemm: eager hipBLASLt fast path and hipb_mm descriptor reuse [Perf] tuned_gemm: eager hipBLASLt fast path Nov 17, 2026
@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Pushed f9d17dc..8985895: a merge of main (b9e08da, no conflicts) and one commit that moves the C++ plan reuse out of this PR.

Split. This PR was about 1,500 lines in 4 files, over aiter's 1000-line review bar, and its two halves are independent: the Python fast path does not need the C++ change and the C++ change speeds up the existing custom-op path on its own. The C++ half (gradlib/csrc/hipbsolgemm.cu: layouts, descriptor and algorithm kept per configuration and per thread) and its test op_tests/test_hipb_mm_reuse.py, with the MI35X fixes, are now #8116, so each half can be reviewed and reverted on its own.

Commit What
f0df5f2 merge main
8985895 hipbsolgemm.cu back to main's version, test_hipb_mm_reuse.py removed. Nothing in aiter/tuned_gemm.py or op_tests/test_tuned_gemm_eager.py existed only for the plan reuse, so neither changes.

This PR is now aiter/tuned_gemm.py and op_tests/test_tuned_gemm_eager.py, +795 / −9. The title drops "and hipb_mm descriptor reuse", and the description now shows only this PR's numbers, each with the revision it was measured on.

Verification at 8985895 (MI308X, gfx942):

  • python3 op_tests/test_tuned_gemm_eager.py: passes, 96 sweep cases all bit-for-bit with the custom op, 29 path checks, 33 s.
  • The same test against main's tuned_gemm.py fails at its first path check (call 2 of the process: took the custom op). These six mutations of tuned_gemm.py fail it too: no grad check, the weight-handle key without the shape, bias dropped, no torch-function check, no shape-recording check, no libtype check (the last one crashes the process).
  • Host time of one tgemm.mm call, weighted over the 7 prefill shapes, main b9e08da vs this head, three alternating runs each: 54.1 → 28.0 µs warm, 111.0 → 56.8 µs cold, so 15.6 → 8.1 ms and 32.0 → 16.4 ms of GEMM host time per forward. The output SHA-256 of every shape is the same on both.
  • black and ruff 0.16.0: clean.
  • TTFT and GSM8K were not rerun: the numbers in the description are from the first two commits of this PR (0cdedc1, 5ed428b). The fast path's per-call host time then was 28.1 / 57.5 µs, the same as now.

CI shard 5 (test_flydsl_allreduce_rank_agreement.py::test_matching_ranks_build[fused], AttributeError: 'CustomAllreduce' object has no attribute '_is_gfx1250', see my previous comment): main fails it too. Main's own Aiter Test at ff2f0ce (run 44045525271, MI35X shard 3) fails the same test with the same error; the shard number differs because the file list differs. It is still there at b9e08da (_init_fly_rms() reads self._is_gfx1250, which the test's CustomAllreduce.__new__ object never sets), so the new run here will likely show it again.

Waiting for: MI35X Aiter Test on 8985895 (run 44099742981).

cc @valarLip

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

The MI35X Standard Tests shard 5 failure here (job: op_tests/flydsl_tests/test_flydsl_allreduce_rank_agreement.py::test_matching_ranks_build[fused], 'CustomAllreduce' object has no attribute '_is_gfx1250') also happens on main and does not come from this PR; #8117 fixes it.

ZLkanyo009 added a commit that referenced this pull request Nov 17, 2026
Main's #6828, merged in with #8030, adds signed-INT8 operands to
gemm_a8w8_bpreshuffle and makes its FP8 path assert that XQ has WQ's dtype.
The fast path checked only WQ's dtype, so an XQ of another dtype with an FP8
WQ ran the CK kernel where the custom op now raises. The fast path now
declines unless XQ and WQ are both FP8. INT8 calls run FlyDSL kernels, which
it never stands in for, and reach the custom op as before.

#6828 also documents the INT8 contract on the custom op's body, which this
PR keeps as the private _gemm_a8w8_bpreshuffle_op, while the public
gemm_a8w8_bpreshuffle had a one-line, FP8-only docstring. The docstring
moves unchanged to the public function.

op_tests/test_a8w8_eager.py: a BF16 XQ with an FP8 WQ reaches the custom op
and its "dtypes must match" assertion. With the new check removed, the call
takes the fast path and the test fails.
Comment thread op_tests/test_tuned_gemm_eager.py Resolved
@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

@zoe-cop Pushed 8985895..f5b8e74: one commit for your fallback-timing follow-up. No merge of main was needed, since main has not changed aiter/tuned_gemm.py since 8985895.

Comment Commit What
time a GEMM routed to a non-hipBLASLt backend f5b8e74 test_fallback and a third summary table, "tuned_gemm fallback to other backends vs custom op". It routes a decode-sized BF16 GEMM (4x64x1024, inside the skinny kernels' default range on every arch) to torch, skinny and Triton with the existing config injection. For each backend it asserts that the public gemm_a16w16 reaches the custom op exactly once and gives the op's bits (the bitwise check falls back to the float32 reference only if the op itself is not reproducible). Then it times that call against _gemm_a16w16_op, the custom-op wrapper that was the public gemm_a16w16 before the fast path. _host_us now takes the median of five rounds, because a single round put one row at 102 µs.

Host time per call on MI308X (gfx942), f5b8e74. These rows come from python3 op_tests/test_tuned_gemm_eager.py, two runs on this branch and one on #8038 after merging it:

Backend custom op wrapper gemm_a16w16 (fast path declines) extra
torch 28.7–30.3 µs 31.7–33.7 µs 3.0–4.0 µs
skinny 28.3–29.2 µs 31.8–35.6 µs 3.5–6.4 µs
Triton 82.7–85.4 µs 89.2–91.8 µs 6.4–7.1 µs

Where the extra goes. In a tight loop, a declined _hipblaslt_eager call costs 2.4 µs, and the get_GEMM_A16W16_config call inside it costs 0.55–0.67 µs. So the second lookup is about 0.6 µs of the 3–7 µs, and the rest is the guard checks that have to run before the shape is read: dispatch and torch-function modes, functorch, tensor types, autograd, and view/device/dtype. I did not remove the duplicate lookup, for three reasons:

  • A config found outside cannot be handed to the custom op without adding it to the op's schema. That would be an argument that exists only for this call site.
  • Caching the "not hipBLASLt" answer would break the replaced-lookup contract that check_replaced_lookup tests.
  • Doing the lookup before the guards would touch .shape/view under modes and subclasses that have to see the call first.

None of these is worth 0.6 µs.

Against the pre-fast-path tree. I also compared the merge base b9e08da with this head in separate processes: hostbench bursts of 16, median of 7 rounds, CPU 92, two alternating warm runs and one cold run. The scratch script is not committed. On these routes, tgemm.mm per call is:

Backend, shape warm, b9e08da → f5b8e74 cold, b9e08da → f5b8e74
torch 32x256x512 31.8 / 31.7 → 32.6 / 31.7 µs 71.8 → 72.5 µs
skinny 4x64x1024 33.8 / 31.1 → 34.3 / 32.1 µs 70.7 → 71.9 µs
asm 64x256x512 47.1 / 43.5 → 46.3 / 44.3 µs 87.9 → 91.0 µs
Triton 48x256x512 90.1 / 88.0 → 90.2 / 88.0 µs 147.7 → 151.2 µs

The fallback therefore costs 0–1 µs warm and 1–3.5 µs cold against the wrapper it replaced, rather than the 3–7 µs that the in-tree table shows. The custom op body itself got 1–2 µs cheaper in this PR, because save_shapes reads AITER_TUNE_GEMM once instead of on every call, and that saving offsets most of the declined check. The output SHA-256 is the same in both trees for torch, skinny and Triton; asm split-K differs from run to run in both trees.

asm is not in test_fallback. Its split-K result is not reproducible, and for this shape 1 of 256 elements misses checkAllclose's 0.01 tolerance by one BF16 ulp. With splitK=1, the kernel it picked faulted on this shape. I left asm out rather than loosen the tolerance for one backend.

Verification at f5b8e74 (MI308X, gfx942; gfx950 not run here):

#8038 merged this head (bbc15e6, merge only) and its test passes there.

Waiting for: MI35X Aiter Test on f5b8e74.

cc @valarLip

@zoe-cop

zoe-cop commented Nov 18, 2026

Copy link
Copy Markdown

yes, f5b8e74 resolves this. test_fallback routes the 4x64x1024 BF16 GEMM to torch, skinny and Triton, asserts exactly one custom-op call with the op's bits, and times gemm_a16w16 against _gemm_a16w16_op over five rounds, so the declined path's cost is recorded in-tree.

The in-tree 3–7 µs overstates the change against main because that baseline is also cheaper here; your 0–1 µs warm / 1–3.5 µs cold comparison covers that. No further change requested here.

— zoe-cop · automated reply.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

@valarLip Pushed 3de45f9..84f7f18: one merge of main (c28a838), to clear the conflict with #8075 (ee71544), which routes _gemm_a16w16 through the kernel plugin interface.

Conflict. It is in aiter/tuned_gemm.py, and only there. Both sides added an import at the same place and code right above _gemm_a16w16: this branch the eager fast path, main the @_route(op="gemm_a16w16", version=1) decorator. I kept both, with the decorator on _gemm_a16w16 as main has it. Main's out= check in the guarded gemm_a16w16_out merged without a conflict.

Fast path and the plugin route. The fast path calls hipBLASLt without reaching _gemm_a16w16, so as merged it would have skipped the route: an enabled provider would never have been asked. _hipblaslt_eager now declines while any provider is enabled and AITER_PLUGINS is not 0. In that state the call goes through the custom op to the route, which asks the providers and records its decision. The fast path runs only in the state where the route's dispatch calls the native body and records nothing (the kill switch, or nothing enabled by configure()). It decides that from the same config snapshot the dispatch reads, once per call. No new environment variable or parameter.

Commit What
84f7f18 The merge: the resolution above. Also check_plugin_route in op_tests/test_tuned_gemm_eager.py: with a provider enabled for gemm_a16w16, tgemm.mm with and without out= runs the provider (last_decision().route == "provider"). When the provider declines, the custom op runs with its bits (route == "native"). With nothing enabled again, the fast path takes the call.

Verification at 84f7f18 (MI308X, gfx942; gfx950 not run here):

  • python3 op_tests/test_tuned_gemm_eager.py: passes. 96 sweep cases and 3 fallback rows, all bit for bit with the custom op, plus 33 path checks, 4 of them with a plugin enabled; 38 s.
  • Mutation: without the new check in _hipblaslt_eager, it fails at plugin serves the call: the provider did not run.
  • pytest -q tests: 489 passed, 2 skipped, 1 failed. test_plugin_contracts.py 18 passed, test_plugin_routed_ops.py 59 passed, test_plugin.py 127 passed. The one failure, test_mega_moe_gfx1250_recipe.py::test_layout (_ArenaLayout 696320 vs 687104 bytes), fails the same way on main c28a838.
  • python3 op_tests/test_gemm_a16w16.py -t normal and -t compile: exit 0. -t normal prints the same two non-fatal asm accuracy warnings (64x256x5120) as main.
  • black 26.10.1 and ruff 0.16.0: clean.

Host time per tgemm.mm call, weighted over the 7 prefill shapes. Same method as in the description, on another GPU and core of the same machine, trees in turn:

main c28a838 before the merge, 3de45f9 after the merge, 84f7f18
warm, 3 runs 55.2 / 55.1 / 62.1 µs 28.1 / 27.9 / 27.8 µs 27.8 / 27.8 / 27.8 µs
cold, median 114.0 µs (3 runs) 58.7 µs (6 runs) 59.6 µs (6 runs)

The route's dispatch does not eat the gain: with nothing enabled, the fast path costs the same as before the merge, and the output SHA-256 of every shape is the same in all three trees.

The limit is that the gain lasts only while no provider is enabled. With a provider enabled that serves another op only, tgemm.mm on 1056x324x10240 goes from 28.5–28.7 µs to 54.9–63.7 µs. The call then runs through the route and records provider-op-unsupported, as it does on main. Keeping the fast path in that state would mean skipping a decision the route records, so I left it to the route.

I updated the description: the plugin condition under Changes, the post-merge numbers under Performance, and Reviewed revision 84f7f18.

Waiting for: Aiter Test on 84f7f18. #8038 will merge this head next.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

@valarLip Pushed 84f7f18..1243b4b: one merge of main (42aab0f), to clear the conflict with #7514 (a3d7388, gfx1250 a16w16 OPUS tuning).

Conflict. It is in aiter/tuned_gemm.py, and only there. Main added _opus_reads_layout right above _gemm_a16w16, where this branch has _gemm_gfx_cu. I kept both; no line of either side changed.

Fast path and #7514. #7514 changes two things. The tuned lookup now resolves 96-CU OPUS rows on gfx1250 (and checks a strict device's kid under its own arch). _gemm_a16w16 now sends an OPUS row whose operands OPUS cannot read to Triton (torch off gfx1250). The fast path asks the same get_GEMM_A16W16_config with the same (gfx, cu_num) key and runs only hipBLASLt rows. So every OPUS row declines to the custom op, and both choices stay with it. No code change was needed beyond the merge.

Commit What
1243b4b The merge. Also check_gfx1250_opus in op_tests/test_tuned_gemm_eager.py. The device key is stubbed to a 96-CU gfx1250 and the OPUS / Triton backends are stubbed, but the lookup and the tuned CSVs are real: they give #7514's OPUS rows for 4x2112x7168 and 16x4096x512. Each call, through tgemm.mm and gemm_a16w16_out, reaches the custom op. The fast path and the op ask the lookup with the same key, and the op runs OPUS with that row, or Triton when B is not K-contiguous.

Verification at 1243b4b (MI308X, gfx942; no gfx1250 kernel ran, only the choice is checked):

  • python3 op_tests/test_tuned_gemm_eager.py: passes. 96 sweep cases and 3 fallback rows, all bit for bit with the custom op, plus 36 path checks; 40 s.
  • Mutations: the fast path keying its lookup by the runtime arch, or by the 256-CU table, and dropping the layout fallback from _gemm_a16w16 each make the new check fail.
  • python3 -m pytest -q op_tests/tuning_tests/test_a16w16_tuned_config_lookup.py: 15 passed, 8 failed. All 8 are TestLegacyFlydslHgemmConfigs (TDM HGEMM policies require gfx1250), the same on main 42aab0f. [OPUS] Tune gfx1250 a16w16 GEMMs for Kimi K2 on 96 CUs #7514's new classes pass.
  • pytest -q tests: 489 passed, 2 skipped, 1 failed (test_mega_moe_gfx1250_recipe.py::test_layout, the same on main 42aab0f).
  • python3 op_tests/test_gemm_a16w16.py -t normal and -t compile: exit 0.
  • black 26.10.1 and ruff 0.16.0: clean.

Host time per tgemm.mm call, weighted over the 7 prefill shapes, trees in turn:

main 42aab0f before the merge, 84f7f18 after the merge, 1243b4b
warm, 3 runs 53.5 / 54.6 / 53.7 µs 28.2 / 35.5 / 27.5 µs 27.9 / 28.1 / 28.6 µs
cold, 3 runs 114.8 / 116.1 / 115.9 µs 67.4 / 60.4 / 58.9 µs 59.1 / 57.8 / 57.8 µs

The load average was 15–21; the 35.5 and 67.4 µs runs are outliers. The output SHA-256 of every shape is the same on main and after the merge.

I updated the description: the gfx1250 case under Changes, the numbers under Performance, and Reviewed revision 1243b4b.

Waiting for: Aiter Test on 1243b4b. #8038 will merge this head next.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

@valarLip The Aiter Test Gate at 1243b4b987 is green (run 44476512333). That head is the second merge of main, with #7514.

  • On MI35X (gfx950), op_tests/test_tuned_gemm_eager.py passed, including the new check_gfx1250_opus and check_plugin_route rows.
  • Shards 4 and 5 failed twice before any test ran: an artifact download timeout, a Docker Hub token error, and a runner that dropped its log. They passed on the third attempt.

No further changes from my side; #8038 stays stacked on this head.

ZLkanyo009 added a commit that referenced this pull request Nov 23, 2026
Merge #8030 at be6286d, which incorporates main 2eb9ef3
and retains the CPU Torch fallback through the shared arch helper.

The five-file patch against the stacked base has the same stable patch
ID as before this merge. CPU GEMM resolution and Torch fallback bodies
are identical to the validated #8030 parent. Black, Ruff, AST parsing
and diff-check pass. No GPU or performance rerun; this remains stacked
on lingzha/tgemm-eager-fast-path.
@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

@valarLip Merged current main to resolve the conflict.

Merged main 2eb9ef3657777eebc0da3434074f4a67e1151c54 in be6286d7d8498c5d01709bd3f8ad8a63a4a409b5. The conflict was #8251's CPU Torch fallback versus this PR's shared architecture lookup. The merged path keeps the fallback and its FP32 CPU accumulation, calls the existing _gemm_gfx_cu helper inside the guarded lookup, and retains #8099's rejection of borrowed OPUS rows on gfx1250-strict.

CPU validation: provider interface/contracts 145 passed with GPUs hidden; Black, Ruff and diff-check passed. An isolated source-body probe with real CPU tensors checks 48 numerical and out-buffer cases against both main and a Torch reference, the CPU eager decline, output-dtype errors and architecture-error propagation. It reproduces the old-head CPU failure. This probe does not import the full GPU package or test GPU dispatch. The eager launch body's AST is unchanged; the Torch backend and tuned-lookup function ASTs match main.

No new GPU or performance run was made for this merge. Earlier GPU/performance results below remain tied to their stated revisions; new-head CI is pending.

@yzhou103

Copy link
Copy Markdown
Contributor

@valar-cop review

@valar-cop valar-cop left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

some changes needed..

downstream ci:atom / ci:sglang / ci:vllm at head be6286d? ttft/gsm8k numbers are from an older commit..

ci green.

Comment thread aiter/tuned_gemm.py Outdated
return result if ndim == 2 else result.view(*A.shape[:-1], n)


def gemm_a16w16(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this makes the launcher default for nearly every eager bf16/fp16 tgemm.mm, but only aiter jobs ran here. please add ci:all and get it green on this head, vllm not covered by the manual numbers..

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I checked the actual downstream logs for current head be6286d7d849. The ATOM accuracy jobs and vLLM benchmarks did execute successfully. However, the two green SGLang jobs did not run any tests:

Both report Unknown suite, No tests found, and Test Summary: 0/0 passed, then exit 0. Please fix the suite selection and rerun with nonzero tests before treating the SGLang part of this request as complete. This is a CI coverage gap, not evidence of a GEMM failure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@zoe-cop The zero-test selection is fixed by 6bf2b5cb, retained at current head a8c714e3ab7c. The helper invokes the existing R1-MXFP4 and V3.2 TP8 test methods explicitly, preserves their accuracy thresholds, and makes timeout exit 124 terminal.

Both selections now execute a test. At 2f20b055, R1 passed at 0.965 against 0.93. The current-head V3.2 job failed during decode-graph setup: gemm_a8w8_blockscale_bpreshuffle rejected M=512, N=128, K=7168 with BF16 output and config=None (This GEMM is not supported!). The native module built and imported before the error; no accuracy score was produced.

This closes the selection/zero-test defect, but not the request for all downstream CI to pass. The V3.2 cause remains unresolved, and I am leaving that requirement open. The earlier green jobs reporting 0/0 remain excluded from accuracy evidence.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

yes, the zero-test gap is closed at a8c714e3ab7c: the helper invokes both methods explicitly, the head R1 job is green, and V3.2 now executes instead of reporting 0/0.

I would not attribute the V3.2 failure to this PR. Its log shows a tuned-config miss for M=512, N=128, K=7168 on this gfx950 device, then the untouched gemm_a8w8_blockscale_bpreshuffle CK default raising This GEMM is not supported!; nothing in this diff reaches that op. Main's green V3.2 run used the suite command, not this method, so it is not a passing baseline. Running the explicit method at base c86d4908 would establish whether the gap is pre-existing.

— zoe-cop · automated reply.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Added ci:all for current head be6286d7d8498c5d01709bd3f8ad8a63a4a409b5, as requested in the downstream-CI review. The resulting runs are ATOM, SGLang, and vLLM. Results are pending; the earlier TTFT/GSM8K measurements remain evidence for their stated revisions.

@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: change the approach

Thanks for the detailed numbers. The problem is real: eager BF16/FP16 GEMMs spend 54 µs (warm) to 111 µs (cold) per call in Python against 19–37 µs for hipBLASLt itself, and a host-bound eager prefill pays that ~288 times per forward. We want this fixed, but not through a second dispatch path.

Why not a parallel fast path

  1. _hipblaslt_eager has to re-derive when it is safe to bypass the custom op: torch.compile/jit tracing, dispatch/function modes, functorch, tensor subclasses, grad, non-reshape inputs, non-hipBLASLt configs, enabled plugin providers, AITER_TUNE_GEMM / AITER_LOG_MORE, re-registered ops, the first call of a process. Every future change to _gemm_a16w16 must be mirrored there; it already needed two re-syncs (#8075, #7514) while this PR was open.
  2. Every non-hipBLASLt shape now pays the declined guard plus a second config lookup: +3–7 µs per call on torch / skinny / Triton by your own fallback table. Those are mostly the small decode shapes.
  3. The test is 716 lines for 277 lines of product code.

What we'd like instead

  1. Remove the per-call overhead from the normal path, so every caller benefits: the function-level import, the per-call device query, the str(dtype) in the lru_cache key, the per-call env read in save_shapes, and the per-call aiter_tensor_t conversion of the weight (your weight-handle cache is fine there).
  2. Re-measure tgemm.mm with the same protocol (warm/cold, same shapes, main vs head, output SHA-256), together with #8116.
  3. Only if what remains is the cost of the torch.ops dispatch itself and still matters for TTFT, propose a bypass limited to the hipBLASLt rows, with no extra cost on other backends, and a test sized to that change.

Please also give the PR a short squash message describing the final change.


Maintainer decision on the approach; no line-by-line review yet. Reviewed at the PR description and file list.

@github-actions github-actions Bot changed the title [Perf] tuned_gemm: eager hipBLASLt fast path [CI] [JIT] [Perf] tuned_gemm: eager hipBLASLt fast path Nov 26, 2026
@ZLkanyo009 ZLkanyo009 changed the title [CI] [JIT] [Perf] tuned_gemm: eager hipBLASLt fast path [CI] [JIT] [Perf] Reduce Python overhead in tuned GEMM dispatch Nov 26, 2026
ZLkanyo009 added a commit that referenced this pull request Nov 26, 2026
Preserve the ordinary BF16 dispatch and cache changes from #8030.
Keep the independent FP8 eager guard and clarify its module scope.

The four-file FP8 delta passed independent source review and
syntax/Black/Ruff/whitespace checks. No new GPU or performance
result is claimed for this merged head.
@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

@valarLip The change of approach in your review is implemented in 6bf2b5cb, retained at current head a8c714e3ab7c:

  1. Removed _hipblaslt_eager and the parallel wrappers. Calls use the normal registered custom-op/plugin route. Device metadata is cached by explicit device, config keys use dtype objects, shape recording keeps its cached flag, and only _hipb_mm opts into a bounded private cache for the const weight descriptor. Logging, ABI validation and live stream selection remain in the normal path.
  2. Re-measured the implementation at 2f20b055 against c86d4908, which includes merged [Perf] hipb_mm: keep hipBLASLt layouts, descriptor and algorithm per configuration #8116, on gfx942 using the same native build, six shape/output cases, inputs, selected solutions and output SHA-256 values. Three paired rounds completed in order A1, B1, B2, A2, A3, B3. Aggregate warm-host medians were 1.99%–5.77% lower and cold-host medians 2.22%–4.36% lower, but the first pair was slower in every host case and later pairs reversed that sign. These measurements do not establish a stable speedup or a model/TTFT gain. Full results and protocol.
  3. No new dispatch bypass is proposed. The eager boundary test shrank from 716 to 210 lines. The description now suggests the squash message perf(tgemm): reduce overhead in the normal dispatch path.

Validation includes nine CPU descriptor-control tests with no skips, five detected key mutations, and the bounded 2f20b055 GPU gate: 12 public-dispatch cases, weight/view/lifetime and compile/graph checks, plus nine native-reuse rows. The broad native matrix and native thread tests were not run. The later commits repair a TDM test fixture and three shared MoE golden files; they do not change this production implementation.

The SGLang zero-test selection was also fixed, but the downstream-CI request remains open: current-head V3.2 executes its test and fails during decode-graph setup in a CK GEMM, before an accuracy result. I am recording that separately in the existing CI thread rather than treating a nonzero test count as a passing result.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

aiter PR #8030 — Reduce host overhead in the normal tuned GEMM path

Caches device/config and const-weight descriptor metadata inside the existing registered GEMM route, while repairing two SGLang test selections.

Review (advisory): ⚠️ NEEDS WORK (not independently refuted)
Validation (deterministic): NOT RUN — REVIEW_AUTO_VALIDATE=0; no new GPU/model/CI run. Existing CPU9 and bounded native/graph checks remain tied to their reported revisions; the measured 2f20 runtime files are byte-identical to a8c714e.
Perf (advisory): MEASURED — six allocate/out cases on gfx942 80 CU, base c86d490 versus implementation 2f20b05, three paired rounds with 31 warm-host, 31 cold-host and 20 event samples per case/process. Representative M256/N512/K1024 allocate: warm host 48.868 → 46.660 us. Aggregate host gains are not stable across rounds; no model gain is established. Full paired evidence.
Size: 699 lines / 10 files
Design (advisory): Keep metadata-only weight-descriptor reuse inside compile_ops with an opt-in const-argument contract instead of a parallel eager GEMM dispatcher.
Human: recommend amd-ruitang3 review whether PR #8030's private locked descriptor cache and default-empty compile_ops contract are acceptable for the shared JIT core before merge.

⚠️ [verified] Shared-runtime acceptance remains incomplete for aiter/jit/core.py:2454 and aiter/tuned_gemm.py:452. The current-head V3.2 job failed during graph setup at M=512/N=128/K=7168, BF16 output, before an accuracy score. Other actual downstream cases and the bounded gfx942 tests passed; this does not prove the cache caused that failure, or replace the skill's broader core coverage. Author must finish the existing source/image-matched diagnosis, provide either a PR fix or reproducible baseline evidence, and record the missing shared-path/architecture acceptance before claiming full downstream validation.

⚠️ [verified] tests/test_tensor_descriptor_cache.py:7 has nine CPU regressions for the new shared cache but no PR CI selector. The hosted CPU job names only four plugin files, while the shard list omits this new test; the lookup suite is only in a scheduled/manual workflow. Future pointer-key, lifetime or concurrency regressions could therefore pass PR CI despite this file. Author must wire the descriptor suite into an existing CPU PR check and make the changed lookup checks reachable from PR CI without weakening their assertions.

⚠️ [verified] aiter/jit/core.py:2454 adds an activated contract to the stable JIT engine, and no final-head owner sign-off is recorded. Pinned-main path history identifies @amd-ruitang3 as the top committer; the earlier @valarLip review requested the now-completed redesign but is still CHANGES_REQUESTED. Reviewer should ask @amd-ruitang3 to explicitly approve the const-mat2 descriptor-cache contract before merge, together with @valarLip's follow-up on the revised approach.

Pinned source: head a8c714e3ab7ceef0e17223efc01e0f6a23c52133; merge target 163947e790402822e53e4f8defcd1b3a78d1707d; AITER main review-pr skill at 163947e790402822e53e4f8defcd1b3a78d1707d. Review/gates completed 2026-12-02 UTC.

The original scanner and gate scripts ran unchanged under Python. The read-only GitHub/Git fetch steps used direct CLI equivalents because Bash is unavailable; fetch.sh itself did not run. REVIEW_AUTO_VALIDATE=0. All eighteen AITER static subcommands completed; their results were then assessed against the actual source and workflows. The semantic review separately examined changed production code, callers, tests and relevant CI. Prior measurements remain bound to their stated sources and do not count as new runtime validation by this scan.

The binary-patch apply diagnostic was refuted by an actual three-way merge: git merge-tree --write-tree --messages 163947e790402822e53e4f8defcd1b3a78d1707d a8c714e3ab7ceef0e17223efc01e0f6a23c52133 exited 0, and GitHub reported MERGEABLE. The owner roster was supplemented from real pinned-main git log --format=%an -- aiter/jit/core.py: amd-ruitang3 35 commits, next authors 25/25/19; the original scanner roster was retained. The lookup suite is scheduled/manual, while the new descriptor unittest is absent from PR selectors.

Actual scanner commands and output (local paths replaced by variables)
$ $PY -I -S -B -X utf8 $SKILL\triage.py rules $WORK\pr.diff [CI] [JIT] [Perf] Reduce Python overhead in tuned GEMM dispatch
exit=0
  files=10  types=16  rules=30/68
    [new-routing-value   ] A4 B4 C4
    [tier1-import-chain  ] STEP4 E5 C5
    [fp8-quant           ] C1 C2 D1
    [perf                ] P1 P2 P3 P5 P6
    [async-stream        ] G1 G1b
    [downstream-op       ] E4 E5 A2
    [new-compile-op      ] D7 D6
    [compile-contract    ] D6 D7
    [layout-contiguity   ] D8 B7
    [new-env-var         ] HK9 D2
    [incomplete-code     ] HK7
    [develop-flag        ] HK8
    [test-reference-dtype] HK10
    [conditional-binding ] D1b
    [defaulted-param     ] E2
    [scattered-diff      ] HK2

$ $PY -I -S -B -X utf8 $SKILL\triage.py expand $WORK\rules.txt $SKILL\rules.md
exit=0
### A — Coverage Gaps

**A2 — Shared path, no cross-model validation** ⚠️
Changed code shared across model families (not model-specific): validated on all?
Real example (PR#3891): valarLip: "please make sure e2e CI passes before changes to common part."
→ `⚠️ A2: change touches shared path — e2e or cross-model validation needed`

**A4 — New feature branch in existing kernel without regression test** ⚠️/🔴
A PR adds a new dispatch branch (new activation type, new dtype, new quant path) to an existing kernel but does not test that existing operators' correctness and performance are preserved. Adding a branch often touches shared code: widening a template condition, narrowing a guard, refactoring a shared lambda, changing a scale computation. These side-effects can silently regress every pre-existing path.
Trigger: the diff adds a new `if/elif/else` branch or a new template specialization to an existing kernel, and the new branch shares code (constants, scale logic, store paths, bias conditions) with pre-existing branches.
What to check: (1) every shared constant or condition the PR changes — does the change preserve the old value for old inputs? (2) are existing paths tested in the PR's test plan, or only the new path? (3) for perf-sensitive kernels, is there a before/after benchmark on old paths?
Severity: 🔴 if a shared constant or condition provably changes behavior for existing inputs (wrong scale, skipped reciprocal, dropped bias). ⚠️ if the shared path change is theoretically safe but untested on old inputs.
FP self-check: a new branch that is fully gated by `if constexpr(NewFeature)` and touches no shared code is exempt — it cannot affect old paths. Only fire when the diff modifies code that old paths also execute.
Real examples: PR#5708 narrowed `enable_bias` from `_needs_swiglu_bias_support()` to `activation == Swiglu && _needs_swiglu_bias_support()` — could have regressed Situv2 bias on Opus/FlyDSL paths (analyzed as safe, but not tested). PR#5985 widened `kStoreTakesDivisor` to include `fp16_t` — broke the reciprocal scale on gfx942 fp16 MXFP8 quant (scale_err=55/56 groups), because the software convert path expected the reciprocal but received the raw divisor. PR#5914 added optional fp8 Q output to fused_qk_norm_rope kernel using a runtime pointer check (`if (q_out_fp8 != nullptr)`) instead of a template parameter — VGPR usage rose from 96 to 98 at head_size=512, crossing an allocation granule and dropping occupancy from 5 to 4 waves/SIMD for every existing caller passing nullptr; fixed by introducing a `HAS_Q_FP8` template parameter so the non-fp8 instantiation is byte-identical to the original.
→ `🔴/⚠️ A4: new [feature] branch added to [kernel] — shared [code/constant] changed, verify existing [paths] are not regressed`

---

### B — Silent Bypass

**B4 — New dispatch value not handled by all paths, no warning** ⚠️/🔴
When a PR introduces a new routing value to a multi-way dispatch — a new dtype string (`'fp4'`), a new arch string (`'gfx1201'`), a new layout flag (`SWIGLU_INTERLEAVED`), a new constexpr enum value — every reachable dispatch branch must either (a) handle it explicitly, (b) fall through to a documented safe default, or (c) assert/warn before the wrong branch is reached. If any reachable branch silently falls through to behavior that is wrong for the new value, flag it.
Severity: 🔴 if the wrong path produces incorrect output silently (wrong layout, wrong kernel, wrong scale). ⚠️ if the wrong path is a safe-but-suboptimal default (e.g., generic tile depths instead of tuned fp4 depths).
Exception: an upstream assert/raise/isinstance check that prevents the bad value from entering the branch → not B4. A runtime assert that fires for the dangerous combo → not B4.
FP self-check: Is the uncovered branch actually reachable with the new value? Is there a caller contract (documented or asserted) guaranteeing the bad combo never occurs?
Real examples: GGUU flag not wired into gfx950 Triton path — runtime assert guards the explicitly dangerous combo but the remaining gap is silent (aiter#4169); fp4 silently falls through to `in_dtype in ('fp8','int8')` tile table, uses generic preload depths (aiter#3941); cross-attention + mt=1 on gfx1250 falls through to get_heuristic_kernel with no gfx1250 kernel compiled for that combo (aiter#3939).
→ `🔴/⚠️ B4: [new value] reaches [branch] which assumes [old value] — [what wrong thing happens] — add assert or explicit handling`

**B7 — Over-conservative assert blocks valid shapes** ⚠️
`assert M % tileM == 0` when the kernel pads internally and handles non-aligned M.
Real example (PR#3998): wrapper asserted alignment; asm kernel padded — valid small-M shapes rejected at the Python layer.
FP self-check: Does the kernel actually handle non-aligned inputs, or does the assert reflect a real hardware requirement?
→ `⚠️ B7: assert [constraint] may be unnecessary — verify kernel handles non-aligned inputs before removing`

### C — Hardcoded Arch / Dtype Assumptions

**C1 — FP8 fnuz check uses arch name** ⚠️
`if "gfx942" in arch: treat_as_fnuz()` — wrong. Same arch can have both fn and fnuz in flight.
Check IS fnuz: `tensor.dtype == fp8_fnuz`. Gate CONVERSION by arch is OK; inspection must use dtype.
Real example (PR#4073): valarLip: "check _is_fnuz by tensor's DType instead of arch."
→ `⚠️ C1: fnuz check uses arch name — use tensor.dtype comparison`

**C2 — FP8 scale bound hardcoded** ⚠️
`fp8_max = 240.0` → correct for fnuz (e4m3fnuz max=240), wrong for OCP e4m3 (max=448).
Use `get_dtype_max(dtype)` to derive; add a runtime guard if gfx942-only.
FP self-check: if the constant sits on a path already runtime-guarded to a single dtype/arch (e.g. inside an `if arch == 'gfx942':` block), the hardcode is safe there — do not fire; fire only when the path handles multiple fp8 flavors.
Real example (PR#4015): yzhou103: "would break for OCP e4m3 (max=448)."
→ `⚠️ C2: fp8_max hardcoded to [value] — use get_dtype_max(dtype)`

**C4 — New GPU arch string literal in dispatch condition** ⚠️
**FP self-check first (do this before deciding to fire):** Search the unchanged lines of this file for the same arch string (e.g., `'gfx1250'`). If that string already appears on an unchanged line → **do not fire** (pre-existing style, not a new violation). Only proceed if the arch string is genuinely new to this file.
Trigger (only after self-check passes): a new `+` line introduces an arch string literal in a dispatch condition (`if arch == 'gfx1250':`, `if 'gfx950' in arch_name:`), rather than routing through the central kernel registry or a named constant.
Also exempt: arch strings used only in comments, docstrings, or directory path strings; arch strings imported from a central registry module; arch strings used as **capability guards inside a kernel-specific wrapper function** (not in the centralized dispatch layer) — e.g., `get_gfx() == 'gfx1250'` inside `flydsl_flash_attn_batch_func` determines whether the FlyDSL variant is available; that check belongs in the wrapper, not in the central registry, and does not trigger C4 (aiter#3870).
Real examples: `'gfx1250'` new to `fused_mxfp4_quant.py` dispatch logic where no prior arch literals existed (aiter#3937 → fire C4); `'gfx1201'` added to `unified_attention.py` where `'gfx1250'` was already on line 79 (aiter#3956 → skip, pre-existing style); `get_gfx() == "gfx1250"` inside FlyDSL wrapper `flydsl_flash_attn_batch_func` (aiter#3870 → skip, capability guard not centralized dispatch).
C4 judges only the arch literal. Which helper a runtime wrapper calls is C5's question: a newly added runtime `get_gfx()` like the aiter#3870 guard fires C5, even though it skips C4.
→ `⚠️ C4: new arch string '[gfxNNNN]' hardcoded in dispatch — route through arch registry or named constant`

**C5 — Shared chip_info helpers are the ISA gate** ⚠️
Policy: `.github/instructions/aiter-ops-flydsl.instructions.md`. Do not invent a mixed-device, process-global, or first-`rocminfo`-agent finding against `get_gfx_runtime()` / `get_gfx()`.
The context picks the helper. Code that asks which GPU it is running on uses `get_gfx_runtime()`, which detects the live GPU: runtime dispatch (wrappers, launchers, kernel or tuned-config selection), test gates in `main()`, and the card a test records. Build-time codegen (`gen_instances`, AOT, module-level `csrc` selection) uses `get_gfx()`, which follows `GPU_ARCHS` and returns its last entry when that lists several targets, so on a multi-target build it can name an ISA other than the one installed (`GPU_ARCHS='gfx950;gfx942'` gives `gfx942` on an MI355X).
**FP self-check first:** only `+` lines count. `get_gfx()` or `gcnArchName` on unchanged lines is pre-existing style, not a new violation.
FIRE when a `+` line adds (a) a local ISA probe instead of the helpers (`gcnArchName`, `get_device_properties` read for architecture, a `rocminfo` parse), or (b) `get_gfx()` in a runtime dispatch path or a test gate. One such line fires even when other added lines use the right helper.
CLEAR only when every added architecture check uses the helper that fits its context.
Real examples (synthetic): `torch.cuda.get_device_properties(0).gcnArchName` added to `aiter/ops/mha.py` → fire (a); `get_gfx() == "gfx950"` added to kernel selection in an `aiter/ops/flydsl/` launcher → fire (b); `get_gfx()` added to the gate in `main()` of `op_tests/test_flydsl_<op>.py` → fire (b); `get_gfx()` on an unchanged test line → clear; `get_gfx()` added to an AOT target list → clear; `get_gfx_runtime()` added to a wrapper plus a new `gcnArchName` read in another file of the same PR → fire (a).
→ `⚠️ C5: new local ISA probe or get_gfx() in dispatch or a test gate — use get_gfx_runtime() for anything that asks which GPU is running, get_gfx() for build-time codegen`

---

### D — Uninitialized / Boundary State

**D1 — Atomic reduction on uninitialized buffer** 🔴
`atomic_fmax(*ptr, val)` = `*ptr = max(*ptr, val)`. If `*ptr` is uninitialized (from `::empty()`),
garbage dominates the max → corrupted amax → corrupted FP8 descale → silent wrong quantization.
Trigger: `atomic_fmax` / `atomic_max` + `::empty()` or non-zeroed allocation near it.
Severity: 🔴 for atomic accumulation (atomic_fmax, atomicAdd) — garbage propagates into every output element. ⚠️ for partial-sum buffers where a zero-weight coefficient mathematically cancels the contribution (e.g., online softmax with empty batch: `exp(-inf) × garbage = 0`); still flag because `0.0 × NaN = NaN` on IEEE hardware if the allocator returns dirty pages.
Real example (PR#4015): yzhou103: "AiterTensor::empty does not zero-initialize... garbage in v_amax silently corrupts descale."
→ `🔴 D1: [buffer] passed to atomic_fmax not zero-initialized — use ::zero() not ::empty()`

**D1b — Python-side UnboundLocalError from conditional assignment** 🔴
A variable is assigned inside an `if/elif` branch but referenced unconditionally after the block. Python does not detect this statically — `UnboundLocalError` or `NameError` fires only at runtime when the skipped branch is exercised. Silent in test environments that never hit the uninitialized path.
Trigger: new `if/elif` gate assigns a variable (`result = ...`) on some branches; a later line references it without a pre-block default. Check: is there a `var = None` or `var = default_val` before the if-block?
Exception: if there is a definitive `else` branch that also assigns the variable, or if the variable is only ever used inside the branch that assigns it.
Real example (ATOM#860): `needs_independent_noise` returned from `prepare_model()` tuple but assigned only in one branch of `prefill_forward` — other branch paths raised `NameError` when the sampler tried to use it.
→ `🔴 D1b: [var] assigned only inside [branch] but referenced unconditionally — add [var = default] before the if-block`

**D2 — New default path without rollback env-var** ⚠️
New implementation replaces existing default before wide validation: is there an env var to revert?
Scope: D2 is about a **temporary rollback kill-switch** for a risky default swap (meant to be removed once validated) — NOT a permanent feature-flag knob. aiter maintainers generally reject new *permanent* env vars (see HK9): a MoE activation knob added in #3593 was reverted in #4225. If the safe path can be auto-derived from dtype/arch/shape instead of an env var, prefer that; reserve the env var for a genuine short-lived rollback.
Real example (PR#3266): flydsl sort replaced opus sort; reviewer: "gate flydsl behind env var until validated on broader workloads."
→ `⚠️ D2: new default path needs rollback env-var for safe rollout`

**D6 — Fake / meta function dtype or shape mismatch** 🔴
When a `gen_fake` / `_fake` / `abstract_impl` function is added or modified, its return tensor dtypes and shapes must match the real op exactly. torch.compile uses the fake to infer output types; a wrong dtype compiles cleanly but causes a dtype assertion or silent wrong values at runtime.
Trigger (1): diff contains a `_fake` / `gen_fake` function alongside the real op; compare each return tensor's dtype and shape against the real op's actual output.
Trigger (2): real op's return dtype or arity changes in the diff but no corresponding `_fake` / `gen_fake` change appears — the existing fake is now stale and will produce wrong types.
Real example (aiter#4110): `fused_allreduce_rmsnorm_quant_fake` returned `torch.empty_like(res_inp)` (bf16) as first element, but real op returns fp8 — wrong dtype for torch.compile's dtype checks. Human reviewers missed this entirely.
→ `🔴 [fake_fn] return [N] dtype is [X] but real op returns [Y] — torch.compile will assert or silently miscompute`

**D7 — New compile_op without fake function** 🔴
A new `@compile_ops` / `torch.library.custom_op` is added but has no corresponding `_fake` / `gen_fake` / `abstract_impl`. torch.compile traces the graph using fake tensors; without a fake, the op is a black box → runtime crash or silent fallback to eager inside a compiled region.
Trigger: diff adds a new function decorated with `@compile_ops` or `torch.library.custom_op`; grep for a `_fake` or `gen_fake` function with the same op name — if absent, flag.
→ `🔴 D7: [op_name] has no fake/abstract implementation — torch.compile will crash or silently fall back to eager`

**D8 — Kernel wrapper missing contiguous check** ⚠️
Python wrapper passes tensor to C++ / HIP kernel but doesn't assert `.is_contiguous()` or call `.contiguous()`. If the caller passes a strided tensor (slice, `.T`, output of non-contiguous `view()`), the kernel reads from wrong addresses — completely silent wrong result.
Trigger: new Python wrapper that calls a `@compile_ops` or C-extension kernel; check that non-trivially-shaped inputs (anything other than a freshly allocated `torch.empty`) are either asserted contiguous or explicitly made contiguous before the call.
→ `⚠️ D8: [tensor] passed to [kernel] without contiguous check — add .contiguous() or assert .is_contiguous()`

### E — Cross-Repo Sync

**E2 — New param with backward-compatible default is dead code** 📝
New param added with default that preserves old behavior: the fix only activates when a consumer passes non-default. Who updates the consumer?
Real example (PR#3773): `max_seqlen=-1` added in aiter; fix never activated until ATOM passed actual value.
→ `📝 E2: new API param needs consumer-side update to activate — follow-up tracked?`

**E4 — Downstream CI skipped on a change downstream consumes** 🔴
aiter's downstream tests (ATOM, SGLang, vLLM) are SKIPPED BY DEFAULT and only run when a label is added — `ci:atom` (DeepSeek-R1-0528, GPT-OSS-120B), `ci:sglang` (DeepSeek-R1-MXFP4, Qwen 3.5), `ci:vllm` (GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5), `ci:all` (all of the above), or `ci:atom_full` (ATOM accuracy suite; only for FlyDSL/Triton upgrades). A PR that changes an op a downstream consumes can pass every *aiter* check with the downstream job skipped, merge green, and break the downstream silently — visible only after merge.
**Staleness guard:** the label→model mapping here is a snapshot. Before quoting a specific model for a label, confirm the current `ci:*` definitions in `.github/workflows/*.yaml` — the model roster rotates, and a stale mapping produces a confidently-wrong label recommendation.
Which label (be precise, do not reflexively pick `ci:all`):
1. **Dispatch reachability** — is the changed/new kernel wired into a default dispatch path? A pure-additive, arch-gated kernel not in any default path is unreachable by downstream → exempt, no label needed.
2. **Map activation → model** — if reachable, read the branch's activation condition (arch × dtype × shape × model gate) and map it to a model (e.g. 128-head fp8 MLA decode on gfx950 → DeepSeek-V4).
3. **Minimal label set** — DeepSeek is exercised by atom+sglang+vllm (≈ `ci:all`); Qwen 3.5 → `ci:sglang` only; Kimi-K2.5 → `ci:vllm` only; GPT-OSS-120B → `ci:atom`+`ci:vllm`.
Fallback: if you cannot trace the activation to a specific model but the diff changes the behavior of an mla/fused_moe/attention/quant/gemm/jit-core path, default to `ci:all` — a wasted CI run is far cheaper than a broken downstream.
Check: in the PR's statusCheckRollup, if `Atom Test` / `Kimi Downstream` / `Sglang Downstream` is `skipped` AND the diff touches a downstream-consumed op, coverage is missing.
Real example (aiter#3459): a DeepSeek-V4 128-head MLA decode kernel passed Aiter Test (success) with Atom Test SKIPPED and no `ci:*` label; after merge the Atom Test went red — the MLA change broke ATOM, invisible pre-merge.
→ `🔴 E4: [op] is consumed by [ATOM/SGLang/vLLM] but its downstream CI is skipped — add ci:all (or the minimal ci:atom/sglang/vllm) and require it green before merge`

**E5 — Stable core-API change needs owner sign-off, not just CI + one approve** 🔴
Modifying the BEHAVIOR / SIGNATURE / DEFAULT DISPATCH / NUMERIC SEMANTICS of a long-lived, widely-consumed API — `fused_moe.py`, `mla.py`, `ops/attention.py`, `ops/mha.py`, `ops/quant.py`, `gemm_op_a8w8.py`, `moe_op.py`, `jit/core.py` — must not be self-merged by a contributor or landed on a single reviewer's approval. These are downstream contracts; green CI (even `ci:all`) only covers the models/shapes it knows, not every downstream version or call path — necessary but not sufficient.
Trigger: diff changes the behavior/signature/default-path of a Step-4 Tier-1/Tier-2 file — NOT a pure-additive, arch-gated, behavior-preserving change (those are exempt; see E4 step 1).
Who signs off: aiter has **no CODEOWNERS file**, so ownership is de-facto — the top committer of the path is the effective gatekeeper:
`git log --format='%an' -- <file> | sort | uniq -c | sort -rn | head`
For `fused_moe.py` / core MoE dispatch this is currently @valarLip (top committer, and the maintainer who reverted #3593 and gates MoE PRs). Re-derive per file — MLA / attention / quant may have a different top committer.
**The reviewer must proactively notify the owner — do not wait for them to notice the PR.** Post a PR comment that @-mentions them (e.g. `@valarLip`) with a one-line summary of the contract change and an explicit request to approve before merge. Passive "someone should sign off" is not enough; the finding is not resolved until the owner has been actively pinged and has responded. Do not settle for a revert after merge.
Real example (aiter#3593): a `fused_moe.py` env knob merged on CI + one approval, then reverted by a maintainer within the hour — it should have had owner sign-off before merge.
→ `🔴 E5: [file] is a stable downstream-facing contract — do NOT self-merge. **Reviewer must @-mention the de-facto owner (git top-committer; @valarLip for fused_moe) in a PR comment requesting explicit sign-off** before merge, on top of ci:all`

---

### G — Multi-Stream Synchronization

**G1 — Missing HIP/CUDA stream synchronization** 🔴
HIP/CUDA streams execute concurrently by default. A tensor produced on stream A and consumed by a kernel on stream B without an explicit sync between them causes the consumer to read garbage — no crash, no error, silent wrong output.
Trigger: diff introduces a non-default `torch.cuda.Stream`, passes an explicit `stream=` argument to a kernel, or prepares buffers/weights on a side stream that are later consumed during forward pass on the compute stream. Check: is there `stream.synchronize()`, `stream.wait_stream(other)`, `hipEventRecord` + `hipStreamWaitEvent`, or `torch.cuda.current_stream().wait_stream(other)` between the last write on stream A and the first read on stream B?
→ `🔴 G1: [tensor] written on [stream A] consumed on [stream B] without sync — add stream.wait_stream() or hipStreamWaitEvent`

**G1b — Blocking queue.get() without timeout in production serving code** ⚠️
`queue.get()` without `timeout=` in a worker or service thread that depends on an external producer (decode loop, stream consumer, request handler). If the producer exits abnormally, the worker blocks forever — no crash, no log, hung process.
Trigger: `queue.get()` or `asyncio.Queue.get()` inside a `while True:` worker loop in production serving paths (entrypoints, engine loop, scheduler) without `timeout=` and without a corresponding `except queue.Empty` / `asyncio.TimeoutError` handler or a `done` flag.
Exception: test code, CLI tools, or one-shot scripts where a hang is detectable (CI timeout, interactive TTY).
→ `⚠️ G1b: [worker] blocks on queue.get() without timeout — add timeout= and handle Empty/TimeoutError to survive producer failure`

---

### Performance Evidence (always check)

**P1 — Perf PR without benchmark numbers** ⚠️
Trigger words: perf, optimize, fuse, faster, improve, +X%, replace kernel, OOM fix that changes algo.
Description must have numbers with units (ms, tokens/s, TFLOPS, %, speedup). Screenshots ≠ numbers.
Exception: PRs adding benchmarks/tests for existing ops without claiming improvement.
→ `⚠️ P1: perf claimed — no benchmark numbers with units`

**P2 — Benchmark covers only toy shapes** ⚠️
Numbers exist but only for M≤256, only 1 token, or one model.
Production: DSv4 E=385/topk=7, GPT-OSS 120B, Kimi-K2.5; token range 1→16384.
Staleness guard: the production config list is a snapshot — verify current E/topk/hidden and the model roster from the model registry or a recent benchmark before asserting what counts as "production".
→ `⚠️ P2: benchmark missing production shapes — [what's absent]`

**P3 — Perf claim not reproducible** ⚠️
Missing: test script, ROCm version, GPU model, TP config, model checkpoint.
→ `⚠️ P3: perf claim missing reproduction info — [what's absent]`

**P5 — Benchmark hides a cost real users pay on every call or cold start** ⚠️
The perf claim is measured with the timing window drawn so a *recurring* production cost is excluded: a first-call JIT compile on a path that is NOT cached across calls, or a setup step that runs on the live stream inside the timed region on every cold start. If that cost is real and recurring, omitting it can turn a net regression into an apparent speedup.
Do NOT fire on a genuinely one-time, amortizable setup that production pays once at model init — excluding weight shuffle/preshuffle, model weight loading, or a first-call JIT whose result is cached forever from steady-state per-call latency is CORRECT methodology, not deception. `warmup_iters` before a steady-state loop is standard and by itself is not P5.
FP self-check (do this before firing): is the excluded cost paid **once per deployment** (amortizable → do NOT fire) or **again on every call / every cold start / inside the timed stream** (→ fire)? If you cannot show it recurs, do not fire.
Counter-example (does NOT trigger P5): aiter#4166 preshuffles the static weight once outside the timing loop and honestly reports a geomean 0.69x result — a correct steady-state benchmark, not a hidden cost. Charging that one-time shuffle against a single call to manufacture a "regression" is itself the false positive this rule must avoid.
→ `⚠️ P5: timing window excludes [cost] that recurs per call / per cold start — re-run including it, or confirm it is one-time amortizable`

**P6 — Kernel change whose cost nobody measured** ⚠️
P1–P5 all grade the numbers *the PR supplies*. None of them produces a number, so a kernel PR can clear the whole Performance block on the strength of a table nobody re-ran. Correctness evidence does not cover this: `correctness_repo_tests: pass` means the kernel computes the right values and says nothing about how long it takes.

**Where the measurement now comes from.** The validator has a `perf` stage. When it runs, it times the target on base and on head back to back on the same locked GPU — base with the patch reversed out on the same worktree — and reduces the pair to `median_ratio`, the head speedup over base, oriented so `<1` is always a regression. That is a deterministic result, not an advisory one: below `threshold` (default 0.95, over ≥3 matched rows, both sides exiting cleanly) it writes a `should-fix` finding and the report's verdict becomes `NEEDS_WORK`. Read it out of `stages.perf`; do not re-derive it.

Trigger: Step 1's triage printed `perf triage: REQUIRED` — i.e. the PR changes runtime surface — **and** the head-matched report carries no usable `stages.perf` (absent, or `status: skip`). That is the gap P6 exists to name. If `stages.perf` is `pass` or `fail`, the measurement happened; report the number and do not fire.

Why the stage skips, and what each case means for the card:
- **no benchmark entry point in the target** — the honest common case (26 of aiter's 123 `op_tests/` targets have no timing harness at all). Fire P6, and say the target cannot be timed as written.
- **the PR adds the target** — base has nothing to compare against. Fire P6 with that reason; a head-only number is not a comparison.
- **nonzero exit on either side** — deliberately never a regression, because a truncated log yields a meaningless ratio. Fire P6 and treat the crash as the more interesting finding.
- **fewer than 3 matched rows / no shared timing column** — the two sides measured different things. Fire P6.

**The measurement that counts is base vs head, on this box, back to back.** Running only head against whatever baseline the PR chose reproduces the PR's own comparison; it cannot show a regression, and it silently inherits any staleness in that baseline. When the stage could not run, Step 1 prints the exact two-command manual form for the triaged target.
What to report: the shapes measured, both sides' numbers with units, and the delta. If nothing ran, say why — no idle GPU, no benchmark entry point, arch not available here — and mark every perf statement in the card `[inferred]`.
FP self-check: do NOT fire when the triage says NOT REQUIRED (no runtime surface), when `stages.perf` is `pass`/`fail`, when a manual measurement was taken and reported, or when the PR's own harness is the thing under test and has no steady state to measure. A single sample on a shared box is weak evidence — report the spread or the sample count rather than one number.
Real example (aiter#4538): a FlyDSL kernel whose entire justification was perf was reviewed to `Validation: PASS` with zero timing data; the perf finding stopped at "reviewer should ask", and a maintainer had already posted on the PR that a competing kernel beat it. Measuring afterwards took two `--scenario bench` runs and showed the fused path is where the PR's gain comes from — which the review should have carried in the first place. That gap is what the `perf` stage now closes automatically.
→ `⚠️ P6: kernel changed and no base-vs-head timing exists — [why the perf stage could not run]; measure [target] on both sides, or mark the perf findings [inferred]`

---


### Housekeeping (quick scan)

| Check | Trigger | Flag |
|---|---|---|
| Test reference dtype promotion | New test reference impl uses Python float literal (`1.0 + weight`, `0.5 * x.float()`) or explicit upcast (`.to(torch.float32)`, `.double()`) promoting to fp32 while kernel runs in bf16/fp8 — comparison calibrated against wrong-precision baseline | `⚠️ HK10: reference [fn] promotes to fp32 — cast back to [kernel dtype] before comparison` |
| Unrelated files | Files with no connection to PR purpose | `⚠️ HK2: [file] appears unrelated` |
| TODO/stub in new path | `# TODO`, `# FIXME`, `raise NotImplementedError`, lone `pass` on a `+` line inside a new branch | `⚠️ HK7: [location] — incomplete implementation in new code path` |
| `develop=True` on new op | `@compile_ops(..., develop=True)` in added code | `⚠️ HK8: develop=True bypasses JIT cache — remove before op leaves experimental` |
| New permanent env-var knob | `os.environ.get("AITER_...` on a `+` line that adds a lasting behavioral flag | `⚠️ HK9: new env-var knob [NAME] — aiter generally rejects permanent env flags (AITER_MOE_FORCE_BF16_ACT in #3593 was reverted by #4225); prefer auto-deriving from dtype/arch/shape. Acceptable only as a temporary rollback kill-switch (see D2), and then must be documented.` |

(29 rule bodies)

$ $PY -I -S -B -X utf8 $SKILL\triage.py commentonly $WORK\pr.diff
exit=0
not a comment-dominated diff

$ $PY -I -S -B -X utf8 $SKILL\triage.py perfclaims $WORK\pr_meta.json
exit=0
ok **Stable performance improvement is not established by this run.** Aggregate warm-host medians are 1
ok Event spans change by −0.59% to +0.66% and include gaps waiting for host submission; they are not is

$ $PY -I -S -B -X utf8 $SKILL\triage.py citest $WORK\pr.diff $BASE
exit=0
UNRUN-TEST: tests/test_tensor_descriptor_cache.py
  no CI job scans this directory -- op_tests is shard-scanned at maxdepth 1 and op_tests/triton_tests recursively, nothing else

$ $PY -I -S -B -X utf8 $SKILL\triage.py twins $WORK\pr.diff $BASE
exit=0
no new file closely mirrors an existing one

$ $PY -I -S -B -X utf8 $SKILL\triage.py testquality $WORK\pr.diff
exit=0
op_tests/test_tuned_gemm_eager.py  (new file)
  test functions added : 1  test_gemm
  assertion primitives : 9

$ $PY -I -S -B -X utf8 $SKILL\triage.py kerneltest $WORK\pr.diff
exit=0
KERNEL TESTS: no new kernel file without a collectible test

$ $PY -I -S -B -X utf8 $SKILL\triage.py siblings $WORK\pr.diff $HEAD
exit=0
SIBLINGS: no variant of a changed function still carries a changed line
warning: reading $HEAD, but this skill ships from $BASE.
         given: a8c714e3a 2026-11-27
         skill: 163947e79 2026-12-02
         Forensics answer questions about the merge target; a second checkout answers them about itself.

$ $PY -I -S -B -X utf8 $SKILL\triage.py flydslbounds $WORK\pr.diff $HEAD
exit=0
FLYDSL BOUNDS: no unbounded buffer resource or descriptor on an added line
warning: reading $HEAD, but this skill ships from $BASE.
         given: a8c714e3a 2026-11-27
         skill: 163947e79 2026-12-02
         Forensics answer questions about the merge target; a second checkout answers them about itself.

$ $PY -I -S -B -X utf8 $SKILL\triage.py guards $WORK\pr.diff
exit=0
GUARDS: this diff deletes no assert, check, zero-init or contiguous call

$ $PY -I -S -B -X utf8 $SKILL\triage.py symbols $WORK\pr.diff $BASE
exit=0
IMPORTS RESOLVED: every first-party import the diff adds exists in the merge target or in this diff

$ $PY -I -S -B -X utf8 $SKILL\triage.py structabi $WORK\pr.diff $BASE
exit=0
no struct with a pinned layout changed shape

$ $PY -I -S -B -X utf8 $SKILL\triage.py aotpair $WORK\pr.diff $HEAD $BASE
exit=0
AOT PAIRING: no new ops-side contract that aiter/aot/flydsl/ was left unaware of
warning: reading $HEAD, but this skill ships from $BASE.
         given: a8c714e3a 2026-11-27
         skill: 163947e79 2026-12-02
         Forensics answer questions about the merge target; a second checkout answers them about itself.

$ $PY -I -S -B -X utf8 $SKILL\triage.py reviewers $WORK\pr_meta.json $BASE
exit=0
zoe-cop
valar-cop
valarLip
Pleaplusone
Yutao Xu
GwilliamHu
Olga Miroshnichenko
Bin Ding
qli88
Robert Esclapez
Omar Muhammad
JiaoliangYu
Fyzyukk
Bart Gips
Sergey Shlyapnikov
Eric Zheng
kyle-256
Xin Huang
la
yzhou103
Mohsen
Bingxu Chen
Sriram Kumar
Jim Guo
zufayu
zhengyao
Elton
adenzhou1350
demonsan
rpoornac

$ $PY -I -S -B -X utf8 $SKILL\triage.py evidence $WORK\pr.diff $HEAD\.github\scripts\sglang_downstream.py $HEAD\aiter\jit\core.py $HEAD\aiter\ops\gradlib.py $HEAD\aiter\tuned_gemm.py $HEAD\op_tests\test_tuned_gemm_eager.py $HEAD\op_tests\tuning_tests\test_a16w16_tuned_config_lookup.py $HEAD\tests\moe_dispatch\golden\gfx942.jsonl.gz $HEAD\tests\moe_dispatch\golden\gfx942_cu80.jsonl.gz $HEAD\tests\moe_dispatch\golden\gfx950.jsonl.gz $HEAD\tests\test_tensor_descriptor_cache.py
exit=0

$ $PY -I -S -B -X utf8 $BASE\.claude\skills\validate-kernel-pr\scan_index_width.py --diff $WORK\pr.diff
exit=0
== index x stride in DEVICE code, reaching pointer arithmetic, no 64-bit widening: 0 distinct expressions in 0 files ==


== runtime kernel parameters added with no width annotation: 0 ==

Actual eight-gate output, including any retained artifact-format correction

Earlier malformed or incorrectly encoded local review artifacts, if present, remain in the log below. Only affected gate commands were rerun after correcting artifact format. The final card contains the findings recognized by the final card gate; no product code was changed by these corrections.

$ $PY -I -S -B -X utf8 $SKILL\triage.py answers $WORK\answers.txt
exit=0
ANSWERS COMPLETE: 6/6

$ $PY -I -S -B -X utf8 $SKILL\triage.py diagnostic $WORK\ai_diagnostic.txt
exit=0
DIAGNOSTIC COMPLETE: 6/6

$ $PY -I -S -B -X utf8 $SKILL\triage.py corefiles $WORK\core_files.txt $WORK\pr.diff $BASE
exit=0
CORE FILES ASSESSED: 2/2 backbone files (1 tier-1), 2 gap(s)

$ $PY -I -S -B -X utf8 $SKILL\triage.py ledger $WORK\rules.txt $WORK\verdicts.txt $WORK\pr.diff
exit=0
LEDGER COMPLETE: 30/30 rules adjudicated with evidence

$ $PY -I -S -B -X utf8 $SKILL\triage.py card $WORK\card.md $WORK\verdicts.txt $WORK\ai_diagnostic.txt $WORK\answers.txt $WORK\pr.diff $WORK\late_findings.txt
exit=0
CARD NAILED DOWN: 3 findings, each traced to an adjudication and anchored in a changed file; every FIRE accounted for

$ $PY -I -S -B -X utf8 $SKILL\triage.py refutations $WORK\refutations.txt $WORK\pr.diff $WORK\card.md
exit=0
REFUTATIONS COMPLETE: 6 attempted, 3 survived, 3 killed before reaching the card

$ $PY -I -S -B -X utf8 $SKILL\triage.py independent $WORK\independent.txt $WORK\card.md
exit=0
INDEPENDENT REFUTATION: none available (Other existing agents own separate reviews or active remote ); the card says so

$ $PY -I -S -B -X utf8 $SKILL\triage.py design $WORK\design.txt $WORK\card.md $WORK\reviewers.txt $WORK\pr_meta.json $WORK\pr.diff
exit=0
DESIGN ROUTED: size 699 lines / 10 files

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

aiter PR #8030 — Incremental CI-selector follow-up

Runs the existing descriptor-cache CPU suite and tuned-config lookup checks on pull requests.

Review (advisory): ✅ NO FINDINGS (not independently refuted)
Validation (deterministic): N/A — no runtime surface changed in this incremental delta; the added CPU command ran9 tests with zero skips. New GitHub CI remains pending.
Perf (advisory): N/A — no runtime surface changed in this incremental delta.
Size: 3 lines / 2 files (incremental delta only; the parent PR has a separate full review)
Design (advisory): NONE -- Add two existing test suites to existing PR jobs using their existing unittest entrypoints.
Human: N/A -- The incremental delta adds fixed selectors within existing jobs and makes no new design choice.

Pushed 36fb9b4fa12d4b85b24b0d487aec0d24974d5863 on parent a8c714e3ab7ceef0e17223efc01e0f6a23c52133. This addresses the CI-selector finding in the full parent review. Shared-runtime validation, the V3.2 startup diagnosis and owner sign-off remain open. No product/test body changed, and no new model or GPU result is claimed.

The incremental review uses AITER main review-pr; REVIEW_AUTO_VALIDATE=0. Only the three-line follow-up was reviewed again; prior semantic evidence is reused.

Actual incremental rule/gate commands and CPU validation
$ $PY $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py derive $DELTA\ci-selector.diff
exit=2
usage: triage.py rules <diff> [title]
       triage.py evidence <diff> <head-file>...
       triage.py symbols <diff> <merge-target-root>
       triage.py flydslbounds <diff> <head-root>
       triage.py aotpair <diff> <head-root> [merge-target-root]
       triage.py ledger <rules.txt> <verdicts.txt> [diff]
       triage.py expand <rules.txt> <rules.md>
       triage.py answers <answers.txt>
       triage.py mapping
       triage.py diagnostic <ai_diagnostic.txt>
       triage.py testquality <diff>
       triage.py twins <diff> <root>
       triage.py citest <diff> <root>
       triage.py perfclaims <pr_meta.json>
       triage.py structabi <diff> <root>
       triage.py commentonly <diff>
       triage.py corefiles <core_files.txt> <diff> [root]
       triage.py kerneltest <diff>
       triage.py siblings <diff> <root>
       triage.py guards <diff>
       triage.py refutations <refutations.txt> <diff> <card.md>
       triage.py independent <independent.txt> <card.md>
       triage.py reviewers <pr_meta.json> <merge-target-root>
       triage.py design <design.txt> <card.md> <reviewers.txt> <pr_meta.json> [diff]
       triage.py card <card.md> <verdicts> <diagnostic> <answers> <diff> [late_findings]

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py rules $DELTA\ci-selector.diff ci: run GEMM cache regressions on pull requests
exit=0
  files=2  types=1  rules=1/68
    [infra-only          ] NONE

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py expand $DELTA\rules.txt $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\rules.md
exit=0


(0 rule bodies)

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py answers $DELTA\answers.txt
exit=0
ANSWERS COMPLETE: 6/6

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py diagnostic $DELTA\ai_diagnostic.txt
exit=0
DIAGNOSTIC COMPLETE: 6/6

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py corefiles $DELTA\core_files.txt $DELTA\ci-selector.diff $DELTA\worktree
exit=0
CORE FILES: none in this diff, declared
warning: reading $DELTA\worktree, but this skill ships from $REVIEW_ROOT\aiter\source-163947e79040.
         given: unreachable
         skill: unreachable
         Forensics answer questions about the merge target; a second checkout answers them about itself.

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py ledger $DELTA\rules.txt $DELTA\verdicts.txt $DELTA\ci-selector.diff
exit=0
LEDGER N/A: the deriver produced no rules for this diff (infra-only), so there is nothing to adjudicate

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py card $DELTA\card.md $DELTA\verdicts.txt $DELTA\ai_diagnostic.txt $DELTA\answers.txt $DELTA\ci-selector.diff $DELTA\late_findings.txt
exit=0
CARD: no findings, and no verdict fired

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py refutations $DELTA\refutations.txt $DELTA\ci-selector.diff $DELTA\card.md
exit=0
REFUTATIONS COMPLETE: 2 attempted, 0 survived, 2 killed before reaching the card

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py independent $DELTA\independent.txt $DELTA\card.md
exit=0
INDEPENDENT REFUTATION: none available (Publisher author review of a three-line CI-only delta; no bl); the card says so

$ $PY -I -S -B -X utf8 $REVIEW_ROOT\aiter\source-163947e79040\.claude\skills\review-pr\triage.py design $DELTA\design.txt $DELTA\card.md $DELTA\reviewers.txt $DELTA\pr_meta.json $DELTA\ci-selector.diff
exit=0
DESIGN ROUTED: size 3 lines / 2 files

$ $PY -I -B -X utf8 -m unittest discover -s tests -p test_tensor_descriptor_cache.py -v
exit=0
test_default_conversion_unchanged (test_tensor_descriptor_cache.DecoratorConversionTest.test_default_conversion_unchanged) ... ok
test_only_selected_argument_reused_across_positional_and_keyword_calls (test_tensor_descriptor_cache.DecoratorConversionTest.test_only_selected_argument_reused_across_positional_and_keyword_calls) ... ok
test_opt_in_requires_develop_pybind (test_tensor_descriptor_cache.DecoratorConversionTest.test_opt_in_requires_develop_pybind) ... ok
test_concurrent_miss_conversion_is_outside_lock (test_tensor_descriptor_cache.DescriptorCacheTest.test_concurrent_miss_conversion_is_outside_lock) ... ok
test_descriptor_fields_and_pointer_reuse (test_tensor_descriptor_cache.DescriptorCacheTest.test_descriptor_fields_and_pointer_reuse) ... ok
test_failed_conversion_is_not_cached (test_tensor_descriptor_cache.DescriptorCacheTest.test_failed_conversion_is_not_cached) ... ok
test_lru_eviction_retains_callers_descriptor (test_tensor_descriptor_cache.DescriptorCacheTest.test_lru_eviction_retains_callers_descriptor) ... ok
test_subclass_optional_and_list_keep_original_conversion (test_tensor_descriptor_cache.DescriptorCacheTest.test_subclass_optional_and_list_keep_original_conversion) ... ok
test_values_and_tensor_lifetime (test_tensor_descriptor_cache.DescriptorCacheTest.test_values_and_tensor_lifetime) ... ok

----------------------------------------------------------------------
Ran 9 tests in 1.625s

OK

The first rule command used an invalid subcommand and was corrected to the documented rules invocation; both exits remain above. The source-root advisory is from the isolated delta checkout; no backbone file changes. Bash is unavailable locally, so its script was reviewed but not claimed executed.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Resolved the new conflict against main a7752f18 in dd13d73f, with a normal merge. M=0 still returns before the architecture/config/cache lookup, and nonempty calls retain this PR's cached metadata route. The redundant local OPUS import is removed; the required import remains in the cache helper.

Independent review verified that the zero-row branch and upstream test are unchanged from main, and that the remaining GEMM body/cache helpers preserve the previous PR behavior. Twelve CPU metadata cases plus the dtype-error case passed; Black and Ruff pass. No new Torch/GPU/model result is claimed for the merge. The exact-CK CI-startup diagnosis and current-head CI remain open.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Current-head CI (dd13d73f) is still blocked. I checked the completed aggregate gate: its failing input is standard=failure.

  • Shards 2, 4, and 7 each timed out downloading the Aiter wheel twice, before running any test. The later missing-log/speedtest errors are follow-on failures.
  • Shard 1 ran tests and failed with a segmentation fault in op_tests/test_flydsl_hgemm.py. The last printed case is test_hgemm_memory: BF16, M=35/N=136/K=1344, policy=ft, split_k=3, k_stagger=127. The log does not establish the exact crash location or whether this PR caused it; source-path and baseline checks remain open.

The wheel build, results collection, and tuned-op benchmark jobs succeeded, but they do not override these failed checks. No code change, additional CI retry, or merge was performed. This is separate from the previously recorded downstream DeepSeek graph-capture failure.

ZLkanyo009 added a commit that referenced this pull request Dec 3, 2026
Preserve main's plugin CLI tests and the tensor descriptor CPU gate.
@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Updated to d6ceec6ac0c3 with a normal merge of main ecfa616d80a17 to resolve the current conflicts.

The CI command now retains main's tests/test_plugin_cli.py alongside the PR's tensor descriptor CPU regression step. The PR's runtime and test files are byte-identical to dd13d73fd8cc.

Validation: independently checked the actual merge tree, final file/blob/mode identities and both parents; git diff --check, Black 26.10.1 and Ruff 0.16.0 passed. Existing descriptor CPU results are reused because those sources did not change. New-head CI has started.

These are incremental conflict-resolution checks, not a new full-PR clearance. There is no new native/GPU/model/performance result. Existing review requirements and CI gaps remain open; the previously observed HGEMM, FlashKDA and CK failure causality remains UNKNOWN.

Actual incremental review and CPU log excerpts

Used review-pr from frozen main on the manual resolution delta against the independently reproduced conflicted merge tree. No full-PR verdict card is replaced by this scoped update.

rules (exit 0):
  files=1  types=1  rules=1/68

    [infra-only          ] NONE
commentonly (exit 0):
not a comment-dominated diff
guards (exit 0):
GUARDS: this diff deletes no assert, check, zero-init or contiguous call
testquality (exit 0):
no test files touched
kerneltest (exit 0):
KERNEL TESTS: no new kernel file without a collectible test
structabi (exit 0):
no struct with a pinned layout changed shape
flydslbounds (exit 0):
FLYDSL BOUNDS: no unbounded buffer resource or descriptor on an added line
answers gate (exit 0): ANSWERS COMPLETE: 6/6
diagnostic gate (exit 0): DIAGNOSTIC COMPLETE: 6/6
corefiles gate (exit 0): CORE FILES: none in this diff, declared
ledger gate (exit 0): LEDGER N/A: the deriver produced no rules for this diff (infra-only), so there is nothing to adjudicate

structabi / flydslbounds also warned that the supplied source subsets were not Git checkouts. Their no-hit results are not a full-tree scan; provenance and the touched definitions were checked directly against exact Git objects. Initial Ruff import-classification failures were resolved by supplying authentic imported modules, without changing runtime import order.

@zhuyuhua-v

Copy link
Copy Markdown
Contributor

The review-pr scan (aiter skill, from main) at d6ceec6 reports ⚠️ NEEDS WORK: 1 warning and 2 notes; all 8 Step 8 gates pass, and an independent reader upheld all three. The core / tuned-GEMM changes look semantics-preserving: the descriptor-cache key covers every field the descriptor holds, and the native hipb_mm takes mat2 as const. valarLip's 11-25 CHANGES_REQUESTED (at be6286d) still stands. His open question is whether the new tensor_cache_args contract in aiter/jit/core.py belongs in the shared JIT core, given that the re-measurement found no stable gain.

  • Warning (evidence): .github/scripts/sglang_downstream.py:91 makes PR and nightly CI actually run the DeepSeek-V3.2 accuracy test (main's suite finds 0 tests there). That test failed at a8c714e, dd13d73 and this head (job 144004376635), each time inside gemm_a8w8_blockscale_bpreshuffle (M=512 N=128 K=7168, "This GEMM is not supported!"), an op this diff never reaches. If it also fails on main, merging leaves a red V3.2 check on every ci:sglang/ci:all PR and nightly run. One run of that test on base main would settle it; if it fails there, deferring the selection may be wanted.
  • Note: tests/test_tensor_descriptor_cache.py re-runs compile_ops from aiter/jit/core.py with a hand-listed set of globals, so a later core.py edit on that path breaks the hosted pre-checks job with a NameError.
  • Note: the cold-host recipe and per-round perf data live only in a private repo.
  • Other red CI at this head is baseline or infra: Triton MI35X shard 7 (FlashKDA, "operation not permitted when stream is capturing") fails with the same 2558-failed signature on main push 04eff71, and the three pull_request_target startup failures hit every PR in the window. The earlier-head HGEMM segfault in test_flydsl_hgemm.py was a cross-PR flake.
Card

ROCm/aiter PR #8030 — [CI] [JIT] [Perf] Reduce Python overhead in tuned GEMM dispatch

Caches device arch/CU, dtype-keyed config lookups, the AITER_TUNE_GEMM flag and hipb_mm's weight descriptor inside the normal tuned-GEMM path, and makes SGLang CI really run its R1-MXFP4 and V3.2 accuracy tests.

Review (advisory): ⚠️ NEEDS WORK
Validation (deterministic): NOT RUN — a target exists (op_tests/test_tuned_gemm_eager.py), but REVIEW_AUTO_VALIDATE=0 and this scan does no GPU work; an environment gap, not a PR defect
Perf (advisory): NOT RUN — REVIEW_AUTO_VALIDATE=0 and no GPU work in this scan; the PR's own gfx942 base-vs-head run (3 paired rounds) reports warm-host medians 1.99–5.77% lower, but the sign reverses between rounds, so no stable gain is established
Size: 702 lines / 9 files
Design (advisory): Reuse host metadata inside the existing registered tgemm/compile_ops route instead of a parallel eager hipBLASLt bypass: per-device arch/CU cache, dtype-object config keys, read-once AITER_TUNE_GEMM, and a new opt-in compile_ops(tensor_cache_args=...) contract in aiter/jit/core.py giving hipb_mm's const mat2 a locked 1024-entry descriptor cache keyed by pointer/shape/stride/dtype/device.
Human: recommend valarLip review whether PR #8030's new tensor_cache_args descriptor-cache contract in aiter/jit/core.py compile_ops is worth taking into the shared JIT core when the re-measurement he requested on 11-25 found no stable host gain (warm-host medians 1.99-5.77% lower, sign reversing between rounds), and whether it clears his standing CHANGES_REQUESTED from be6286d.

⚠️ [verified] .github/scripts/sglang_downstream.py:91 makes PR and nightly CI really run the DeepSeek-V3.2 accuracy method; on main the suite command finds "No tests found". That method failed at a8c714e, at dd13d73, and now at d6ceec6 (job 144004376635, merged onto main ecfa616, whose own V3.2 job passed by running 0 tests). Each time it failed inside gemm_a8w8_blockscale_bpreshuffle (M=512 N=128 K=7168, config=None, "This GEMM is not supported!"), an op this diff never reaches. If the failure is pre-existing, merging leaves a red (non-required) V3.2 check on every ci:sglang/ci:all PR and nightly run. Reviewer should ask for one run of that method on base main, to show whether the failure is pre-existing, before this selection lands.
📝 [verified] tests/test_tensor_descriptor_cache.py:50-64 re-executes compile_ops from aiter/jit/core.py in a hand-listed namespace, and .github/workflows/pre-checks.yaml:49 runs it in the hosted job every PR waits on. Any later core.py edit that adds a module-level name on the develop path will fail that job with NameError, for a reason unrelated to the cache. Reviewer should ask whether maintainers accept this coupling.
📝 [verified] The Perf section's cold-host recipe, three-round data and evidence hashes are linked only from wuhuikx/LLM-Booster#576, which is a private repo. op_tests/test_tuned_gemm_eager.py times only warm host, so public reviewers cannot rerun the comparison behind a [Perf] change to the shared JIT core. Reviewer should ask for the cold-host harness and per-round medians to be attached to the PR.

Step 8 gates
answers      ANSWERS COMPLETE: 6/6
diagnostic   DIAGNOSTIC COMPLETE: 6/6
corefiles    CORE FILES ASSESSED: 2/2 backbone files (1 tier-1), 0 gap(s)
ledger       LEDGER COMPLETE: 33/33 rules adjudicated with evidence
card         CARD NAILED DOWN: 3 findings, each traced to an adjudication and anchored in a changed file; every FIRE accounted for
refutations  REFUTATIONS COMPLETE: 12 attempted, 4 survived, 8 killed before reaching the card
independent  INDEPENDENTLY REFUTED: 3 judged, 3 defended, 0 killed by a reader who had not seen the reasoning
design       DESIGN ROUTED: size 702 lines / 9 files

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

CI triage for d6ceec6a (2026-12-03 UTC): the first Triton capture error and the dispatch-snapshot mismatch also occur on main. The V3.2 failure still lacks a valid baseline comparison.

  • Triton: this PR's shard 7 and main 04eff710, shard 7 first fail at test_cuda_graph_replay_matches_eager[lens0-False]: flash_kda.py:1186 creates a pinned CPU tensor during capture, raising HIP “operation not permitted when stream is capturing.” The relevant four source blobs match. This comparison covers the first error, not every one of the later 2,558 failures.
  • MoE snapshot: this PR's shard 4 and main 4eebb479, shard 4 actually execute test_legacy_dispatch_matches_golden_snapshot and report the same gfx942 summary: 131,723 keys; 918 changed, 0 new, 0 missing, including the same initial Relu2 activation-scale mismatch. This is a reproduced baseline failure; we have not exhaustively compared all 918 records.
  • V3.2: this PR and #8040 fail before accuracy at gemm_a8w8_blockscale_bpreshuffle, M=512, N=128, K=7168, BF16, config=None: “This GEMM is not supported!” However, the inspected main run and other-author #7473 / #8226 runs all say Unknown suite / No tests found / Skipping. Their green status is not a passing model baseline, so attribution remains open.
  • Two runner disconnects: MI35X standard shards 1 and 2 explicitly report loss of contact with the self-hosted runner. One targeted retry was accepted; attempt 2 is queued at 2026-12-03T08:43:53.299905+00:00. GitHub rejected the second request because that run is already active, so shard 2 has not yet been retried. It remains queued for one targeted retry after the active attempt finishes.

These findings do not establish model correctness or a stable performance gain, and do not resolve the outstanding design review. A main update alone is not yet supported as a fix for the V3.2 failure; the next useful comparison must actually execute the same model path.

Reduce Python metadata and tensor-descriptor work in the ordinary tuned GEMM path. Calls continue through the registered custom ops and plugin routing; there is no parallel eager hipBLASLt bypass. This PR contains three GEMM product files and three directly related test files, with no CI, workflow, selector or snapshot-golden changes.

## Changes

- Cache architecture/CU metadata by explicit device, resolving an unindexed CUDA device before caching. Use dtype objects in the config LRU key and convert to the existing CSV strings on misses; keep the shape-recording flag cache.
- Let only `_hipb_mm` opt into a private, locked, 1024-entry cache for its const `mat2` descriptor. The key includes pointer, shape, strides, dtype and device. The cache retains no Tensor or Storage; subclasses and other arguments use the original conversion path.
- Preserve registered public ops, plugin routing, fake implementations, output handling, logging, ABI checks and live stream selection. Main's M=0 return remains before any architecture/cache/backend lookup.
- Keep the descriptor-cache CPU tests, tuned-config/device-cache lookup tests and public-dispatch operator test. The gfx1250 legacy fixture checks the actual TDM launcher, transposed B view, forwarded parameters and strict-target rejection.

This follows the [maintainer's request to optimize the normal path](#8030 (review)). Acceptance of the opt-in `compile_ops(tensor_cache_args=...)` contract in the shared JIT core remains a separate design-review question.

## Performance

The implementation at `2f20b055` was measured against `c86d490828097b26aade3e6002a5537cc56ddb52`, which includes merged #8116, on one gfx942 80-CU partition with Torch 2.10.0 / ROCm 7.2.4. Both arms used the same native build, real config lookup, selected solutions/kernels, inputs and output SHA-256 values. The parallel eager bypass has been removed.

Three paired rounds completed in order A1, B1, B2, A2, A3, B3. Each process measured all six cases with 31 warm-host, 31 cold-host and 20 GPU-event samples per case; table values are medians of the three per-round medians, in microseconds.

| M × N × K | Output | Warm host base → head | Cold host base → head | Event span base → head |
|---|---|---:|---:|---:|
| 256 × 512 × 1024 | allocate | 48.868 → 46.660 | 103.431 → 99.418 | 81.881 → 82.421 |
| 256 × 512 × 1024 | out | 44.328 → 42.716 | 94.185 → 90.075 | 76.221 → 76.441 |
| 1056 × 324 × 10240 | allocate | 52.765 → 51.715 | 109.682 → 107.157 | 244.422 → 242.982 |
| 1056 × 324 × 10240 | out | 48.787 → 47.045 | 100.998 → 98.467 | 238.762 → 239.341 |
| 2112 × 513 × 2560 | allocate | 48.376 → 46.380 | 101.782 → 99.526 | 157.561 → 157.961 |
| 2112 × 513 × 2560 | out | 44.827 → 42.242 | 93.119 → 89.845 | 152.021 → 152.201 |

**Stable performance improvement is not established by this run.** Aggregate warm-host medians are 1.99%–5.77% lower and cold-host medians 2.22%–4.36% lower, but B1 is slower than A1 in every host case and the later two rounds reverse that sign. The between-round drift is material relative to the measured difference. No current-head model or TTFT gain is claimed.

Event spans change by −0.59% to +0.66% and include gaps waiting for host submission; they are not isolated kernel durations. The cold recipe is an 8 MiB NumPy sweep plus unrelated Python work, not a guarantee that every hardware cache is cold. Gate/selection file tracing was disabled for all measurement processes. Solutions were selected for correctness/repeatability, not speed.

[Complete result, all round medians, protocol and evidence hashes](wuhuikx/LLM-Booster#576 (comment)). All nine workers exited successfully, all 63 exported files were verified, and the owned GPU resources were released.

## Validation and limits

The following evidence retains its original revisions. Withdrawing the CI changes leaves all GEMM product and test blobs unchanged from `d6ceec6a`; it adds no new product, GPU or model measurement.

- The existing nine descriptor CPU control-flow tests passed with zero skips, including independent execution, and five omitted-key-field mutations were detected. They execute extracted definitions with Tensor/FFI stand-ins, so they do not establish native ABI correctness.
- Real-Torch lookup coverage combines 17 unchanged passing methods from the `6bf2b5cb` full execution with the repaired gfx1250 method's 182 passing subcases. This is combined coverage, not a new full-suite run. The isolated CPU environment used Torch 2.10.0 / ROCm 7.2.4, prepared native modules, no compilation and no exposed GPU devices.
- The bounded `2f20b055` GPU gate passed 12 public-dispatch cases, weight-lifetime/view checks, compile/graph checks and nine native-reuse rows. The broad many-configurations, concurrent-thread and short-lived-thread native checks were not run. Later main integration preserved the M=0 return and cache behavior in 12 CPU metadata cases plus an output-dtype rejection case; these used doubles.
- Historical downstream runs at `2f20b055` include an actual [R1 test](https://github.com/ROCm/aiter/actions/runs/45910543746/job/140218459334) passing at 0.965 against 0.93 and [GPT-OSS](https://github.com/ROCm/aiter/actions/runs/45910543650/job/140218353625) at 0.8938589841 against 0.87. The [V3.2 test](https://github.com/ROCm/aiter/actions/runs/45910543746/job/140218459269) failed before accuracy during graph setup: `gemm_a8w8_blockscale_bpreshuffle`, M=512/N=128/K=7168, BF16 output, no tuned config. That failure and the later [CI investigation](#8030 (comment)) remain on record.

The SGLang explicit-method selection, timeout/retry/model-path adjustments, and added PR selectors for the descriptor and lookup suites are withdrawn from this PR. Main's existing CI is preserved. A green or skipped job that collects zero tests is not model validation; removing the selection change does not resolve the recorded V3.2 failure. The direct test sources remain available, but this PR no longer adds their CI wiring.

Stable performance improvement, full native/shared-path coverage and a passing V3.2 result remain unestablished. The public GEMM call contract is unchanged; no third-party dependency is added.
@ZLkanyo009
ZLkanyo009 force-pushed the lingzha/tgemm-eager-fast-path branch from d6ceec6 to d0b7855 Compare December 3, 2026 09:34
@github-actions github-actions Bot changed the title [CI] [JIT] [Perf] Reduce Python overhead in tuned GEMM dispatch [JIT] [Perf] Reduce Python overhead in tuned GEMM dispatch Dec 3, 2026
@github-actions github-actions Bot removed the CI label Dec 3, 2026
@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Removed this PR's CI changes in d0b7855: the SGLang selection/timeout/model-path adjustments and the added descriptor/lookup CI selectors are withdrawn.

The PR now contains only three GEMM implementation files and three related test files. Those product/test blobs are unchanged from d6ceec6; golden files remain unchanged. The title, description and single-commit message now reflect that scope.

The independent full-tree comparison and Python syntax, Black, Ruff and whitespace checks passed for the withdrawal. Restored shell/YAML files match the base exactly; no new GPU or model run was performed. Historical evidence retains its original revisions: the recorded V3.2 failure remains unresolved, and green/skipped jobs that collect zero tests are not model validation.

The description preserves the measured host/event results and their variability. Stable performance improvement and complete native/shared-path coverage remain unestablished. The withdrawn CI work will not be automatically restored by later review tooling.

@zhuyuhua-v

Copy link
Copy Markdown
Contributor

The review-pr scan (aiter skill, from main) at d0b7855 reports ⚠️ NEEDS WORK: 1 warning and 2 notes; all 8 Step 8 gates pass, and an independent reader upheld all three. The design gate routes one question to the maintainer.

  • Since d6ceec6 the branch is one squashed commit on ecfa616 that withdraws all of the PR's CI changes: the six product/test files are byte-identical to d6ceec6, and .github/scripts/sglang_downstream.py and .github/workflows/pre-checks.yaml are back to base. The earlier V3.2 test-selection warning is resolved by that withdrawal (the V3.2 failure itself is still unattributed, but no longer belongs to this PR), and so is the pre-checks coupling.
  • The core change is correct: the cache key covers every field the descriptor is built from (aiter/utility/dtypes.py:106), native hipb_mm takes const aiter_tensor_t& mat2 so the shared descriptor is never written, every hipb_mm caller passes a weight as mat2 so activations never enter the cache, and dtype objects as config keys are converted to the same strings on lookup.
  • Warning (code and description): in op_tests/tuning_tests/test_a16w16_tuned_config_lookup.py, the gfx1250 TDM branches this PR adds (lines 864-881 and 891-919) can never run, because an earlier check in the same test (lines 827-848, from main) already skips every TDM row, and they expect an error ("TDM HGEMM policies require gfx1250") the code no longer raises. The description bullet saying this fixture checks the TDM launcher describes checks that never execute. Deleting the branches and the bullet would fix it.
  • Note (maintainers): tests/test_tensor_descriptor_cache.py is the only test of the new compile_ops(tensor_cache_args=...) edge cases, and no CI job runs it now; wire it into pre-checks or drop it.
  • Note (evidence): the per-round perf data and cold-host harness are only in a private repo link; attaching them to the PR would let reviewers check them.
  • Design question for the maintainer: should the generic tensor_cache_args hook go into the shared JIT core (aiter/jit/core.py) when the PR itself says the host-side gain (1.99-5.77% warm) is not stable? valarLip's CHANGES_REQUESTED from 11-25 still stands.
  • CI: nothing red. aiter's Standard/Triton/OPUS tests were skipped pending approval; with ci:all, ATOM accuracy passed on MI350X (DS-R1-0528 0.949 vs 0.94, GPT-OSS-120B 0.898 vs 0.87); both SGLang jobs ran 0 tests ("Unknown suite"), as on main.
Card

ROCm/aiter PR #8030 — [JIT] [Perf] Reduce Python overhead in tuned GEMM dispatch

Caches device arch/CU, dtype-keyed config lookups, the AITER_TUNE_GEMM flag and hipb_mm's weight descriptor inside the normal tuned-GEMM path to cut per-call Python overhead; the CI changes from earlier heads are withdrawn.

Review (advisory): ⚠️ NEEDS WORK
Validation (deterministic): NOT RUN — a target exists (op_tests/test_tuned_gemm_eager.py), but REVIEW_AUTO_VALIDATE=0 and this scan does no GPU work; an environment gap, not a PR defect. CI at this head has no red check, but aiter's own heavy tests are gated off pending approval (reason=not-approved). The same core.py/gradlib.py/test blobs passed all MI35X shards at a8c714e.
Perf (advisory): NOT RUN — REVIEW_AUTO_VALIDATE=0 and no GPU work in this scan. The PR's own gfx942 base-vs-head run (3 paired rounds, 31 warm/31 cold host samples per case) reports warm-host medians 1.99–5.77% lower, but the sign reverses between rounds, so no stable gain is established [inferred, from the PR's numbers]
Size: 684 lines / 6 files
Design (advisory): Reuse host metadata inside the existing registered tgemm/compile_ops route instead of a parallel bypass: a per-device arch/CU lru, dtype-object config keys, AITER_TUNE_GEMM read once, and a new opt-in compile_ops(tensor_cache_args=...) contract in aiter/jit/core.py that gives _hipb_mm's const mat2 a locked 1024-entry descriptor cache keyed by pointer/shape/stride/dtype/device.
Human: recommend valarLip review whether PR #8030's new compile_ops tensor_cache_args contract in aiter/jit/core.py is worth taking for a host gain the PR itself calls unstable (warm-host 1.99-5.77% lower, sign reversing between rounds). It follows his 11-25 request ("your weight-handle cache is fine there") but lands as a generic shared-JIT-core kwarg rather than local to aiter/ops/gradlib.py. Also whether d0b7855 clears his CHANGES_REQUESTED from be6286d.

⚠️ [verified] op_tests/tuning_tests/test_a16w16_tuned_config_lookup.py:864-919: the two TDM branches this PR adds inside test_gfx1250_legacy_wrapper_routing's per-gfx loop (864-881 and 891-919) can never run. Lines 827-848 of the same test already continue on every row with params["policy"] in kernels.TDM_POLICIES before that loop starts, and the inner branches test the same predicate on the same params. The strict branch also expects "TDM HGEMM policies require gfx1250", a string that appears nowhere in aiter/ (aiter/ops/flydsl/gemm_kernels.py:362 raises "has no kernel for gfx1250-strict", which main's own guard at 827-848 already checks). The description says "the gfx1250 legacy fixture checks the actual TDM launcher, transposed B view, forwarded parameters and strict-target rejection", but none of the launcher, B-view or parameter checks this PR adds ever execute. The hunk is also unrelated to tuned-GEMM host overhead; main's test_gfx1250_tdm_csv_wrapper_routing already covers TDM routing. Impact: a reviewer reads coverage that does not exist. Author must delete the two unreachable TDM branches (or move the extra operand checks into test_gfx1250_tdm_csv_wrapper_routing) and drop that description bullet.
📝 [verified] tests/test_tensor_descriptor_cache.py is the only test of compile_ops tensor_cache_args' develop/pybind ValueError, keyword-argument path, LRU eviction and failed-conversion handling. With the pre-checks selector withdrawn, no CI job runs it: pre-checks.yaml names only five tests/test_plugin*.py files and tests/test_heavy_ci_gate.py, and split_tests.sh takes only the flydsl AOT, moev2 and dispatch-snapshot files from tests/. Because it rebuilds compile_ops from aiter/jit/core.py source with a hand-listed namespace, a later core.py edit can break it and nobody would see. Reviewer should ask whether maintainers want it wired into pre-checks (accepting that coupling) or dropped.
📝 [verified] The Performance section links its per-round medians, cold-host recipe and evidence hashes only to wuhuikx/LLM-Booster#576, a private repo (anonymous fetch returns 404; the authenticated API reports private: true). op_tests/test_tuned_gemm_eager.py times only warm host, so public reviewers cannot rerun the comparison behind a [Perf] change to aiter/jit/core.py. Reviewer should ask for the cold-host harness and per-round medians to be attached to the PR.

Step 8 gates
answers      ANSWERS COMPLETE: 6/6
diagnostic   DIAGNOSTIC COMPLETE: 6/6
corefiles    CORE FILES ASSESSED: 2/2 backbone files (1 tier-1), 0 gap(s)
ledger       LEDGER COMPLETE: 27/27 rules adjudicated with evidence
card         CARD NAILED DOWN: 3 findings, each traced to an adjudication and anchored in a changed file; every FIRE accounted for
refutations  REFUTATIONS COMPLETE: 11 attempted, 3 survived, 8 killed before reaching the card
independent  INDEPENDENTLY REFUTED: 3 judged, 3 defended, 0 killed by a reader who had not seen the reasoning
design       DESIGN ROUTED: size 684 lines / 6 files

This branch has not been deployed

No deployments
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