Skip to content

Commit 277c39d

Browse files
Make constant_folding's _DEFAULT_SKIP_TARGETS public
Differential Revision: D74349918 Pull Request resolved: #10760
1 parent 5ad676d commit 277c39d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

exir/passes/constant_prop_pass.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
# Avoid propagating constants for `exir.ops.edge.aten.full.default`.
3131
# Propagating aten.full can significantly increase compiled model size.
32-
_DEFAULT_SKIP_TARGETS = {exir_ops.edge.aten.full.default}
32+
_DEFAULT_SKIP_TARGETS_NO_QUANT = {exir_ops.edge.aten.full.default}
33+
_DEFAULT_SKIP_TARGETS = set(_DEFAULT_SKIP_TARGETS_NO_QUANT)
3334

3435
# Do not const prop quantization primitives
3536
_QUANT_PRIMITIVES_EDGE = [aten_to_edge(op) for op in _QUANT_PRIMITIVES]
@@ -48,6 +49,10 @@
4849
)
4950

5051

52+
def get_default_skip_targets_no_quant() -> set[EdgeOpOverload]:
53+
return _DEFAULT_SKIP_TARGETS_NO_QUANT
54+
55+
5156
def is_const(
5257
arg,
5358
exported_program: ExportedProgram,

0 commit comments

Comments
 (0)