Repository navigation
[OPUS] [Bugfix] Restore shadowed OPUS A16W16 cache-policy registrations - #5972
Conversation
Signed-off-by: Xucheng Zhou <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
|
@demonsan could you review the ID allocation? This keeps every existing ID's configuration unchanged and restores only the 18 shadowed cache-policy variants. CPU registry and source-generation checks pass; I don't have an AMD GPU for compilation/runtime validation. |
These changes will make the exist kid change. Will check them. |
|
Thanks for checking. The declared-but-shadowed variants do get new IDs; the compatibility boundary is the effective merged |
|
@aiter-bot review Trying the review bot on a few representative PRs across different areas, so the team can see what it actually produces on real diffs. How to use it — just comment on any PR:
What it is: advisory only. It surfaces hints for a human reviewer — perf regressions, silent correctness bugs, dispatch-gate holes, AI-generated code patterns. Its judgement is stochastic, it never blocks a merge, and every verdict (✅ / It runs on a self-hosted box against a local model, so a pass takes roughly 25–30 min. Who can trigger it: the logins in |
ROCm/aiter PR #5972 — [OPUS] [Bugfix] Restore shadowed OPUS A16W16 cache-policy registrationsRestores 18 shadowed OPUS A16W16 cache-policy registrations on gfx950 by giving the three colliding variant families explicit disjoint kid offsets (7000/7100/7200 band) in csrc/opus_gemm/opus_gemm_common.py, keeping every previously visible kid's configuration identical so existing tuned CSVs and compiled-kid sidecars need no migration. Review (advisory): 📝 [verified] The 18 restored variants in csrc/opus_gemm/opus_gemm_common.py have never been compiled: Nheavy-OOB and balanced-OOB were unreachable in the merged kernels_list from the day the family landed (the +1000 mirror is already in commit 2981058), the PR states no AMD GPU was available for HIP compilation, and they auto-enter the next a16w16 tune run's candidate pool (opus_gemm_tune.py builds it from NON_SPLITK_KIDS) — so a variant that fails to compile would abort that tune run loudly, mid-run. Author must run a gfx950 compile smoke of the 18 new ids (gen_instances --extra_kids 7004-7209 + module build) before the next tuning run relies on them. |
Signed-off-by: Xucheng Zhou <[email protected]>
|
Added a merge-wide uniqueness test in 8bccd47: it derives all 25 families from the actual merge, and each injected duplicate ID is rejected. All 5 CPU tests pass. Also corrected the persistent mirror ranges. I still don't have gfx950 hardware, so compilation of the 18 restored variants remains unverified. Could a reviewer run that smoke before the tuning pool uses them? |
|
please fix code style and pass basic CI Test. Functions seems fine |
Signed-off-by: Xucheng Zhou <[email protected]>
|
Thanks, @demonsan. Fixed the Ruff I001 import-order failure in The new push dismissed the approval, so I requested re-review. The new hosted checks have not completed yet; could a maintainer approve any pending workflows so the basic CI can run? The gfx950 compile smoke for the 18 restored variants remains unverified in my environment. |
|
Hosted-CI update for |
|
CI has now completed for |
yifehuan
left a comment
There was a problem hiding this comment.
Thanks for the fix! I ran the gfx950 smoke you asked for on MI355X. All 18 restored kids compile and match the fp32 reference, the same as the existing kids with the same tiles. LGTM 👍
Summary
The split-barrier A16W16 cache-policy dictionaries currently overlap: the
offset + 1000nooob mirror overwrites the next policy's OOB ids, and the4g-safe family then overwrites the balanced nooob ids. This silently removes
18 declared configurations from the canonical registry used by codegen and
exact-kid dispatch.
Use explicit OOB/nooob offsets and move only the previously shadowed variants:
All previously visible ids keep exactly the same configuration, including
3004–3009 (Mheavy nooob), 4004–4009 (Nheavy nooob), and 5004–5009 (legacy
4g-safe). Existing tuned rows and compiled-kid sidecars need no migration.
No device kernel implementation or default compile floor is changed.
Testing
Python; against unmodified main, coverage/registration/routing tests fail
while the legacy-id compatibility test passes.
bindings unchanged; 18 restored ids; all 945 family ids unique.
gen_instances.pywithGPU_ARCHS=gfx950and the 18 new ids passed;generated BF16/FP32 dispatch tables and source instances contain the restored
configurations. This is source generation, not GPU compilation.
git diff --checkpass.Reproduce the registry tests without Torch/ROCm:
No AMD GPU was available locally, so HIP compilation and GPU numerical tests
have not been run. No performance improvement is claimed.
AI-assisted implementation; the evidence above was checked independently of
the Scout's original proposal.