Repository navigation
test(jit): check EpCfg's field count against VisitFields, not a literal - #727
Merged
Merged
Conversation
FieldCount.MatchesEpCfg pinned 12. ROCm#719 grew EpCfg to 14 (combineFp4, combineFp4F32Scale) and ROCm#723 to 15 (selfFirst), and both updated only the header's own assert. CCO CI stops at this test on every run since ROCm#723 (ROCm#719's run had already stopped at an earlier step), so the ops-v2 EP8 steps have not run on main since 8bffec7. Count the VisitFields walk instead. That is the invariant the test is there for, and unlike the header's MORI_JIT_ASSERT_FIELD_COUNT it also catches a field left out of VisitFields. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
QizhouZhang97
approved these changes
Oct 9, 2026
6 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CCO CI on main fails in "Run JIT v2 C++ tests":
The test hard-coded 12. #719 added
combineFp4andcombineFp4F32Scale, and #723 addedselfFirst. Each updated only the header's ownMORI_JIT_ASSERT_FIELD_COUNT(EpCfg, ...)and never this literal. Every field was added toVisitFields, so main has no functional bug.Because of this failure, none of the ops-v2 EP8 steps after it have run on main since 8bffec7:
Change
FieldCount.MatchesEpCfgnow counts theVisitFields(EpCfg)walk and compares that withFieldCount<EpCfg>(). That is the invariant the test's comment describes: a field missing fromVisitFieldsnever reaches the rendered text, which is the JIT cache key, so two configs that differ only in that field would silently share a kernel.The header assert cannot catch that case, because it counts struct members. The old literal duplicated the header's number without checking anything.
Testing
Run on MI355X (ROCm 7.14) with an image built from
docker/Dockerfile.dev, and mori built with theci_cco.ymlflags:ctest -R '^jit_'on origin/main (066fd10) reproduces the CI failure.jit_coreandjit_host_device_splitboth pass.MORI_FIELD(selfFirst)removed fromVisitFields, the build still succeeds and the header assert stays silent. This test then fails with 15 vs 14, and passes again once the header is restored.test_dispatch_combine_v2_intranode: 18 passedtest_op, with and without per-token scalestest_asym_dtypewith fp8 and fp4 dispatch atSCALE_DIM=224bench_epat 8/8 points🤖 Generated with Claude Code