Skip to content

Commit f438da8

Browse files
authored
Qualcomm AI Engine Direct - Add checks for Bmm to Matmul pass (#8365)
raise error when new pattern found
1 parent 2e204b9 commit f438da8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backends/qualcomm/_passes/convert_bmm_to_matmul.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ def call(self, graph_module: torch.fx.GraphModule):
5252
for src_partition in src_partitions:
5353
op_cnt = Counter([n.target for n in src_partition.nodes])
5454
if op_cnt not in self.patterns:
55-
continue
55+
raise AssertionError(
56+
"Found a new pattern needed be converted to linear op"
57+
)
5658

5759
inputs = src_partition.input_nodes
5860
bmm_node = [n for n in src_partition.nodes if n.target == self.bmm][0]

0 commit comments

Comments
 (0)