Skip to content

feat(dispatcher/heuristics): distinct encodings for the gfx1250 GEMM pipelines and the tdm epilogue - #13612

Open
andriy-ca wants to merge 3 commits into
developfrom
users/andriy/ck/heuristics-gfx1250-encode
Open

andriy-ca wants to merge 3 commits into
developfrom
users/andriy/ck/heuristics-gfx1250-encode

Conversation

@andriy-ca

@andriy-ca andriy-ca commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ID : AICK-2558

Why

GemmUniversalFeatureEngine encoded comp_async, comp_tdm and comp_tdm_v2 as compv3, and the tdm epilogue as default, so a model trained on gfx1250 data could not tell them apart.

What changes

  • GEMM_PIPELINE_MAP and GEMM_EPILOGUE_MAP give them their own codes and are used by GemmUniversalFeatureEngine and the engines derived from it (GemmUniversalVecFeatureEngine, BatchedGemmFeatureEngine). PIPELINE_MAP and EPILOGUE_MAP are unchanged: grouped conv shares PIPELINE_MAP and its models encode its own comp_async as 0, and get_parameter_space keeps them because the search has no arch.
  • GemmUniversalVecFeatureEngine moves to encoding version 2. A version-1 model is still accepted for any arch but gfx1250, the only arch where codegen admits these traits, since it gets identical values; one without an arch is refused. The rule is in encoding_accepted, used by Predictor and by the warm-start check in train.py.
  • The base engine stays at version 0 and the batched engine at version 1, so their shipped models keep loading; the shipped batched model is for gfx950, where these traits do not occur, so its values are unchanged. Known gap: a base-engine or batched-engine gfx1250 model trained before this change would get different pipeline and epilogue values without being refused.

Testing

  • New cases in dispatcher/heuristics/tests/test_feature_engine.py, test_predict.py and test_train.py. dispatcher/heuristics tests: 567 passed, 1 skipped on develop plus this PR (develop: 554 passed, the same skip).
  • ruff 0.14.0 (check and format) is clean on the changed lines.

Related PRs

🤖 Generated with Claude Code

…m epilogue

The GEMM feature engine encoded comp_async, comp_tdm and comp_tdm_v2 as
compv3 and the tdm epilogue as default, so a model could not tell them
apart. GEMM_PIPELINE_MAP and GEMM_EPILOGUE_MAP give them their own codes
and are used only by GemmUniversalFeatureEngine. PIPELINE_MAP and
EPILOGUE_MAP are unchanged: grouped conv shares PIPELINE_MAP and its
models encode its own comp_async as 0, and get_parameter_space keeps them
because the search has no arch.

GemmUniversalVecFeatureEngine moves to encoding version 2. A version-1
model is still accepted for any arch but gfx1250, the only arch where
codegen admits these traits, since it gets identical values; one without
an arch is refused. The rule is in encoding_accepted, used by Predictor
and by the warm-start check.

The base engine stays at version 0 so its shipped models keep loading. A
base-engine gfx1250 model trained before this change would get different
pipeline and epilogue values without being refused.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@therock-pr-bot

therock-pr-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@andriy-ca andriy-ca added the ci:skip Skip all CI builds/tests for this PR label Oct 14, 2026
@andriy-ca
andriy-ca marked this pull request as ready for review October 14, 2026 19:28
@andriy-ca
andriy-ca requested a review from a team as a code owner October 14, 2026 19:28
Resolve the conflict in dispatcher/heuristics/tests/test_train.py:
test_the_spec_records_the_engines_version keeps develop's new
batched_gemm case (version 1) and this branch's gemm_universal_vec
version 2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant