Skip to content

Commit c95b2a6

Browse files
mcr229facebook-github-bot
authored andcommitted
fix permute copy name
Summary: 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. Differential Revision: D48488930 fbshipit-source-id: a1d23eba6f6adf8141ad57479b2b4984d2255364
1 parent b26db1d commit c95b2a6

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

backends/xnnpack/operators/__init__.py

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 9 deletions
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)