diff --git a/exir/passes/constant_prop_pass.py b/exir/passes/constant_prop_pass.py index 0049e597f8d..6921bd632f4 100644 --- a/exir/passes/constant_prop_pass.py +++ b/exir/passes/constant_prop_pass.py @@ -29,7 +29,8 @@ # Avoid propagating constants for `exir.ops.edge.aten.full.default`. # Propagating aten.full can significantly increase compiled model size. -_DEFAULT_SKIP_TARGETS = {exir_ops.edge.aten.full.default} +_DEFAULT_SKIP_TARGETS_NO_QUANT = {exir_ops.edge.aten.full.default} +_DEFAULT_SKIP_TARGETS = set(_DEFAULT_SKIP_TARGETS_NO_QUANT) # Do not const prop quantization primitives _QUANT_PRIMITIVES_EDGE = [aten_to_edge(op) for op in _QUANT_PRIMITIVES] @@ -48,6 +49,10 @@ ) +def get_default_skip_targets_no_quant() -> set[EdgeOpOverload]: + return _DEFAULT_SKIP_TARGETS_NO_QUANT + + def is_const( arg, exported_program: ExportedProgram,