-
Notifications
You must be signed in to change notification settings - Fork 921
[OpenVINO] Windows Support #18678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
suryasidd
wants to merge
6
commits into
pytorch:main
Choose a base branch
from
suryasidd:ov_windows_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[OpenVINO] Windows Support #18678
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
70f9084
Initial Windows support for OpenVINO backend
suryasidd e12266e
Updated README
suryasidd 69db4d5
Fixed linter issues
suryasidd f62b9be
Merge branch 'main' into ov_windows_support
suryasidd ae1332c
Merge branch 'main' into ov_windows_support
suryasidd b134db8
Fixed CMakelists.txt
suryasidd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,20 +14,26 @@ For more information on the supported hardware, please refer to [OpenVINO System | |||||
|
|
||||||
| ## Quick Start (pip wheel) | ||||||
|
|
||||||
| On Linux, the OpenVINO backend is included in the ExecuTorch pip wheel. Install the OpenVINO runtime to activate it: | ||||||
| On Linux and Windows, the OpenVINO backend is included in the ExecuTorch pip wheel. Install the OpenVINO runtime to activate it: | ||||||
|
|
||||||
| ```bash | ||||||
| pip install executorch[openvino] | ||||||
| ``` | ||||||
|
|
||||||
| The backend automatically discovers the OpenVINO C library from the pip-installed package — no `LD_LIBRARY_PATH` setup is needed. | ||||||
| The backend automatically discovers the OpenVINO C library from the pip-installed package — no `LD_LIBRARY_PATH` (Linux) or `PATH` (Windows) setup is needed. | ||||||
|
|
||||||
| If auto-discovery fails (e.g. non-standard install), you can point to the library explicitly: | ||||||
|
|
||||||
| **Linux:** | ||||||
| ```bash | ||||||
| export OPENVINO_LIB_PATH=$(python3 -c "import openvino, os; print(os.path.join(os.path.dirname(openvino.__file__), 'libs', 'libopenvino_c.so'))") | ||||||
| ``` | ||||||
|
|
||||||
| **Windows (PowerShell):** | ||||||
| ```powershell | ||||||
| $env:OPENVINO_LIB_PATH = python -c "import openvino, os; print(os.path.join(os.path.dirname(openvino.__file__), 'libs', 'openvino_c.dll'))" | ||||||
| ``` | ||||||
|
|
||||||
| Verify the backend is available: | ||||||
|
|
||||||
| ```python | ||||||
|
|
@@ -44,50 +50,169 @@ print(_get_registered_backend_names()) | |||||
| executorch | ||||||
| ├── backends | ||||||
| │ └── openvino | ||||||
| │ ├── _passes | ||||||
| │ │ ├── __init__.py | ||||||
| │ │ └── decompose_floor_divide_pass.py | ||||||
| │ ├── quantizer | ||||||
| │ ├── observers | ||||||
| │ └── nncf_observers.py | ||||||
| │ ├── __init__.py | ||||||
| │ └── quantizer.py | ||||||
| │ │ ├── __init__.py | ||||||
| │ │ ├── llm_compression.py | ||||||
| │ │ ├── observers.py | ||||||
| │ │ └── quantizer.py | ||||||
| │ ├── runtime | ||||||
| │ ├── OpenvinoApi.h | ||||||
| │ ├── OpenvinoBackend.cpp | ||||||
| │ └── OpenvinoBackend.h | ||||||
| │ │ ├── OpenvinoApi.h | ||||||
| │ │ ├── OpenvinoBackend.cpp | ||||||
| │ │ └── OpenvinoBackend.h | ||||||
| │ ├── scripts | ||||||
| │ └── openvino_build.sh | ||||||
| │ │ └── openvino_build.sh | ||||||
| │ ├── test | ||||||
| │ │ └── tester | ||||||
| │ │ ├── __init__.py | ||||||
| │ │ └── tester.py | ||||||
| │ ├── tests | ||||||
| │ │ ├── models | ||||||
| │ │ │ └── test_classification.py | ||||||
| │ │ ├── ops | ||||||
| │ │ │ ├── base_openvino_op_test.py | ||||||
| │ │ │ └── test_*.py | ||||||
| │ │ ├── quantizer | ||||||
| │ │ │ ├── synthetic_test_models.py | ||||||
| │ │ │ └── test_llm_compression.py | ||||||
| │ │ ├── README.md | ||||||
| │ │ └── test_runner.py | ||||||
| │ ├── CMakeLists.txt | ||||||
| │ ├── README.md | ||||||
| │ ├── __init__.py | ||||||
| │ ├── partitioner.py | ||||||
| │ ├── preprocess.py | ||||||
| │ └── requirements.txt | ||||||
| └── examples | ||||||
| └── openvino | ||||||
| ├── aot_optimize_and_infer.py | ||||||
| └── README.md | ||||||
| └── openvino # See examples/openvino/README.md | ||||||
| ``` | ||||||
|
|
||||||
| ## Build Instructions | ||||||
|
|
||||||
| ### Prerequisites | ||||||
| ### Setup | ||||||
|
|
||||||
| Follow the steps below to setup your build environment: | ||||||
|
|
||||||
|
|
||||||
| 1. **Create a Virtual Environment** | ||||||
| - Create a virtual environment and activate it by executing the commands below. | ||||||
|
|
||||||
| **Linux:** | ||||||
| ```bash | ||||||
| python -m venv env | ||||||
| source env/bin/activate | ||||||
| ``` | ||||||
|
|
||||||
| **Windows (PowerShell):** | ||||||
| ```powershell | ||||||
| python -m venv env | ||||||
| env\Scripts\Activate.ps1 | ||||||
| ``` | ||||||
| 2. **Clone ExecuTorch Repository from GitHub** | ||||||
| - On Windows, enable symlinks before cloning. Refer to [Building from Source](https://docs.pytorch.org/executorch/main/using-executorch-building-from-source.html#environment-setup) for more details. | ||||||
| - Clone Executorch repository by executing the command below. | ||||||
|
||||||
| - Clone Executorch repository by executing the command below. | |
| - Clone ExecuTorch repository by executing the command below. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.