Skip to content

Commit

Permalink
Back out "Revert D64082731" (#6339)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #6339

Original commit changeset: 0f02a7dff4f1

Original Phabricator Diff: D64507094

Reviewed By: kirklandsign

Differential Revision: D64565807

fbshipit-source-id: 4accbc57a622ea6846fdc87421cdf91bd3466941
  • Loading branch information
cccclai authored and facebook-github-bot committed Oct 18, 2024
1 parent 2c43190 commit fad26af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions backends/qualcomm/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import operator
import warnings
from collections import OrderedDict
from typing import Callable, Dict, List, Set, Tuple
from typing import Callable, Dict, FrozenSet, List, Set, Tuple

import executorch.backends.qualcomm.python.PyQnnManagerAdaptor as PyQnnManagerAdaptor

Expand Down Expand Up @@ -291,9 +291,8 @@ def get_decomp_table() -> Dict[torch._ops.OperatorBase, Callable]:


def _transform(
edge_program: ExportedProgram, custom_pass_config: Set[str] = None
) -> None:
custom_pass_config = custom_pass_config or {}
edge_program: ExportedProgram, custom_pass_config: FrozenSet[str] = frozenset()
) -> ExportedProgram:
# currently ExirExportedProgram.transform does not accept
# changes of input number which was caused by FoldQDQ
# apply passes one by one here to avoid IR capture failure
Expand Down Expand Up @@ -325,6 +324,7 @@ def _transform(
edge_program.graph_module,
)
edge_program._validate()
return edge_program


def capture_program(
Expand Down
2 changes: 1 addition & 1 deletion examples/qualcomm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def build_executorch_binary(
shared_buffer=False,
metadata=None,
dump_intermediate_outputs=False,
custom_pass_config=None,
custom_pass_config=frozenset(),
):
if quant_dtype is not None:
quantizer = custom_quantizer or make_quantizer(quant_dtype=quant_dtype)
Expand Down

0 comments on commit fad26af

Please sign in to comment.