Skip to content

OpenVINO backend: add Windows support - #24670

Open
avbelova wants to merge 9 commits into
pytorch:mainfrom
avbelova:openvino_windows
Open

avbelova wants to merge 9 commits into
pytorch:mainfrom
avbelova:openvino_windows

Conversation

@avbelova

@avbelova avbelova commented Nov 5, 2026 •

Copy link
Copy Markdown

Summary

Add an ability and instructions to build executorch with OpenVINO backend on Windows - both cpp and python wheel. Enabled Yolo2.6​, Llama3.2​, Qwen2.5​ and Stable Diffusion models on Windows.

Test plan

Tested manually following the instructions at backends/openvino/README.md, examples/models/yolo26/README.md, examples/openvino/llama/README.md, examples/openvino/qwen2_5/README.md and examples/openvino/stable_diffusion/README.md

cc @nil-is-all

Copilot AI balanced review requested due to automatic review settings November 5, 2026 15:58
@pytorch-bot

pytorch-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24670

Note: Links to docs will display an error until the docs builds have been completed.

⚠️ 27 Awaiting Approval

As of commit e12c0cd with merge base 20f7ac9 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla

meta-cla Bot commented Nov 5, 2026

Copy link
Copy Markdown

Hi @avbelova!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

CLA Not Signed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved errors and omissions in the Windows instructions—including model paths, PowerShell downloads, OpenVINO discovery, and toolchain prerequisites—can block the documented builds and inference runs.

6 open issues
What changed in this PR

This PR adds Windows build and usage instructions for ExecuTorch’s OpenVINO backend, alongside targeted packaging and runtime changes.

Changes:

  • Documents PowerShell setup, Python package builds, and C++ runtime builds.
  • Adds Windows commands for Llama, Qwen2.5, and YOLO26 examples.
  • Updates read-only cache cleanup, Windows runner library selection, and execution-handle state.
File Description
setup.py Retries cache removal after clearing read-only permissions.
examples/​openvino/​qwen2_5/​README.md Adds Windows export, build, and inference commands.
examples/​openvino/​llama/​README.md Adds Windows instructions and updates tokenizer guidance.
examples/​models/​yolo26/​README.md Documents Windows demo build and execution commands.
examples/​models/​llama/​runner/​CMakeLists.txt Applies static-library selection to all Windows toolchains.
backends/​openvino/​runtime/​OpenvinoBackend.h Adds an OpenVINO core pointer to execution handles.
backends/​openvino/​README.md Separates Linux and Windows setup and build flows.

Review effort: Balanced

Comment thread backends/openvino/README.md Resolved
Comment on lines +280 to +283
- Pip package:

```powershell
python -m pip install openvino

```powershell
cd $HOME\Downloads
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2026.2.1/windows/openvino_toolkit_windows_2026.2.1.21919.ede283a88e3_x86_64.zip --output openvino_2026.2.1.zip

For additional source build details, refer to the [OpenVINO Build Instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_windows.md).

#### Build Commands (Windows)

#### Windows (PowerShell):
```powershell
<executorch_root>\cmake-out\examples\models\llama\Release\llama_main.exe --model_path="llama3_2_ov.pte" --tokenizer_path="C:\path\to\model\tokenizer.json" --prompt="Your custom prompt" --max_new_tokens=128

```powershell
.\cmake-out\examples\models\llama\Release\llama_main.exe `
--model_path=<executorch_root>\examples\openvino\qwen2_5\qwen2_5_1_5b_ov.pte `
@executorch-triage executorch-triage Bot added the community: contribution PRs coming from community (excluding hardware partners) label Nov 5, 2026
…chain versions and Clang tools'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@meta-cla

meta-cla Bot commented Nov 9, 2026

Copy link
Copy Markdown

Hi @avbelova!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Copilot AI balanced review requested due to automatic review settings November 9, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The documented setup and inference flows still fail due to PowerShell-incompatible curl usage, missing CMake discovery for pip installs, and incorrect OpenVINO and model paths.

5 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Use the OpenVINO directory version installed by the instructions

examples/​openvino/​llama/​README.md:15

The linked Windows archive instructions install OpenVINO into openvino_2026.2.1, not openvino_2026.2.0. Following those instructions leaves this script path nonexistent. Use the same versioned directory here so environment initialization succeeds.

1 resolved since last review

Review effort: Balanced

@nil-is-all nil-is-all added release notes: openvino OpenVino backend related issues, features, bugs etc. module: openvino Issues and PRs related to backends/openvino module: windows labels Nov 9, 2026
Copilot AI balanced review requested due to automatic review settings November 11, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Windows instructions omit required OpenVINO discovery settings, mark required Clang tools as optional, and use incorrect model paths and a PowerShell-incompatible download command, causing setup and inference failures.

7 open issues

Review effort: Balanced

#### Windows Prerequisites

1. Windows 10 or 11 (x64)
2. Visual Studio 2022 with Desktop development with C++ and the optional C++ Clang tools for Windows
- Pip package:

```powershell
python -m pip install openvino

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community: contribution PRs coming from community (excluding hardware partners) module: openvino Issues and PRs related to backends/openvino module: windows release notes: openvino OpenVino backend related issues, features, bugs etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants