Skip to content

Commit 8106204

Browse files
committed
Added DimorderOpsRevertPass to Openvino backend
1 parent 1736571 commit 8106204

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backends/openvino/partitioner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def __init__(self):
3636
class OpenvinoOperatorsSupport(OperatorSupportBase):
3737
extended_support_dict = {
3838
"torch.ops.dim_order_ops._clone_dim_order.default": None,
39+
"torch.ops.dim_order_ops._to_dim_order_copy.default": None,
3940
}
4041

4142
def __init__(

backends/openvino/preprocess.py

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

99
from typing import final, List
1010

11-
from executorch.backends.transforms.remove_clone_ops import RemoveCloneOpsTransform
11+
from executorch.exir.passes.memory_format_ops_pass import DimOrderOpsRevertPass
1212
from executorch.exir.backend.backend_details import (
1313
BackendDetails,
1414
ExportedProgram,
@@ -37,8 +37,7 @@ def preprocess(
3737
Returns:
3838
PreprocessResult: The result of preprocessing, including the compiled model bytes.
3939
"""
40-
# Apply RemoveCloneOpsTransform to eliminate unnecessary clone operations
41-
transformed_ep = RemoveCloneOpsTransform()(edge_program.graph_module)
40+
transformed_ep = DimOrderOpsRevertPass()(edge_program.graph_module)
4241

4342
# Update the edge_program with the transformed graph
4443
if transformed_ep and transformed_ep.graph_module:

0 commit comments

Comments
 (0)