Skip to content

[inductor] Fix EXHAUSTIVE search space check in tuned_mm - #192285

Closed
desertfire wants to merge 1 commit into
gh/desertfire/753/basefrom
gh/desertfire/753/head
Closed

desertfire wants to merge 1 commit into
gh/desertfire/753/basefrom
gh/desertfire/753/head

Conversation

@desertfire

@desertfire desertfire commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

max_autotune_gemm_search_space is a Literal["DEFAULT", "EXHAUSTIVE"], and every
other comparison site in inductor tests it against "EXHAUSTIVE". tuned_mm
compared against lowercase "exhaustive", so is_exhaustive was always False and
the escape hatch it guards never fired: on shapes where decompose_k applies at
threshold_multiple=2 the plain mm template was dropped even under EXHAUSTIVE,
where the user has explicitly asked for every choice to be considered.

Authored with the assistance of an AI coding agent.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/192285

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (3 Unrelated Failures)

As of commit beb66fe with merge base 100c32b (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@desertfire

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 13, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@desertfire

Copy link
Copy Markdown
Contributor Author

@claude , is the inductor/test_torchinductor_opinfo failure related?

@claude

claude Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Claude finished @desertfire's task in 3m 20s —— View job


No — the inductor/test_torchinductor_opinfo failure is unrelated

  • Read the PR diff
  • Download and inspect the failing ROCm MI350 job log
  • Confirm the code path can't be reached by that test
Details

1. It isn't a test failure — the shard hit the 30-minute wall clock timeout.

From the job log of trunk / linux-jammy-rocm-py3.10-mi350 / test (default, 4, 8):

15:47:44  Running inductor/test_torchinductor_opinfo 8/10 ...
16:26:22  Command took >30min, returning 124 (inductor/test_torchinductor_opinfo 8/10)
          Got exit code 124
          No stepcurrent file found. Either pytest didn't get to run (e.g. import error) or file got deleted

Exit code 124 is timeout(1)'s SIGTERM code — the shard was killed, not failed. There is no assertion failure, no FAILED test_... line, and no test-level traceback anywhere in the log; the only traceback is run_test.py re-raising inductor/test_torchinductor_opinfo 8/10 failed! at the end. Note also that the preceding shards in the same job were already slow (test_compiled_autograd 15:30 → test_aot_inductor 15:37 → opinfo 15:47), consistent with general MI350 slowness rather than a specific regression.

2. The changed code is dead unless EXHAUSTIVE is set, and that job doesn't set it.

The only non-test change is torch/_inductor/kernel/mm.py:446:

-        is_exhaustive = inductor_config.max_autotune_gemm_search_space == "exhaustive"
+        is_exhaustive = inductor_config.max_autotune_gemm_search_space == "EXHAUSTIVE"

max_autotune_gemm_search_space defaults to "DEFAULT" (torch/_inductor/config.py:711). With that value, both the old and new comparison evaluate to False, so tuned_mm takes the exact same branch as before — behaviorally a strict no-op for any run that isn't explicitly in EXHAUSTIVE mode. Grepping the job log for SEARCH_SPACE / TORCHINDUCTOR_MAX_AUTOTUNE returns nothing, and test/inductor/test_torchinductor_opinfo.py has no max_autotune or search_space references at all — it doesn't even enable max-autotune, so use_triton_template(..., check_max_autotune=True) gates the whole block off.

3. The other changed file is test/inductor/test_max_autotune.py, which the opinfo shard doesn't import.

This matches the Dr. CI AI verdict on the same job. Given the merge attempt was blocked on the two B200 test_flex_gemm.py flakies (also flagged as trunk-flaky), the practical next step is a re-run rather than any change here — though it's worth a glance at MI350 trunk health on HUD to confirm the timeout is broad rather than this shard specifically.

Answer: no. The MI350 shard timed out (exit 124) rather than failing a test, and the one-line "exhaustive" → "EXHAUSTIVE" fix is a no-op outside EXHAUSTIVE search space, which test_torchinductor_opinfo never enables.
• branch gh/desertfire/753/head

@desertfire

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 3 checks: B200 Smoke Tests / linux-jammy-cuda13.0-py3.12-gcc11-sm100 / test (smoke_b200, 1, 1, linux.dgx.b200), B200 Smoke Tests / linux-jammy-cuda13.2-py3.12-gcc11-sm100 / test (smoke_b200, 1, 1, linux.dgx.b200), trunk / linux-jammy-rocm-py3.10-mi350 / test (default, 4, 8, linux.rocm.gpu.gfx950.1)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit that referenced this pull request Aug 28, 2026
…ve mm configs (#192286)

ROCmConfigHeuristic._filter_configs overwrites num_stages on every config with
self.default_num_stages -- this is intentional, and both the origami selection
path and its LDS pre-filter are written to match that post-filter state. But
exhaustive_configs also enumerated `for num_stages in [1, default_num_stages]`,
so half of the generated configs were byte-identical to the other half once
filtering ran, and num_stages=1 was never actually tried. The duplicates were
silently discarded later by the dedup key in _finalize_mm_configs, so this only
wasted work and made the search space look like it covered an axis it did not.

Halves the exhaustive candidate count before dedup with no change in the set of
configs actually benchmarked.

Authored with the assistance from an AI coding agent.

Pull Request resolved: #192286
Approved by: https://github.com/jgong5, https://github.com/jeffdaily
ghstack dependencies: #192285
orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
)

max_autotune_gemm_search_space is a Literal["DEFAULT", "EXHAUSTIVE"], and every
other comparison site in inductor tests it against "EXHAUSTIVE". tuned_mm
compared against lowercase "exhaustive", so is_exhaustive was always False and
the escape hatch it guards never fired: on shapes where decompose_k applies at
threshold_multiple=2 the plain mm template was dropped even under EXHAUSTIVE,
where the user has explicitly asked for every choice to be considered.

Authored with the assistance of an AI coding agent.

Pull Request resolved: pytorch#192285
Approved by: https://github.com/eellison
orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
…ve mm configs (pytorch#192286)

ROCmConfigHeuristic._filter_configs overwrites num_stages on every config with
self.default_num_stages -- this is intentional, and both the origami selection
path and its LDS pre-filter are written to match that post-filter state. But
exhaustive_configs also enumerated `for num_stages in [1, default_num_stages]`,
so half of the generated configs were byte-identical to the other half once
filtering ran, and num_stages=1 was never actually tried. The duplicates were
silently discarded later by the dedup key in _finalize_mm_configs, so this only
wasted work and made the search space look like it covered an axis it did not.

Halves the exhaustive candidate count before dedup with no change in the set of
configs actually benchmarked.

Authored with the assistance from an AI coding agent.

Pull Request resolved: pytorch#192286
Approved by: https://github.com/jgong5, https://github.com/jeffdaily
ghstack dependencies: pytorch#192285
Sanskaaar1 pushed a commit to Sanskaaar1/pytorch that referenced this pull request Sep 8, 2026
…ve mm configs (pytorch#192286)

ROCmConfigHeuristic._filter_configs overwrites num_stages on every config with
self.default_num_stages -- this is intentional, and both the origami selection
path and its LDS pre-filter are written to match that post-filter state. But
exhaustive_configs also enumerated `for num_stages in [1, default_num_stages]`,
so half of the generated configs were byte-identical to the other half once
filtering ran, and num_stages=1 was never actually tried. The duplicates were
silently discarded later by the dedup key in _finalize_mm_configs, so this only
wasted work and made the search space look like it covered an axis it did not.

Halves the exhaustive candidate count before dedup with no change in the set of
configs actually benchmarked.

Authored with the assistance from an AI coding agent.

Pull Request resolved: pytorch#192286
Approved by: https://github.com/jgong5, https://github.com/jeffdaily
ghstack dependencies: pytorch#192285
@github-actions
github-actions Bot deleted the gh/desertfire/753/head branch October 31, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/b200 ciflow/h100 ciflow/inductor ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request Merged module: inductor release notes: inductor topic: bug fixes topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants