Skip to content

Commit

Permalink
Return the exported_program from transform to allow internal usage (#…
Browse files Browse the repository at this point in the history
…6210)

Summary:

It's mainly to make it easier to use internally...

Differential Revision: D64082731
  • Loading branch information
cccclai authored and facebook-github-bot committed Oct 15, 2024
1 parent 11eeec7 commit af655bd
Showing 1 changed file with 4 additions and 4 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 @@ -290,9 +290,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 @@ -322,6 +321,7 @@ def _transform(
edge_program.graph_module,
)
edge_program._validate()
return edge_program


def capture_program(
Expand Down

0 comments on commit af655bd

Please sign in to comment.