The tuned mixed_mm kernel path was removed in #147151, but its support machinery
was left behind. This PR removes the dead remnants and formalizes the deprecation
of the two config knobs:
- `use_mixed_mm` and `mixed_mm_choice` were comment-marked "DEPRECATED. This
setting is ignored." but silently no-oped; they now use the formal
`Config(deprecated=True)` mechanism, so setting them emits a FutureWarning
(matching the existing precedent in `torch/_dynamo/config.py`).
- Delete the learned-heuristic artifacts `_MixedMMA100.py` / `_MixedMMH100.py`
(shipped in every wheel, loaded by nothing) and their trainer directory
`torchgen/_autoheuristic/mixed_mm/` (8 files); fix `torchgen/_autoheuristic/test.sh`
which still cd'd into the deleted directory, and drop the now-dead README links.
- Remove `autoheuristic_collect.mixed_mm` / `autoheuristic_use.mixed_mm`, the
`"mixed_mm"` default of `TORCHINDUCTOR_AUTOHEURISTIC_USE`, the dead
`mixed_mm_operations()` / `get_mixedmm_precondition()` helpers, and the fuzzer
combinations for the removed knobs.
- Remove the unused `mixed_mm_configs` list in the triton template heuristics:
its sibling lists are all consumed while it has zero references — happy to
drop this hunk if it is intentionally kept.
- Remove two dead tests: `test_global_feedback` (permanently skipped as broken
since #147151) and `test_mixed_mm_a100` (exercises the deleted heuristic).
The mixed-dtype mm workload tests in `test_pattern_matcher.py` /
`test_torchinductor.py` are untouched — that path is alive.
**Test Plan:** all touched modules import cleanly; setting
`torch._inductor.config.use_mixed_mm` now emits the FutureWarning;
`pytest test/inductor/test_autoheuristic.py` gives identical results before and
after the change on this machine (5 pre-existing environment-dependent GPU
failures on a CPU-only box, verified against the clean tree); ruff + flake8
clean on all touched files. Details in the commit message.
*Developed with AI assistance; I have reviewed and understand all changes.*
---
**Update (addressing review):**
- Also deleted `between_op()` / `between_ops()`: this PR's removal of
`mixed_mm_operations()` orphaned them (it was their only caller). Verified no
remaining callers and that no retained artifact uses the generated `LEQ`
feature names. `pow2_op` is left alone — it was already orphaned before this
PR and is out of scope.
- Why deprecate rather than delete the two config knobs: they are already
silent no-ops, so deleting them would turn a harmless stale setting into an
AttributeError for out-of-tree code that still sets them.
`Config(deprecated=True)` gives those users one FutureWarning cycle
(mirroring the `torch/_dynamo/config.py` precedent) and makes the eventual
removal PR trivial. Happy to delete outright instead if an inductor owner
prefers.
- Testing note: removing `test_global_feedback` leaves the
`AutoHeuristicSelectAlgorithm` global-feedback path without direct coverage
(it had been skipped-as-broken since #147151, so there was no live coverage
in practice either). Filed #193777 to re-cover it via the live `mm`
collection path, which does not depend on any deleted machinery.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/193721
Approved by: https://github.com/jansel
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>