File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed
backends/xnnpack/operators Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -289,12 +289,6 @@ def define_tensor(
289
289
290
290
# convert tensor shape must reflect memory format, default is contiguous, so
291
291
# only permute shape if we are converting the tensor to nhwc format
292
- if tensor .target in (
293
- exir_ops .edge .aten .permute_copy .default ,
294
- exir_ops .edge .aten .t_copy .default ,
295
- ):
296
- # We ignore transpose nodes and reverse the dims to before it
297
- dims = dims [::- 1 ]
298
292
if swap_nc_for_depthwise_weights :
299
293
dims = [dims [1 ], dims [0 ]] + dims [2 :]
300
294
if convert_to_nhwc :
Original file line number Diff line number Diff line change 22
22
from executorch .backends .xnnpack .utils .xnnpack_constants import (
23
23
XNN_FLAG_TRANSPOSE_WEIGHTS ,
24
24
)
25
- from executorch .exir .dialects ._ops import ops as exir_ops
26
25
27
26
28
27
@register_node_visitor
@@ -56,15 +55,7 @@ def define_node(
56
55
# output
57
56
output_id = vals_to_ids [node ]
58
57
59
- flag = (
60
- 0
61
- if get_input_node (node , 2 ).target
62
- in (
63
- exir_ops .edge .aten .permute_copy .default ,
64
- exir_ops .edge .aten .t_copy .default ,
65
- )
66
- else XNN_FLAG_TRANSPOSE_WEIGHTS
67
- )
58
+ flag = XNN_FLAG_TRANSPOSE_WEIGHTS
68
59
69
60
ser_node = XNode (
70
61
xnode_union = XNNFullyConnected (
You can’t perform that action at this time.
0 commit comments