Skip to content

Commit af655bd

Browse files
cccclaifacebook-github-bot
authored andcommitted
Return the exported_program from transform to allow internal usage (#6210)
Summary: It's mainly to make it easier to use internally... Differential Revision: D64082731
1 parent 11eeec7 commit af655bd

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

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

291291

292292
def _transform(
293-
edge_program: ExportedProgram, custom_pass_config: Set[str] = None
294-
) -> None:
295-
custom_pass_config = custom_pass_config or {}
293+
edge_program: ExportedProgram, custom_pass_config: FrozenSet[str] = frozenset()
294+
) -> ExportedProgram:
296295
# currently ExirExportedProgram.transform does not accept
297296
# changes of input number which was caused by FoldQDQ
298297
# apply passes one by one here to avoid IR capture failure
@@ -322,6 +321,7 @@ def _transform(
322321
edge_program.graph_module,
323322
)
324323
edge_program._validate()
324+
return edge_program
325325

326326

327327
def capture_program(

0 commit comments

Comments
 (0)