Skip to content

Commit b9d88f5

Browse files
mcr229facebook-github-bot
authored andcommitted
fix permute copy name (#80)
Summary: Pull Request resolved: #80 We have a node_visitor for permute already, it was mistakenly named static_transpose after its xnnpack counterpart. permute_copy should not be skipped. It should only be skipped when applied to linear weights. Instead our linear conversion pass will convert away any permute_copies which are not actually to be executed. Reviewed By: kirklandsign Differential Revision: D48488930 fbshipit-source-id: a347d61842a805694c8bddee9fa0efd73ab706d7
1 parent 0ece196 commit b9d88f5

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

backends/xnnpack/operators/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
op_minimum,
3131
op_multiply,
3232
op_negate,
33+
op_permute,
3334
op_prelu,
3435
op_quantize_per_tensor,
3536
op_relu,
@@ -42,7 +43,6 @@
4243
op_squeeze,
4344
op_static_constant_pad,
4445
op_static_resize_bilinear_2d,
45-
op_static_transpose,
4646
op_sub,
4747
op_to_copy,
4848
)

backends/xnnpack/operators/op_static_transpose.py renamed to backends/xnnpack/operators/op_permute.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
@register_node_visitor
23-
class StaticTransposeVisitor(NodeVisitor):
23+
class PermuteVisitor(NodeVisitor):
2424
target = "aten.permute_copy.default"
2525

2626
def __init__(self, *args) -> None:

backends/xnnpack/operators/op_skip_ops.py

-9
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,3 @@ class OpSymSizeInt(OpSkipOps):
113113
"""
114114

115115
target = "sym_size.int"
116-
117-
118-
@register_node_visitor
119-
class OpPermuteCopyDefault(OpSkipOps):
120-
"""
121-
do nothing if node is permute_copy.default
122-
"""
123-
124-
target = "aten.permute_copy.default"

0 commit comments

Comments
 (0)