Commit 354b0ff
[inductor] Fix
The `_index_fill` decomposition used mutable `empty_like + copy_` to
restore strides when `index_copy` returned a contiguous tensor, which
broke the functional graph invariant. Replace with the functional
`prims.copy_strided` prim that does the same thing as a single op.
Fixes #144846
Authored with Claude.
Pull Request resolved: #176606
Approved by: https://github.com/Lucaskabelaindex_reduce_ on view inputs raising AssertionError in assert_functional_graph (#176606)1 parent 45d619c commit 354b0ff
3 files changed
Lines changed: 14 additions & 3 deletions
File tree
- test/inductor
- pallas_expected_failures
- torch/_refs
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15912 | 15912 | | |
15913 | 15913 | | |
15914 | 15914 | | |
| 15915 | + | |
| 15916 | + | |
| 15917 | + | |
| 15918 | + | |
| 15919 | + | |
| 15920 | + | |
| 15921 | + | |
| 15922 | + | |
| 15923 | + | |
| 15924 | + | |
| 15925 | + | |
| 15926 | + | |
| 15927 | + | |
15915 | 15928 | | |
15916 | 15929 | | |
15917 | 15930 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4319 | 4319 | | |
4320 | 4320 | | |
4321 | 4321 | | |
4322 | | - | |
4323 | | - | |
4324 | | - | |
| 4322 | + | |
4325 | 4323 | | |
4326 | 4324 | | |
4327 | 4325 | | |
| |||
0 commit comments