Commit f9bac8c
committed
refactor: default _op_preserves_axis_identity's fallback to unsafe
After the previous commit's restructuring, this function is only ever
called for ops confirmed to be in _AXIS_REORDERING_ATEN_OPS (transpose,
t, permute) - and the three branches above already cover every member
of that set exhaustively, so the trailing fallback is unreachable in
current operation.
Flip it from True to False anyway, so a future op added to
_AXIS_REORDERING_ATEN_OPS without a matching branch here fails safe
(assumed to move the axis) rather than fails open (assumed to leave it
untouched). Before the prior commit, this fallback was still reachable
by pooling ops falling through with no explicit branch, so it had to
stay True; now that pooling is dispatched to a separate branch in the
caller and never reaches this function, the flip is a no-op in
practice (confirmed: no test outcome changes) but closes the gap for
whatever's added here next.1 parent 605cc97 commit f9bac8c
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
334 | | - | |
| 336 | + | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| |||
0 commit comments