Skip to content

Commit 50aa517

Browse files
cccclaifacebook-github-bot
authored andcommitted
Return the exported_program from transform to allow internal usage (#6210)
Summary: Pull Request resolved: #6210 It's mainly to make it easier to use internally... Reviewed By: kirklandsign Differential Revision: D64082731 fbshipit-source-id: 4579064a13d1faebd1356f0c7945de9a51691039
1 parent 0c5536e commit 50aa517

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
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(

0 commit comments

Comments
 (0)