Skip to content

Commit fd6a05f

Browse files
tarun292pytorchbot
authored andcommitted
Move xnnpack.passes to xnnpack._passes (#5917)
Summary: Changing `xnnpack.passes` to `xnnpack._passes` to indicate that these passes are not covered under the API stability guarantee. Pull Request resolved: #5917 Reviewed By: Olivia-liu, helunwencser Differential Revision: D63925008 fbshipit-source-id: 3d9f13c0a3bd61c66d07cebd62047a3e24f8af1d (cherry picked from commit 59cc817)
1 parent dc496bb commit fd6a05f

35 files changed

+66
-52
lines changed

backends/xnnpack/TARGETS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ runtime.python_library(
1616
],
1717
deps = [
1818
"//executorch/backends/transforms:lib",
19+
"//executorch/backends/xnnpack/_passes:xnnpack_passes",
1920
"//executorch/backends/xnnpack/operators:operators",
20-
"//executorch/backends/xnnpack/passes:xnnpack_passes",
2121
"//executorch/backends/xnnpack/serialization:xnnpack_serializer",
2222
"//executorch/exir:graph_module",
2323
"//executorch/exir/backend:backend_details",
File renamed without changes.

backends/xnnpack/passes/__init__.py renamed to backends/xnnpack/_passes/__init__.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,27 @@
66

77
from typing import List, Optional, Type
88

9-
from executorch.backends.xnnpack.passes.channels_last_tagged_reshape_pass import (
9+
from executorch.backends.xnnpack._passes.channels_last_tagged_reshape_pass import (
1010
ChannelsLastTaggedReshapePass,
1111
)
12-
from executorch.backends.xnnpack.passes.conv1d_unsqueeze_pass import Conv1dUnsqueezePass
13-
from executorch.backends.xnnpack.passes.convert_to_linear import ConvertToLinearPass
14-
from executorch.backends.xnnpack.passes.convert_to_sdpa import ConvertToSDPAPass
15-
from executorch.backends.xnnpack.passes.convert_to_upsample_bilinear2d import (
12+
from executorch.backends.xnnpack._passes.conv1d_unsqueeze_pass import (
13+
Conv1dUnsqueezePass,
14+
)
15+
from executorch.backends.xnnpack._passes.convert_to_linear import ConvertToLinearPass
16+
from executorch.backends.xnnpack._passes.convert_to_sdpa import ConvertToSDPAPass
17+
from executorch.backends.xnnpack._passes.convert_to_upsample_bilinear2d import (
1618
ConvertToUpsampleBilinear2d,
1719
)
18-
from executorch.backends.xnnpack.passes.fuse_activation_pass import FuseActivationPass
19-
from executorch.backends.xnnpack.passes.fuse_batch_norm_with_conv import (
20+
from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
21+
from executorch.backends.xnnpack._passes.fuse_batch_norm_with_conv import (
2022
FuseBatchNormWithConvPass,
2123
)
22-
from executorch.backends.xnnpack.passes.prelu_reshape_pass import PReLUReshapePass
23-
from executorch.backends.xnnpack.passes.remove_getitem_op import RemoveGetItemPass
24-
from executorch.backends.xnnpack.passes.tag_implicit_q_dq_pass import TagImplicitQDqPass
25-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
24+
from executorch.backends.xnnpack._passes.prelu_reshape_pass import PReLUReshapePass
25+
from executorch.backends.xnnpack._passes.remove_getitem_op import RemoveGetItemPass
26+
from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
27+
TagImplicitQDqPass,
28+
)
29+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
2630

2731
from executorch.exir.pass_base import ExportPass
2832

backends/xnnpack/passes/channels_last_tagged_reshape_pass.py renamed to backends/xnnpack/_passes/channels_last_tagged_reshape_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Optional, Tuple
88

99
import torch
10-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
10+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
1111
from executorch.backends.xnnpack.utils.utils import is_param_node
1212
from executorch.exir.dialects._ops import ops as exir_ops
1313
from executorch.exir.pass_base import PassResult

backends/xnnpack/passes/conv1d_unsqueeze_pass.py renamed to backends/xnnpack/_passes/conv1d_unsqueeze_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Optional
88

99
import torch
10-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
10+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
1111
from executorch.backends.xnnpack.utils.quant_utils import is_dequant, is_quant
1212
from executorch.backends.xnnpack.utils.utils import get_param_tensor, is_param_node
1313
from executorch.exir.dialects._ops import ops as exir_ops

backends/xnnpack/passes/convert_to_sdpa.py renamed to backends/xnnpack/_passes/convert_to_sdpa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
import torch
1111
from executorch.backends.transforms import get_shape
12-
from executorch.backends.xnnpack.partition.graphs import sdpa
1312

14-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
13+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
14+
from executorch.backends.xnnpack.partition.graphs import sdpa
1515
from executorch.exir.dialects._ops import ops as exir_ops
1616

1717
from torch.fx.passes.infra.pass_base import PassResult

backends/xnnpack/passes/convert_to_upsample_bilinear2d.py renamed to backends/xnnpack/_passes/convert_to_upsample_bilinear2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# LICENSE file in the root directory of this source tree.
66

77
import torch
8+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
89
from executorch.backends.xnnpack.partition.graphs import bilinear_2d
9-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
1010
from executorch.backends.xnnpack.utils.utils import check_or_raise
1111
from executorch.exir.dialects._ops import ops as exir_ops
1212
from torch.fx.passes.infra.pass_base import PassResult

backends/xnnpack/passes/fuse_activation_pass.py renamed to backends/xnnpack/_passes/fuse_activation_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import torch
99

10-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
10+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
1111
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import OutputMinMax
1212

1313
from executorch.backends.xnnpack.utils.utils import check_or_raise

backends/xnnpack/passes/fuse_batch_norm_with_conv.py renamed to backends/xnnpack/_passes/fuse_batch_norm_with_conv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import torch
1010

11-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
11+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
1212

1313
from executorch.backends.xnnpack.utils.utils import get_param_tensor, is_param_node
1414
from executorch.exir import ExportedProgram

backends/xnnpack/passes/prelu_reshape_pass.py renamed to backends/xnnpack/_passes/prelu_reshape_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# LICENSE file in the root directory of this source tree.
66

77
import torch
8-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
8+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
99
from executorch.backends.xnnpack.utils.utils import (
1010
check_or_raise,
1111
get_param_tensor,

backends/xnnpack/passes/tag_implicit_q_dq_pass.py renamed to backends/xnnpack/_passes/tag_implicit_q_dq_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
from typing import cast, List, Optional
88

99
import torch
10+
from executorch.backends.xnnpack._passes.xnnpack_pass import XNNPACKPass
1011
from executorch.backends.xnnpack.partition.configs import (
1112
SUPPORTED_IMPLICIT_Q_DQ_MODULES_SET,
1213
SUPPORTED_IMPLICIT_Q_DQ_OP_NAMES_SET,
1314
)
14-
from executorch.backends.xnnpack.passes.xnnpack_pass import XNNPACKPass
1515
from executorch.backends.xnnpack.utils.quant_utils import (
1616
is_dequant,
1717
is_dynamic_qdq,

backends/xnnpack/operators/node_visitor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
import torch
1212
from executorch.backends.transforms import get_shape
1313

14-
from executorch.backends.xnnpack.operators.quant_params import QuantParams
15-
16-
from executorch.backends.xnnpack.passes.channels_last_tagged_reshape_pass import (
14+
from executorch.backends.xnnpack._passes.channels_last_tagged_reshape_pass import (
1715
ChannelsLastTaggedReshapePass,
1816
)
1917

18+
from executorch.backends.xnnpack.operators.quant_params import QuantParams
19+
2020
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
2121
ConstantDataOffset,
2222
PerChannelGroupQuant,

backends/xnnpack/operators/op_add.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
from typing import Dict
88

99
import torch
10+
from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
1011
from executorch.backends.xnnpack.operators.node_visitor import (
1112
NodeVisitor,
1213
register_node_visitor,
1314
)
1415
from executorch.backends.xnnpack.operators.quant_params import QuantParams
15-
from executorch.backends.xnnpack.passes.fuse_activation_pass import FuseActivationPass
1616
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1717
XNNAdd,
1818
XNNGraph,

backends/xnnpack/operators/op_conv2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
import torch
1010
from executorch.backends.transforms import get_shape
11+
from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
1112
from executorch.backends.xnnpack.operators.node_visitor import (
1213
NodeVisitor,
1314
register_node_visitor,
1415
)
1516
from executorch.backends.xnnpack.operators.quant_params import QuantParams
16-
from executorch.backends.xnnpack.passes.fuse_activation_pass import FuseActivationPass
1717
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1818
XNNConv2d,
1919
XNNDepthwiseConv2d,

backends/xnnpack/operators/op_dequantize_per_tensor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
from typing import Dict
88

99
import torch
10+
from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
11+
TagImplicitQDqPass,
12+
)
1013
from executorch.backends.xnnpack.operators.node_visitor import (
1114
NodeVisitor,
1215
register_node_visitor,
1316
)
1417
from executorch.backends.xnnpack.operators.quant_params import QuantParams
15-
from executorch.backends.xnnpack.passes.tag_implicit_q_dq_pass import TagImplicitQDqPass
1618
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1719
XNNConvert,
1820
XNNGraph,

backends/xnnpack/operators/op_linear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
from typing import Dict
88

99
import torch
10+
from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
1011
from executorch.backends.xnnpack.operators.node_visitor import (
1112
get_input_node,
1213
NodeVisitor,
1314
register_node_visitor,
1415
)
1516
from executorch.backends.xnnpack.operators.quant_params import QuantParams
16-
from executorch.backends.xnnpack.passes.fuse_activation_pass import FuseActivationPass
1717
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1818
XNNFullyConnected,
1919
XNNGraph,

backends/xnnpack/operators/op_permute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
from typing import cast, Dict, List
88

99
import torch
10+
from executorch.backends.xnnpack._passes.channels_last_tagged_reshape_pass import (
11+
ChannelsLastTaggedReshapePass,
12+
)
1013
from executorch.backends.xnnpack.operators.node_visitor import (
1114
NodeVisitor,
1215
register_node_visitor,
1316
)
14-
from executorch.backends.xnnpack.passes.channels_last_tagged_reshape_pass import (
15-
ChannelsLastTaggedReshapePass,
16-
)
1717
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1818
XNNGraph,
1919
XNNStaticTranspose,

backends/xnnpack/operators/op_quantize_per_tensor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
from typing import Dict
88

99
import torch
10+
from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
11+
TagImplicitQDqPass,
12+
)
1013
from executorch.backends.xnnpack.operators.node_visitor import (
1114
NodeVisitor,
1215
register_node_visitor,
1316
)
1417
from executorch.backends.xnnpack.operators.quant_params import QuantParams
15-
from executorch.backends.xnnpack.passes.tag_implicit_q_dq_pass import TagImplicitQDqPass
1618
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1719
XNNConvert,
1820
XNNGraph,

backends/xnnpack/operators/op_sub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
from typing import Dict
88

99
import torch
10+
from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
1011
from executorch.backends.xnnpack.operators.node_visitor import (
1112
NodeVisitor,
1213
register_node_visitor,
1314
)
1415
from executorch.backends.xnnpack.operators.quant_params import QuantParams
15-
from executorch.backends.xnnpack.passes.fuse_activation_pass import FuseActivationPass
1616
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1717
XNNGraph,
1818
XNNSubtract,

backends/xnnpack/operators/quant_params.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
from typing import cast, Optional, Union
1010

1111
import torch
12-
from executorch.backends.xnnpack.passes.tag_implicit_q_dq_pass import TagImplicitQDqPass
12+
from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
13+
TagImplicitQDqPass,
14+
)
1315
from executorch.backends.xnnpack.utils.quant_utils import (
1416
extract_qdq_affine_op_args_for_decomposed_ops,
1517
is_affine_qdq,

backends/xnnpack/partition/config/node_configs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
from typing import List, Optional
1010

1111
import torch
12+
from executorch.backends.xnnpack._passes.fuse_batch_norm_with_conv import (
13+
FuseBatchNormWithConvPass,
14+
)
1215
from executorch.backends.xnnpack.partition.config.xnnpack_config import (
1316
ConfigPrecisionType,
1417
XNNPartitionerConfig,
1518
)
16-
from executorch.backends.xnnpack.passes.fuse_batch_norm_with_conv import (
17-
FuseBatchNormWithConvPass,
18-
)
1919
from executorch.backends.xnnpack.utils.utils import is_param_node
2020
from executorch.exir.backend.canonical_partitioners.config_partitioner import (
2121
format_target_name,

backends/xnnpack/test/TARGETS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runtime.python_test(
1313
"test_xnnpack_utils_classes.py",
1414
],
1515
deps = [
16-
"//executorch/backends/xnnpack/passes:xnnpack_passes",
16+
"//executorch/backends/xnnpack/_passes:xnnpack_passes",
1717
"//executorch/backends/xnnpack/test/tester:tester",
1818
"//executorch/backends/xnnpack/utils:xnnpack_utils",
1919
"//executorch/exir:lib",

backends/xnnpack/test/passes/test_activation_fusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import unittest
88

99
import torch
10-
from executorch.backends.xnnpack.passes.convert_to_linear import ConvertToLinearPass
11-
from executorch.backends.xnnpack.passes.fuse_activation_pass import FuseActivationPass
10+
from executorch.backends.xnnpack._passes.convert_to_linear import ConvertToLinearPass
11+
from executorch.backends.xnnpack._passes.fuse_activation_pass import FuseActivationPass
1212
from executorch.backends.xnnpack.test.tester import RunPasses, Tester
1313
from executorch.exir.dialects._ops import ops as exir_ops
1414

backends/xnnpack/test/passes/test_batch_norm_fusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Tuple
99

1010
import torch
11-
from executorch.backends.xnnpack.passes.fuse_batch_norm_with_conv import (
11+
from executorch.backends.xnnpack._passes.fuse_batch_norm_with_conv import (
1212
FuseBatchNormWithConvPass,
1313
)
1414
from executorch.backends.xnnpack.test.tester import RunPasses, Tester

backends/xnnpack/test/passes/test_channels_last_tagged_reshape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import unittest
88

99
import torch
10-
from executorch.backends.xnnpack.passes.channels_last_tagged_reshape_pass import (
10+
from executorch.backends.xnnpack._passes.channels_last_tagged_reshape_pass import (
1111
ChannelsLastTaggedReshapePass,
1212
)
1313
from executorch.backends.xnnpack.test.test_xnnpack_utils_classes import (

backends/xnnpack/test/passes/test_convert_to_linear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import unittest
88

99
import torch
10-
from executorch.backends.xnnpack.passes.convert_to_linear import ConvertToLinearPass
10+
from executorch.backends.xnnpack._passes.convert_to_linear import ConvertToLinearPass
1111
from executorch.backends.xnnpack.test.tester import RunPasses, Tester
1212

1313

backends/xnnpack/test/passes/test_remove_get_item_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import unittest
88

99
import torch
10-
from executorch.backends.xnnpack.passes.remove_getitem_op import RemoveGetItemPass
10+
from executorch.backends.xnnpack._passes.remove_getitem_op import RemoveGetItemPass
1111
from executorch.backends.xnnpack.test.tester import RunPasses, Tester
1212

1313

backends/xnnpack/test/passes/test_tag_implicit_q_dq_pass.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
import unittest
88

99
import torch
10-
from executorch.backends.xnnpack.passes.tag_implicit_q_dq_pass import TagImplicitQDqPass
10+
from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
11+
TagImplicitQDqPass,
12+
)
1113
from executorch.backends.xnnpack.test.tester import RunPasses, Tester
1214
from executorch.exir.backend.canonical_partitioners.duplicate_dequant_node_pass import (
1315
DuplicateDequantNodePass,

backends/xnnpack/test/tester/tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
1515

1616
import torch
17+
from executorch.backends.xnnpack._passes import XNNPACKPassManager
1718
from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
18-
from executorch.backends.xnnpack.passes import XNNPACKPassManager
1919
from executorch.backends.xnnpack.utils.configs import get_xnnpack_edge_compile_config
2020
from executorch.exir import (
2121
EdgeCompileConfig,

backends/xnnpack/xnnpack_preprocess.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
from typing import Dict, final, List
1010

1111
import torch
12-
from executorch.backends.xnnpack.operators.node_visitor import get_node_visitors
1312

14-
from executorch.backends.xnnpack.passes import XNNPACKPassManager
15-
from executorch.backends.xnnpack.passes.convert_to_linear import ConvertToLinearPass
16-
from executorch.backends.xnnpack.passes.tag_implicit_q_dq_pass import TagImplicitQDqPass
13+
from executorch.backends.xnnpack._passes import XNNPACKPassManager
14+
from executorch.backends.xnnpack._passes.convert_to_linear import ConvertToLinearPass
15+
from executorch.backends.xnnpack._passes.tag_implicit_q_dq_pass import (
16+
TagImplicitQDqPass,
17+
)
18+
from executorch.backends.xnnpack.operators.node_visitor import get_node_visitors
1719

1820
from executorch.backends.xnnpack.serialization.xnnpack_graph_schema import (
1921
ConstantDataOffset,

docs/source/native-delegates-executorch-xnnpack-delegate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The `XnnpackPartitioner` also partitions using op targets. It traverses the grap
3636

3737
##### Passes
3838

39-
Before any serialization, we apply passes on the subgraphs to prepare the graph. These passes are essentially graph transformations that help improve the performance of the delegate. We give an overview of the most significant passes and their function below. For a description of all passes see [here](https://github.com/pytorch/executorch/tree/main/backends/xnnpack/passes):
39+
Before any serialization, we apply passes on the subgraphs to prepare the graph. These passes are essentially graph transformations that help improve the performance of the delegate. We give an overview of the most significant passes and their function below. For a description of all passes see [here](https://github.com/pytorch/executorch/tree/main/backends/xnnpack/_passes):
4040

4141
* Channels Last Reshape
4242
* ExecuTorch tensors tend to be contiguous before passing them into delegates, while XNNPACK only accepts channels-last memory layout. This pass minimizes the number of permutation operators inserted to pass in channels-last memory format.

extension/llm/export/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from executorch.backends.transforms.duplicate_dynamic_quant_chain import (
1717
DuplicateDynamicQuantChainPass,
1818
)
19-
from executorch.backends.xnnpack.passes.convert_to_linear import ConvertToLinearPass
19+
from executorch.backends.xnnpack._passes.convert_to_linear import ConvertToLinearPass
2020
from executorch.exir import EdgeProgramManager
2121
from executorch.exir.backend.partitioner import Partitioner
2222

0 commit comments

Comments
 (0)