Skip to content

[NOT FOR LAND] Benchmark single-dim strategies - #168116

Closed
wconstab wants to merge 14 commits into
gh/wconstab/460/basefrom
gh/wconstab/460/head
Closed

wconstab wants to merge 14 commits into
gh/wconstab/460/basefrom
gh/wconstab/460/head

Conversation

@wconstab

@wconstab wconstab commented Nov 18, 2025 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.

  • slowdown compares the clock time between the old and new code
  • the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3

```
test_name='mm', mesh_name='mesh_6d', orig_t=0.23 single_t=0.23
slowdown=1.01x len(orig_s.strategies)=4096,
len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', orig_t=0.05 single_t=0.05
slowdown=1.03x len(orig_s.strategies)=1024,
len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', orig_t=0.01 single_t=0.01
slowdown=1.03x len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', orig_t=0.00 single_t=0.00
slowdown=1.04x len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', orig_t=0.00 single_t=0.00
slowdown=1.05x len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', orig_t=0.00 single_t=0.00
slowdown=0.99x len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', orig_t=0.00 single_t=0.05
slowdown=839.03x len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', orig_t=0.00 single_t=0.01
slowdown=256.06x len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', orig_t=0.00 single_t=0.00
slowdown=83.91x len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', orig_t=0.00 single_t=0.00
slowdown=26.35x len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', orig_t=0.00 single_t=0.00
slowdown=8.01x len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', orig_t=0.00 single_t=0.00
slowdown=2.65x len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Nov 18, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit 87b475d with merge base e3f24fd (image):

NEW FAILURES - The following jobs have failed:

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

wconstab added a commit that referenced this pull request Nov 18, 2025
```
test_name='mm', mesh_name='mesh_6d', orig_t=0.23 single_t=0.23
slowdown=1.01x len(orig_s.strategies)=4096,
len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', orig_t=0.05 single_t=0.05
slowdown=1.03x len(orig_s.strategies)=1024,
len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', orig_t=0.01 single_t=0.01
slowdown=1.03x len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', orig_t=0.00 single_t=0.00
slowdown=1.04x len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', orig_t=0.00 single_t=0.00
slowdown=1.05x len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', orig_t=0.00 single_t=0.00
slowdown=0.99x len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', orig_t=0.00 single_t=0.05
slowdown=839.03x len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', orig_t=0.00 single_t=0.01
slowdown=256.06x len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', orig_t=0.00 single_t=0.00
slowdown=83.91x len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', orig_t=0.00 single_t=0.00
slowdown=26.35x len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', orig_t=0.00 single_t=0.00
slowdown=8.01x len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', orig_t=0.00 single_t=0.00
slowdown=2.65x len(orig_s.strategies)=1, len(single_s.strategies)=3
```

ghstack-source-id: 02e0b99
Pull Request resolved: #168116
@github-actions

Copy link
Copy Markdown
Contributor

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

```
test_name='mm', mesh_name='mesh_6d', orig_t=0.23 single_t=0.23 slowdown=1.01x len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', orig_t=0.05 single_t=0.05 slowdown=1.03x len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', orig_t=0.01 single_t=0.01 slowdown=1.03x len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', orig_t=0.00 single_t=0.00 slowdown=1.04x len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', orig_t=0.00 single_t=0.00 slowdown=1.05x len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', orig_t=0.00 single_t=0.00 slowdown=0.99x len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', orig_t=0.00 single_t=0.05 slowdown=839.03x len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', orig_t=0.00 single_t=0.01 slowdown=256.06x len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', orig_t=0.00 single_t=0.00 slowdown=83.91x len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', orig_t=0.00 single_t=0.00 slowdown=26.35x len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', orig_t=0.00 single_t=0.00 slowdown=8.01x len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', orig_t=0.00 single_t=0.00 slowdown=2.65x len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 18, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 5d48b07
Pull Request resolved: #168116
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 18, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 5d48b07
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 18, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 27c27d5
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 20, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 6634635
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 24, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 81f0a4f
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 24, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 60e263e
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 24, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 5d6d077
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 25, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 22216e7
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 25, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 2cee960
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 25, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 8eb84d2
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Nov 25, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 20c2391
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Dec 3, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: d2c43ce
Pull Request resolved: #168116
The experiment compares the original strategy (e.g. mm_strategy) vs the new 'expanded' one in this diff stack.
* slowdown compares the clock time between the old and new code
* the number of generated strategies differs due to the original code pruning out useless strategies based on knowledge of the inputs / mesh

Clearly, for pointwise / add, the original code saves a lot of time by generating only the one relevant strategy (in this test case, both inputs are R, so the only strategy it bothers generating is R, R -> R, and this indeed saves time especially as the mesh dim grows.

On the other hand, the absolute time taken for mm strategies is significantly higher, and we've been getting by ok without optimizing it.

```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```

[ghstack-poisoned]
wconstab added a commit that referenced this pull request Dec 4, 2025
```
test_name='mm', mesh_name='mesh_6d', time for expanded strategy:240.83ms (slowdown=1.01x) len(orig_s.strategies)=4096, len(single_s.strategies)=4096
test_name='mm', mesh_name='mesh_5d', time for expanded strategy:53.08ms (slowdown=1.03x) len(orig_s.strategies)=1024, len(single_s.strategies)=1024
test_name='mm', mesh_name='mesh_4d', time for expanded strategy:11.53ms (slowdown=1.03x) len(orig_s.strategies)=256, len(single_s.strategies)=256
test_name='mm', mesh_name='mesh_3d', time for expanded strategy:2.45ms (slowdown=1.03x) len(orig_s.strategies)=64, len(single_s.strategies)=64
test_name='mm', mesh_name='mesh_2d', time for expanded strategy:0.51ms (slowdown=1.02x) len(orig_s.strategies)=16, len(single_s.strategies)=16
test_name='mm', mesh_name='mesh_1d', time for expanded strategy:0.11ms (slowdown=0.98x) len(orig_s.strategies)=4, len(single_s.strategies)=4
test_name='add', mesh_name='mesh_6d', time for expanded strategy:48.93ms (slowdown=828.61x) len(orig_s.strategies)=1, len(single_s.strategies)=729
test_name='add', mesh_name='mesh_5d', time for expanded strategy:14.37ms (slowdown=252.09x) len(orig_s.strategies)=1, len(single_s.strategies)=243
test_name='add', mesh_name='mesh_4d', time for expanded strategy:4.18ms (slowdown=86.88x) len(orig_s.strategies)=1, len(single_s.strategies)=81
test_name='add', mesh_name='mesh_3d', time for expanded strategy:1.20ms (slowdown=26.57x) len(orig_s.strategies)=1, len(single_s.strategies)=27
test_name='add', mesh_name='mesh_2d', time for expanded strategy:0.34ms (slowdown=7.91x) len(orig_s.strategies)=1, len(single_s.strategies)=9
test_name='add', mesh_name='mesh_1d', time for expanded strategy:0.10ms (slowdown=2.68x) len(orig_s.strategies)=1, len(single_s.strategies)=3
```
ghstack-source-id: 578dc1f
Pull Request resolved: #168116
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions Bot added the Stale label Feb 2, 2026
@wconstab wconstab closed this Mar 3, 2026
@github-actions
github-actions Bot deleted the gh/wconstab/460/head branch April 3, 2026 02:23
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