Skip to content

Commit a5717e9

Browse files
billmguofacebook-github-bot
authored andcommitted
oss qnn bug fix
Summary: #8304 1. the graph actually include the torch.ops.aten.silu.default not the torch.nn.functional.silu 2. the aten.mul.tensor is arg is scalar, this could apply to other ops Differential Revision: D69286388
1 parent 57891b7 commit a5717e9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

backends/qualcomm/_passes/annotate_and_quant_scalar.py

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class AnnotateAndQuantScalar(ExportPass):
3636
torch.ops.aten.sub.Scalar,
3737
torch.ops.aten.mul.Scalar,
3838
torch.ops.aten.div.Scalar,
39+
torch.ops.aten.mul.Tensor,
3940
"add",
4041
"sub",
4142
"mul",

backends/qualcomm/_passes/decompose_silu.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def _copy_meta(self, meta: Dict):
2222

2323
def call(self, graph_module: torch.fx.GraphModule):
2424
graph = graph_module.graph
25-
partitions = get_source_partitions(graph, [torch.nn.functional.silu])
25+
partitions = get_source_partitions(
26+
graph, [torch.nn.functional.silu, torch.ops.aten.silu.default]
27+
)
2628
for _, src_partitions in partitions.items():
2729
for src_partition in src_partitions:
2830

0 commit comments

Comments
 (0)