Skip to content

Commit 7503bb3

Browse files
Qualcomm AI Engine Direct - Deprecate convert_bmm_to_matmul pass (#11392)
### Summary - delete convert_bmm_to_matmul pass - add torch.ops.aten.matmul.default in skip_decomp_table ### Test plan General CI
1 parent 078fb23 commit 7503bb3

File tree

5 files changed

+1
-83
lines changed

5 files changed

+1
-83
lines changed

backends/qualcomm/_passes/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from .annotate_quant_attrs import AnnotateQuantAttrs
99
from .annotate_stack import AnnotateStack
1010
from .annotate_unbind import AnnotateUnbind
11-
from .convert_bmm_to_matmul import ConvertBmmToMatmul
1211
from .convert_conv1d_to_conv2d import ConvertConv1dToConv2d
1312
from .convert_square_to_pow import ConvertSquareToPow
1413
from .decompose_any import DecomposeAny
@@ -46,7 +45,6 @@
4645
AnnotateQuantAttrs,
4746
AnnotateStack,
4847
AnnotateUnbind,
49-
ConvertBmmToMatmul,
5048
ConvertConv1dToConv2d,
5149
ConvertSquareToPow,
5250
DecomposeAny,

backends/qualcomm/_passes/convert_bmm_to_matmul.py

Lines changed: 0 additions & 76 deletions
This file was deleted.

backends/qualcomm/_passes/qnn_pass_manager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
AnnotateQuantAttrs,
1414
AnnotateStack,
1515
AnnotateUnbind,
16-
ConvertBmmToMatmul,
1716
ConvertConv1dToConv2d,
1817
ConvertSquareToPow,
1918
DecomposeAny,
@@ -81,7 +80,6 @@ def get_capture_program_passes():
8180
(AnnotateQuantAttrs, True),
8281
(AnnotateStack, True),
8382
(AnnotateUnbind, True),
84-
(ConvertBmmToMatmul, True),
8583
(ConvertConv1dToConv2d, True),
8684
(DecomposeAny, True),
8785
(DecomposeColIm, True),

backends/qualcomm/_passes/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def get_passes_dependency_for_capture_program():
6464
AnnotateQuantAttrs,
6565
AnnotateStack,
6666
AnnotateUnbind,
67-
ConvertBmmToMatmul,
6867
ConvertConv1dToConv2d,
6968
DecomposeAny,
7069
DecomposeColIm,
@@ -85,12 +84,10 @@ def get_passes_dependency_for_capture_program():
8584
AnnotateAdaptiveAvgPool1D: [RemoveRedundancy],
8685
AnnotateQuantAttrs: [
8786
RecomposePixelUnshuffle,
88-
ConvertBmmToMatmul,
8987
RemoveRedundancy,
9088
],
9189
AnnotateStack: [RemoveRedundancy],
9290
AnnotateUnbind: [RemoveRedundancy],
93-
ConvertBmmToMatmul: [RecomposePixelUnshuffle],
9491
DecomposeAny: [RemoveRedundancy],
9592
DecomposeColIm: [FoldQDQ],
9693
DecomposeLinalgVectorNorm: [RemoveRedundancy],

backends/qualcomm/partition/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def get_skip_decomp_table() -> List[torch._ops.OperatorBase]:
5050
torch.ops.aten.instance_norm.default,
5151
torch.ops.aten.leaky_relu.default,
5252
torch.ops.aten.linear.default,
53+
torch.ops.aten.matmul.default,
5354
torch.ops.aten.pixel_shuffle.default,
5455
torch.ops.aten.pixel_unshuffle.default,
5556
torch.ops.aten.prelu.default,

0 commit comments

Comments
 (0)