Skip to content

Commit 2117c1a

Browse files
authored
add a list for ops to be added
Differential Revision: D61002938 Pull Request resolved: #4624
1 parent e71fa03 commit 2117c1a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

backends/qualcomm/partition/common_defs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
exir_ops.edge.aten.copy.default,
1717
]
1818

19+
to_be_implemented_operator = [
20+
exir_ops.edge.aten.where.default,
21+
]
22+
1923
allow_list_operator = [
2024
_operator.getitem,
2125
]

backends/qualcomm/partition/qnn_partitioner.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
from torch.fx.passes.infra.partitioner import Partition
2828
from torch.fx.passes.operator_support import OperatorSupportBase
2929

30-
from .common_defs import allow_list_operator, not_supported_operator
30+
from .common_defs import (
31+
allow_list_operator,
32+
not_supported_operator,
33+
to_be_implemented_operator,
34+
)
3135

3236

3337
class QnnOperatorSupport(OperatorSupportBase):
@@ -62,6 +66,12 @@ def is_node_supported(self, _, node: torch.fx.Node) -> bool:
6266
if node.op != "call_function" or node.target in not_supported_operator:
6367
return False
6468

69+
if node.target in to_be_implemented_operator:
70+
print(
71+
f"[QNN Partitioner Op Support]: {node.target.__name__} | Skipped, this op can be supported, please report an issue in https://github.com/pytorch/executorch/issues"
72+
)
73+
return False
74+
6575
if node.target in allow_list_operator:
6676
return True
6777

0 commit comments

Comments
 (0)