Skip to content

Commit 64ea7fb

Browse files
Fix OpenVINO ci (#14819)
### Summary Re enable OpenVINO CI Fixes #14314 ### Test plan Tested this PR locally with setup-openvino.sh and test_openvino.sh The CI should run these two scripts and verify that all tests are passing Co-authored-by: Surya Siddharth Pemmaraju <[email protected]>
1 parent f983d15 commit 64ea7fb

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

.ci/scripts/setup-openvino.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ set -ex
1010
# shellcheck source=/dev/null
1111
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1212

13-
git clone https://github.com/openvinotoolkit/openvino.git
14-
cd openvino && git checkout releases/2025/1
15-
git submodule update --init --recursive
16-
sudo ./install_build_dependencies.sh
17-
mkdir build && cd build
18-
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON
19-
make -j$(nproc)
13+
# Download and install OpenVINO from release packages
14+
OPENVINO_VERSION="2025.3"
15+
OPENVINO_BUILD="2025.3.0.19807.44526285f24"
16+
OPENVINO_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION}/linux/openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64.tgz"
2017

21-
cd ..
22-
cmake --install build --prefix dist
18+
curl -Lo /tmp/openvino_toolkit.tgz --retry 3 --fail ${OPENVINO_URL}
19+
tar -xzf /tmp/openvino_toolkit.tgz
20+
mv openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64 openvino
2321

24-
source dist/setupvars.sh
25-
cd ../backends/openvino
22+
source openvino/setupvars.sh
23+
cd backends/openvino
2624
pip install -r requirements.txt
2725
cd scripts
2826
./openvino_build.sh --enable_python

.ci/scripts/test_openvino.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set -ex
1010
# shellcheck source=/dev/null
1111
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1212

13-
source openvino/dist/setupvars.sh
13+
source openvino/setupvars.sh
1414
cd backends/openvino/tests
1515
python test_runner.py --test_type ops
1616
python test_runner.py --test_type models

.github/workflows/pull.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,6 @@ jobs:
779779
contents: read
780780
strategy:
781781
fail-fast: false
782-
if: false # TODO Re-enable after fixing timeouts (#14314)
783782
with:
784783
runner: linux.2xlarge
785784
docker-image: ci-image:executorch-ubuntu-22.04-gcc9

backends/openvino/partitioner.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727

2828

2929
class OpenvinoOperatorsSupport(OperatorSupportBase):
30+
extended_support_dict = {
31+
"torch.ops.dim_order_ops._clone_dim_order.default": None,
32+
"torch.ops.dim_order_ops._to_dim_order_copy.default": None,
33+
}
3034

3135
def __init__(
3236
self,
@@ -62,7 +66,9 @@ def is_node_supported(self, _, node: torch.fx.Node) -> bool:
6266
op_type = node.target.__name__
6367
else:
6468
op_type = str(node.target)
65-
supported_ops = OperatorSupport(options)._support_dict
69+
supported_ops = (
70+
OperatorSupport(options)._support_dict | self.extended_support_dict
71+
)
6672
if op_type == "getitem":
6773
return True
6874

backends/openvino/preprocess.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
PreprocessResult,
1515
)
1616
from executorch.exir.backend.compile_spec_schema import CompileSpec
17+
18+
from executorch.exir.passes.memory_format_ops_pass import DimOrderOpsRevertPass
1719
from openvino.frontend.pytorch.torchdynamo.compile import ( # type: ignore[import-untyped]
1820
openvino_compile,
1921
)
@@ -36,6 +38,12 @@ def preprocess(
3638
Returns:
3739
PreprocessResult: The result of preprocessing, including the compiled model bytes.
3840
"""
41+
transformed_ep = DimOrderOpsRevertPass()(edge_program.graph_module)
42+
43+
# Update the edge_program with the transformed graph
44+
if transformed_ep and transformed_ep.graph_module:
45+
edge_program._graph_module = transformed_ep.graph_module
46+
3947
input_names = edge_program.graph_signature.user_inputs
4048
args = []
4149
for node in edge_program.graph.nodes:

0 commit comments

Comments
 (0)