Commit a4593f1
Add sum.dim_IntList to RemovePermutesAroundElementwiseOps
Summary:
`DecomposeMeanDimPass` decomposes `mean.dim` into `sum.dim_IntList + mul.Tensor`.
While `mean.dim` and `mul.Tensor` are both in the `permutable_ops` set of
`RemovePermutesAroundElementwiseOps`, `sum.dim_IntList` is not — so the pass
cannot traverse through the decomposed chain to find the matching exit permute.
This adds `aten.sum.dim_IntList` to `permutable_ops` with the same keepdim
validation and dimension-adjustment logic already used for `mean.dim`. This is
safe because:
- `sum.dim_IntList` has identical dimension semantics to `mean.dim`
- `DecomposeMeanDimPass` always calls sum with `keepdim=True`
- `mul.Tensor` (the other half of the decomposition) is already handled
Reviewed By: 3l1
Differential Revision: D1032722731 parent 94d2881 commit a4593f1
1 file changed
Lines changed: 9 additions & 2 deletions
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| |||
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
239 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
240 | 247 | | |
241 | 248 | | |
242 | 249 | | |
| |||
0 commit comments