Skip to content

Ship the OpenVINO delegate as its own library - #21770

Open
shoumikhin wants to merge 1 commit into
gh/shoumikhin/96/headfrom
gh/shoumikhin/105/head
Open

Ship the OpenVINO delegate as its own library#21770
shoumikhin wants to merge 1 commit into
gh/shoumikhin/96/headfrom
gh/shoumikhin/105/head

Conversation

@shoumikhin

Copy link
Copy Markdown
Contributor

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:

find_package(executorch REQUIRED COMPONENTS backend_openvino)
target_link_libraries(my_app PRIVATE executorch::backend_openvino)

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.

@pytorch-bot

pytorch-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🔗 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.

⏳ No Failures, 58 Pending

As of commit 0cd1a5f with merge base 43f89fb (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 12, 2026
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/96/head branch from 9428da3 to 2cdf978 Compare August 12, 2026 16:19
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/105/head branch from 00563b2 to d3de6d5 Compare August 12, 2026 16:19
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/96/head branch from ad25407 to b35ed5a Compare August 12, 2026 20:45
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/105/head branch from 08b5194 to afdae58 Compare August 12, 2026 20:45
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/96/head branch from b35ed5a to 5c91267 Compare August 12, 2026 22:14
shoumikhin added a commit that referenced this pull request Aug 12, 2026
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:

    find_package(executorch REQUIRED COMPONENTS backend_openvino)
    target_link_libraries(my_app PRIVATE executorch::backend_openvino)

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.

ghstack-source-id: b6b210a
ghstack-comment-id: 5263017453
Pull-Request: #21770
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/105/head branch from afdae58 to 3c8893b Compare August 12, 2026 22:15
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/96/head branch from 5c91267 to b11bd14 Compare August 12, 2026 22:29
shoumikhin added a commit that referenced this pull request Aug 12, 2026
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:

    find_package(executorch REQUIRED COMPONENTS backend_openvino)
    target_link_libraries(my_app PRIVATE executorch::backend_openvino)

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.

ghstack-source-id: b6b210a
ghstack-comment-id: 5263017453
Pull-Request: #21770
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/105/head branch from 3c8893b to 441058a Compare August 12, 2026 22:29
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/96/head branch from b11bd14 to 808641d Compare August 13, 2026 00:08
shoumikhin added a commit that referenced this pull request Aug 13, 2026
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:

    find_package(executorch REQUIRED COMPONENTS backend_openvino)
    target_link_libraries(my_app PRIVATE executorch::backend_openvino)

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.

ghstack-source-id: b6b210a
ghstack-comment-id: 5263017453
Pull-Request: #21770
@shoumikhin
shoumikhin force-pushed the gh/shoumikhin/105/head branch from 441058a to 7965117 Compare August 13, 2026 00:08
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:

    find_package(executorch REQUIRED COMPONENTS backend_openvino)
    target_link_libraries(my_app PRIVATE executorch::backend_openvino)

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.

ghstack-source-id: b6b210a
ghstack-comment-id: 5263017453
Pull-Request: #21770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant