Skip to content

Commit a77eb9f

Browse files
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: D116573000
1 parent 81969a9 commit a77eb9f

3 files changed

Lines changed: 1929 additions & 0 deletions

File tree

‎backends/arm/_passes/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
from .deduplicate_get_attr_pass import DeduplicateGetAttrPass # noqa
117117
from .ensure_unique_output_nodes_pass import EnsureUniqueOutputNodesPass # noqa
118118
from .exir_to_tosa_pass import ExirToTosaPass # noqa
119+
from .fold_dyt_affine_into_conv_pass import FoldDyTAffineIntoConvPass # noqa
119120
from .fold_dyt_alpha_into_lut_pass import FoldDyTAlphaIntoLUTPass # noqa
120121
from .fold_qdq_with_annotated_qparams_pass import ( # noqa
121122
FoldAndAnnotateQParamsPass,

0 commit comments

Comments
 (0)