Skip to content

Commit 579d958

Browse files
Michiel-Olieslagersfreddan80
authored andcommitted
Added support for torch.concat operator.
Added torch.ops.aten.concatenate.default in the list of supported operators in the generic annotator. Also added a test to check the functionality of the newly added operator. Change-Id: I24d0fbf96bf9fd57ebd059cefd2af0f525fe8235
1 parent 9873457 commit 579d958

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

backends/arm/quantizer/quantization_annotation/generic_annotator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
torch.ops.aten.tile.default,
5454
torch.ops.aten.flip.default,
5555
torch.ops.aten.cat.default,
56+
torch.ops.aten.concatenate.default,
5657
torch.ops.aten.stack.default,
5758
torch.ops.aten.chunk.default,
5859
torch.ops.aten.contiguous.default,

backends/arm/test/quantizer/test_generic_annotater.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,10 @@ def test_flip(self):
8686
self.check_annotation(
8787
SingleOpModel(torch.flip, (torch.randn(2, 4),), dims=(0, 1)),
8888
)
89+
90+
def test_concat(self):
91+
self.check_annotation(
92+
SingleOpModel(
93+
torch.concatenate, ((torch.randn(2, 3), torch.randn(2, 3)),), dim=0
94+
),
95+
)

0 commit comments

Comments
 (0)