Repository navigation
Commit a77eb9f
authored
Fold DyT affine maps into following convolutions (pytorch#21953) (pytorch#21953)
Summary:
Companion to FoldDyTAlphaIntoLUTPass. FoldDyTAffineIntoConvPass removes
the per-channel gamma Mul and beta Add after the DyT TABLE by folding
their exact integer-affine map into the following convolution weights
and bias.
The pass evaluates the materialized 256-entry TABLE path and rewrites
only when the map is provably exact. It fails closed on nonlinear or
saturating maps, unsupported layouts or constants, mismatched
quantization metadata, and ambiguous layout provenance. Padded
convolutions retain beta when its boundary contribution cannot be
represented by one bias.
Coverage includes non-uniform gamma/beta, unpadded depthwise
convolutions, output-zero-point equality, unused-constant cleanup, and
exact-one-permute layout provenance. This revision contains only the
public pass implementation, tests, and package export; pass registration
is intentionally outside this public change.
Reviewed By: rascani
Differential Revision: D1165730001 parent 81969a9 commit a77eb9f
3 files changed
Lines changed: 1929 additions & 0 deletions
File tree
- backends/arm
- _passes
- test/passes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
0 commit comments