Skip to content

[inductor] move max-autotune logic inside V.choices.get_mm_configs#161344

Closed
coconutruben wants to merge 29 commits intogh/coconutruben/45/basefrom
gh/coconutruben/45/head
Closed

[inductor] move max-autotune logic inside V.choices.get_mm_configs#161344
coconutruben wants to merge 29 commits intogh/coconutruben/45/basefrom
gh/coconutruben/45/head

Conversation

@coconutruben
Copy link
Copy Markdown
Contributor

@coconutruben coconutruben commented Aug 23, 2025

Stack from ghstack (oldest at bottom):

why

  • heuristics providers know decide whether to (or which choices to add)
    in the max-autotune case
  • enables an eventual override point to gracefully fallback to the
    standard behavior

what

  • max-autotune is determined inside V.choices.get_mm_configs
    because it's mm only right now, we can just do
    config.max_autotune or config.max_autotune_gemm
    a TODO indicates that this can change in the future when this
    expands to more templates

testing

python3 -bb -m pytest test/inductor/test_max_autotune.py -v

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

Differential Revision: D81520573

\# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

\# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Aug 23, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit c6813ed with merge base 5da573c (image):
💚 Looks good so far! There are no failures yet. 💚

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

This was referenced Aug 23, 2025
@coconutruben coconutruben added the topic: not user facing topic category label Aug 23, 2025
…_configs"

\# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

\# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

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

[ghstack-poisoned]
…_configs"

\# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

\# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

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

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 5, 2025
# why

- enables us to just gather relevant templates and get all
  choices at once
- that in turns allows us to make op wide override decisions

# what

- V.choice.get_mm_configs takes a stack of templates
- all callsites just provide a stack of size 1 right now
  but do not merge everything yet (other features pending)

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520583](https://our.internmc.facebook.com/intern/diff/D81520583)
Pull Request resolved: #161346
Approved by: https://github.com/eellison
ghstack dependencies: #162075, #161340, #161341, #161342, #161343, #161344, #161345
pytorchmergebot pushed a commit that referenced this pull request Sep 5, 2025
# why

- gather everything up to make choices, without running
  potentially expensive generators
- enables overrides where we toss the entire list of configs
  from inductor, without having to enumrate it (expensive)

# what

- add a holding class that just gets all the components necessary
  to generate a ChoiceCaller
- use that class to generate ChoiceCallers
- this does not (yet) add the override function, but just prepares
  the scene

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520569](https://our.internmc.facebook.com/intern/diff/D81520569)
Pull Request resolved: #161347
Approved by: https://github.com/eellison
ghstack dependencies: #162075, #161340, #161341, #161342, #161343, #161344, #161345, #161346
pytorchmergebot pushed a commit that referenced this pull request Sep 5, 2025
…#161348)

\# why

- every callsite just executes the generator on the spot
- previous pr adds the ability to add an override before expensive
  generators are executed, so we don't need this generator anymore

\# what

- rather than yielding the ChoiceCaller, just return the list of all
  valid ChoiceCallers

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520574](https://our.internmc.facebook.com/intern/diff/D81520574)
Pull Request resolved: #161348
Approved by: https://github.com/eellison
ghstack dependencies: #162075, #161340, #161341, #161342, #161343, #161344, #161345, #161346, #161347
daisyden pushed a commit to daisyden/pytorch that referenced this pull request Sep 8, 2025
…ytorch#161344)

# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520573](https://our.internmc.facebook.com/intern/diff/D81520573)
Pull Request resolved: pytorch#161344
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343
daisyden pushed a commit to daisyden/pytorch that referenced this pull request Sep 8, 2025
# why

- remove repeat patterns
- we have everything to make the choicecallers
  - templates
  - input_nodes
  - layouts
  - all the kwargs

# what

- yield a choicecaller directly from V.choices.get_mm_configs

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520577](https://our.internmc.facebook.com/intern/diff/D81520577)
Pull Request resolved: pytorch#161345
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344
daisyden pushed a commit to daisyden/pytorch that referenced this pull request Sep 8, 2025
…h#161346)

# why

- enables us to just gather relevant templates and get all
  choices at once
- that in turns allows us to make op wide override decisions

# what

- V.choice.get_mm_configs takes a stack of templates
- all callsites just provide a stack of size 1 right now
  but do not merge everything yet (other features pending)

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520583](https://our.internmc.facebook.com/intern/diff/D81520583)
Pull Request resolved: pytorch#161346
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345
daisyden pushed a commit to daisyden/pytorch that referenced this pull request Sep 8, 2025
# why

- gather everything up to make choices, without running
  potentially expensive generators
- enables overrides where we toss the entire list of configs
  from inductor, without having to enumrate it (expensive)

# what

- add a holding class that just gets all the components necessary
  to generate a ChoiceCaller
- use that class to generate ChoiceCallers
- this does not (yet) add the override function, but just prepares
  the scene

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520569](https://our.internmc.facebook.com/intern/diff/D81520569)
Pull Request resolved: pytorch#161347
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346
daisyden pushed a commit to daisyden/pytorch that referenced this pull request Sep 8, 2025
…pytorch#161348)

\# why

- every callsite just executes the generator on the spot
- previous pr adds the ability to add an override before expensive
  generators are executed, so we don't need this generator anymore

\# what

- rather than yielding the ChoiceCaller, just return the list of all
  valid ChoiceCallers

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520574](https://our.internmc.facebook.com/intern/diff/D81520574)
Pull Request resolved: pytorch#161348
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346, pytorch#161347
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
…ytorch#161344)

# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520573](https://our.internmc.facebook.com/intern/diff/D81520573)
Pull Request resolved: pytorch#161344
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
# why

- remove repeat patterns
- we have everything to make the choicecallers
  - templates
  - input_nodes
  - layouts
  - all the kwargs

# what

- yield a choicecaller directly from V.choices.get_mm_configs

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520577](https://our.internmc.facebook.com/intern/diff/D81520577)
Pull Request resolved: pytorch#161345
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
…h#161346)

# why

- enables us to just gather relevant templates and get all
  choices at once
- that in turns allows us to make op wide override decisions

# what

- V.choice.get_mm_configs takes a stack of templates
- all callsites just provide a stack of size 1 right now
  but do not merge everything yet (other features pending)

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520583](https://our.internmc.facebook.com/intern/diff/D81520583)
Pull Request resolved: pytorch#161346
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
# why

- gather everything up to make choices, without running
  potentially expensive generators
- enables overrides where we toss the entire list of configs
  from inductor, without having to enumrate it (expensive)

# what

- add a holding class that just gets all the components necessary
  to generate a ChoiceCaller
- use that class to generate ChoiceCallers
- this does not (yet) add the override function, but just prepares
  the scene

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520569](https://our.internmc.facebook.com/intern/diff/D81520569)
Pull Request resolved: pytorch#161347
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
…pytorch#161348)

\# why

- every callsite just executes the generator on the spot
- previous pr adds the ability to add an override before expensive
  generators are executed, so we don't need this generator anymore

\# what

- rather than yielding the ChoiceCaller, just return the list of all
  valid ChoiceCallers

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520574](https://our.internmc.facebook.com/intern/diff/D81520574)
Pull Request resolved: pytorch#161348
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346, pytorch#161347
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
…ytorch#161344)

# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520573](https://our.internmc.facebook.com/intern/diff/D81520573)
Pull Request resolved: pytorch#161344
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
# why

- remove repeat patterns
- we have everything to make the choicecallers
  - templates
  - input_nodes
  - layouts
  - all the kwargs

# what

- yield a choicecaller directly from V.choices.get_mm_configs

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520577](https://our.internmc.facebook.com/intern/diff/D81520577)
Pull Request resolved: pytorch#161345
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
…h#161346)

# why

- enables us to just gather relevant templates and get all
  choices at once
- that in turns allows us to make op wide override decisions

# what

- V.choice.get_mm_configs takes a stack of templates
- all callsites just provide a stack of size 1 right now
  but do not merge everything yet (other features pending)

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520583](https://our.internmc.facebook.com/intern/diff/D81520583)
Pull Request resolved: pytorch#161346
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
# why

- gather everything up to make choices, without running
  potentially expensive generators
- enables overrides where we toss the entire list of configs
  from inductor, without having to enumrate it (expensive)

# what

- add a holding class that just gets all the components necessary
  to generate a ChoiceCaller
- use that class to generate ChoiceCallers
- this does not (yet) add the override function, but just prepares
  the scene

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520569](https://our.internmc.facebook.com/intern/diff/D81520569)
Pull Request resolved: pytorch#161347
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
…pytorch#161348)

\# why

- every callsite just executes the generator on the spot
- previous pr adds the ability to add an override before expensive
  generators are executed, so we don't need this generator anymore

\# what

- rather than yielding the ChoiceCaller, just return the list of all
  valid ChoiceCallers

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520574](https://our.internmc.facebook.com/intern/diff/D81520574)
Pull Request resolved: pytorch#161348
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346, pytorch#161347
cleonard530 pushed a commit to cleonard530/pytorch that referenced this pull request Sep 22, 2025
…ytorch#161344)

# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520573](https://our.internmc.facebook.com/intern/diff/D81520573)
Pull Request resolved: pytorch#161344
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343
cleonard530 pushed a commit to cleonard530/pytorch that referenced this pull request Sep 22, 2025
# why

- remove repeat patterns
- we have everything to make the choicecallers
  - templates
  - input_nodes
  - layouts
  - all the kwargs

# what

- yield a choicecaller directly from V.choices.get_mm_configs

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520577](https://our.internmc.facebook.com/intern/diff/D81520577)
Pull Request resolved: pytorch#161345
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344
cleonard530 pushed a commit to cleonard530/pytorch that referenced this pull request Sep 22, 2025
…h#161346)

# why

- enables us to just gather relevant templates and get all
  choices at once
- that in turns allows us to make op wide override decisions

# what

- V.choice.get_mm_configs takes a stack of templates
- all callsites just provide a stack of size 1 right now
  but do not merge everything yet (other features pending)

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520583](https://our.internmc.facebook.com/intern/diff/D81520583)
Pull Request resolved: pytorch#161346
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345
cleonard530 pushed a commit to cleonard530/pytorch that referenced this pull request Sep 22, 2025
# why

- gather everything up to make choices, without running
  potentially expensive generators
- enables overrides where we toss the entire list of configs
  from inductor, without having to enumrate it (expensive)

# what

- add a holding class that just gets all the components necessary
  to generate a ChoiceCaller
- use that class to generate ChoiceCallers
- this does not (yet) add the override function, but just prepares
  the scene

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520569](https://our.internmc.facebook.com/intern/diff/D81520569)
Pull Request resolved: pytorch#161347
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346
cleonard530 pushed a commit to cleonard530/pytorch that referenced this pull request Sep 22, 2025
…pytorch#161348)

\# why

- every callsite just executes the generator on the spot
- previous pr adds the ability to add an override before expensive
  generators are executed, so we don't need this generator anymore

\# what

- rather than yielding the ChoiceCaller, just return the list of all
  valid ChoiceCallers

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520574](https://our.internmc.facebook.com/intern/diff/D81520574)
Pull Request resolved: pytorch#161348
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346, pytorch#161347
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
…ytorch#161344)

# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520573](https://our.internmc.facebook.com/intern/diff/D81520573)
Pull Request resolved: pytorch#161344
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
# why

- remove repeat patterns
- we have everything to make the choicecallers
  - templates
  - input_nodes
  - layouts
  - all the kwargs

# what

- yield a choicecaller directly from V.choices.get_mm_configs

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520577](https://our.internmc.facebook.com/intern/diff/D81520577)
Pull Request resolved: pytorch#161345
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
…h#161346)

# why

- enables us to just gather relevant templates and get all
  choices at once
- that in turns allows us to make op wide override decisions

# what

- V.choice.get_mm_configs takes a stack of templates
- all callsites just provide a stack of size 1 right now
  but do not merge everything yet (other features pending)

# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520583](https://our.internmc.facebook.com/intern/diff/D81520583)
Pull Request resolved: pytorch#161346
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
# why

- gather everything up to make choices, without running
  potentially expensive generators
- enables overrides where we toss the entire list of configs
  from inductor, without having to enumrate it (expensive)

# what

- add a holding class that just gets all the components necessary
  to generate a ChoiceCaller
- use that class to generate ChoiceCallers
- this does not (yet) add the override function, but just prepares
  the scene

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520569](https://our.internmc.facebook.com/intern/diff/D81520569)
Pull Request resolved: pytorch#161347
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
…pytorch#161348)

\# why

- every callsite just executes the generator on the spot
- previous pr adds the ability to add an override before expensive
  generators are executed, so we don't need this generator anymore

\# what

- rather than yielding the ChoiceCaller, just return the list of all
  valid ChoiceCallers

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

Differential Revision: [D81520574](https://our.internmc.facebook.com/intern/diff/D81520574)
Pull Request resolved: pytorch#161348
Approved by: https://github.com/eellison
ghstack dependencies: pytorch#162075, pytorch#161340, pytorch#161341, pytorch#161342, pytorch#161343, pytorch#161344, pytorch#161345, pytorch#161346, pytorch#161347
@github-actions github-actions Bot deleted the gh/coconutruben/45/head branch October 6, 2025 02:11
Khanaksahu pushed a commit to Khanaksahu/pytorch-fork that referenced this pull request Nov 17, 2025
\# why

- heuristics providers know decide whether to (or which choices to add)
  in the max-autotune case
- enables an eventual override point to gracefully fallback to the
  standard behavior

\# what

- max-autotune is determined inside V.choices.get_mm_configs
  because it's mm only right now, we can just do
  `config.max_autotune or config.max_autotune_gemm`
  a TODO indicates that this can change in the future when this
  expands to more templates

\# testing

```
python3 -bb -m pytest test/inductor/test_max_autotune.py -v
```

ghstack-source-id: e43a4da
Pull Request resolved: pytorch/pytorch#161344
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.

3 participants