Skip to content

Commit fad26af

Browse files
cccclaifacebook-github-bot
authored andcommitted
Back out "Revert D64082731" (#6339)
Summary: Pull Request resolved: #6339 Original commit changeset: 0f02a7dff4f1 Original Phabricator Diff: D64507094 Reviewed By: kirklandsign Differential Revision: D64565807 fbshipit-source-id: 4accbc57a622ea6846fdc87421cdf91bd3466941
1 parent 2c43190 commit fad26af

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

backends/qualcomm/utils/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import operator
88
import warnings
99
from collections import OrderedDict
10-
from typing import Callable, Dict, List, Set, Tuple
10+
from typing import Callable, Dict, FrozenSet, List, Set, Tuple
1111

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

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

292292

293293
def _transform(
294-
edge_program: ExportedProgram, custom_pass_config: Set[str] = None
295-
) -> None:
296-
custom_pass_config = custom_pass_config or {}
294+
edge_program: ExportedProgram, custom_pass_config: FrozenSet[str] = frozenset()
295+
) -> ExportedProgram:
297296
# currently ExirExportedProgram.transform does not accept
298297
# changes of input number which was caused by FoldQDQ
299298
# apply passes one by one here to avoid IR capture failure
@@ -325,6 +324,7 @@ def _transform(
325324
edge_program.graph_module,
326325
)
327326
edge_program._validate()
327+
return edge_program
328328

329329

330330
def capture_program(

examples/qualcomm/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def build_executorch_binary(
234234
shared_buffer=False,
235235
metadata=None,
236236
dump_intermediate_outputs=False,
237-
custom_pass_config=None,
237+
custom_pass_config=frozenset(),
238238
):
239239
if quant_dtype is not None:
240240
quantizer = custom_quantizer or make_quantizer(quant_dtype=quant_dtype)

0 commit comments

Comments
 (0)