Ship the OpenVINO delegate as its own library - #21770
Open
shoumikhin wants to merge 73 commits into
Open
Conversation
Contributor
Author
shoumikhin
requested review from
kirklandsign,
larryliu0820 and
mergennachin
as code owners
August 12, 2026 06:08
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21770
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 1 Unrelated Failure, 8 Unclassified FailuresAs of commit 765de9e with merge base ed2d9ec ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Aug 12, 2026
shoumikhin
force-pushed
the
gh/shoumikhin/96/head
branch
from
August 12, 2026 16:19
9428da3 to
2cdf978
Compare
shoumikhin
force-pushed
the
gh/shoumikhin/105/head
branch
from
August 12, 2026 16:19
00563b2 to
d3de6d5
Compare
digantdesai
reviewed
Aug 18, 2026
| target_link_libraries(openvino_backend PRIVATE executorch_core ${CMAKE_DL_LIBS}) | ||
| target_link_libraries(openvino_backend PRIVATE ${CMAKE_DL_LIBS}) | ||
|
|
||
| if(EXECUTORCH_BUILD_SHARED) |
Contributor
There was a problem hiding this comment.
I thought we were not doing all the backends? what made you include this one?
digantdesai
reviewed
Aug 18, 2026
| # stop supporting. Name the two datacentre architectures the release rows | ||
| # build for, so a source build produces device code that runs on the same | ||
| # GPUs the wheels target. | ||
| set(CMAKE_CUDA_ARCHITECTURES "80;86") |
Contributor
There was a problem hiding this comment.
move this to one of the previous PRs introduces cuda?
digantdesai
reviewed
Aug 18, 2026
Comment on lines
+126
to
+129
| if sys.platform == "darwin": | ||
| _BUNDLED_THREADPOOL_SYMBOLS = ("cpuinfo_initialize",) | ||
| else: | ||
| _BUNDLED_THREADPOOL_SYMBOLS = ("pthreadpool_create", "cpuinfo_initialize") |
Contributor
There was a problem hiding this comment.
Is this also OpenVino related?
digantdesai
approved these changes
Aug 18, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The OpenVINO delegate was compiled into the Python extension, so only Python could
use it. A C++ application had no way to link it from the wheel, which is the same gap
the other delegates had before they were split out.
It now builds as its own library and ships beside the runtime, so an application can
ask for it:
Only the adapter ships here. The OpenVINO runtime itself is loaded at run time and is
not part of the wheel, so the component's documentation says to install it separately,
and the wheel does not grow meaningfully: the adapter is a few kilobytes.
The library resolves the runtime from the shared runtime library rather than from the
static core, so the delegate registers into the one registry the process has instead of
a second private one.
Test Plan: built a wheel with OpenVINO enabled on Linux x86_64 and inspected it.
The library ships at executorch/lib/libexecutorch_backend_openvino.so. Its delegate
symbols moved out of the Python extension, 13 in the library and 0 in the extension,
so the process has one copy and one registration. Its only ExecuTorch dependency is
the shared runtime library, and it records no link dependency on OpenVINO, confirming
the runtime is still loaded at run time. Added an ownership row to the shared library
test so a future change that puts the delegate back into the extension fails there.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani