Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions exir/program/_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,18 @@ def _remove_invalid_ops_for_not_decompose(
) -> List[torch._ops.OpOverload]:
# To address https://github.com/pytorch/executorch/issues/8781
def keep(op):
# Explicit allow list
allow_list = []
try:
# Ops in torch.ops.quant are not always loaded, so we use try/except
# Aliases output, but we need to allow it for XNNPACK
allow_list.append(torch.ops.quant.choose_qparams_affine.default)
except:
pass

if op in allow_list:
return True

schema = op._schema
native_schema = _pybind_schema_to_native_schema(schema)
if native_schema.is_mutable:
Expand Down
Loading