Skip to content

Commit 4bebc49

Browse files
metascroyZonglin Peng
authored and
Zonglin Peng
committed
Fix broken tests
Differential Revision: D70503708 Pull Request resolved: #8888
1 parent c294920 commit 4bebc49

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

exir/program/_program.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,18 @@ def _remove_invalid_ops_for_not_decompose(
978978
) -> List[torch._ops.OpOverload]:
979979
# To address https://github.com/pytorch/executorch/issues/8781
980980
def keep(op):
981+
# Explicit allow list
982+
allow_list = []
983+
try:
984+
# Ops in torch.ops.quant are not always loaded, so we use try/except
985+
# Aliases output, but we need to allow it for XNNPACK
986+
allow_list.append(torch.ops.quant.choose_qparams_affine.default)
987+
except:
988+
pass
989+
990+
if op in allow_list:
991+
return True
992+
981993
schema = op._schema
982994
native_schema = _pybind_schema_to_native_schema(schema)
983995
if native_schema.is_mutable:

0 commit comments

Comments
 (0)