Skip to content

Commit 858fd02

Browse files
Qualcomm AI Engine Direct - Deprecate convert_bmm_to_matmul pass
Summary: - delete convert_bmm_to_matmul pass - add torch.ops.aten.matmul.default in skip_decomp_table
1 parent 60929cf commit 858fd02

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
@@ -44,7 +43,6 @@
4443
AnnotateQuantAttrs,
4544
AnnotateStack,
4645
AnnotateUnbind,
47-
ConvertBmmToMatmul,
4846
ConvertConv1dToConv2d,
4947
ConvertSquareToPow,
5048
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,
@@ -79,7 +78,6 @@ def get_capture_program_passes():
7978
(AnnotateQuantAttrs, True),
8079
(AnnotateStack, True),
8180
(AnnotateUnbind, True),
82-
(ConvertBmmToMatmul, True),
8381
(ConvertConv1dToConv2d, True),
8482
(DecomposeAny, True),
8583
(ExpandBroadcastTensorShape, False),

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
DecomposeLinalgVectorNorm,
@@ -84,12 +83,10 @@ def get_passes_dependency_for_capture_program():
8483
AnnotateAdaptiveAvgPool1D: [RemoveRedundancy],
8584
AnnotateQuantAttrs: [
8685
RecomposePixelUnshuffle,
87-
ConvertBmmToMatmul,
8886
RemoveRedundancy,
8987
],
9088
AnnotateStack: [RemoveRedundancy],
9189
AnnotateUnbind: [RemoveRedundancy],
92-
ConvertBmmToMatmul: [RecomposePixelUnshuffle],
9390
DecomposeAny: [RemoveRedundancy],
9491
DecomposeLinalgVectorNorm: [RemoveRedundancy],
9592
ExpandBroadcastTensorShape: [FoldQDQ],

backends/qualcomm/partition/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def get_skip_decomp_table() -> List[torch._ops.OperatorBase]:
4848
torch.ops.aten.instance_norm.default,
4949
torch.ops.aten.leaky_relu.default,
5050
torch.ops.aten.linear.default,
51+
torch.ops.aten.matmul.default,
5152
torch.ops.aten.pixel_shuffle.default,
5253
torch.ops.aten.pixel_unshuffle.default,
5354
torch.ops.aten.prelu.default,

0 commit comments

Comments
 (0)