Skip to content

Enable Arm VGF delegate in pybind builds#19290

Open
robell wants to merge 3 commits intopytorch:mainfrom
robell:arm_pybind
Open

Enable Arm VGF delegate in pybind builds#19290
robell wants to merge 3 commits intopytorch:mainfrom
robell:arm_pybind

Conversation

@robell
Copy link
Copy Markdown
Collaborator

@robell robell commented May 5, 2026

  • Enable VGF in pybind build if directed by env var.
  • Use VGF pybind in the wheel builds, based on package availability.

Summary

This adds VGF runtime delegate to end pip installs, and gives the option for ./install_executorch.sh to include it for developer side.

It'll need some testing of the wheel building to check that works reliably, but it's designed to fall back to the "normal" wheel builds if the dependencies aren't available.

This tidies up vgf with runtime installation further to the following:

  1. developer flows ./examples/arm/setup.sh --enable-mlsdk-deps export EXECUTORCH_PYBIND_ENABLE_VGF=ON ./install_executorch.sh --editable --optional-dependency vgf

  2. wheel builds: # will invoke .ci/scripts/wheel/pre_build_script.sh # suitable platforms have EXECUTORCH_PYBIND_ENABLE_VGF=ON set

  3. end users: pip install executorch[vgf] # published wheels contain runtime delegate on supported platforms

I'd still like to remove emulation_layer from the requirements as a platform setup item (vulkan and emulated vs real is a property of the platform we land on, not our problem to solve).

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson

- Enable VGF in pybind build if directed by env var.
- Use VGF pybind in the wheel builds, based on package availability.

This tidies up vgf with runtime installation further to the following:

1. developer flows
 ./examples/arm/setup.sh --enable-mlsdk-deps
 export EXECUTORCH_PYBIND_ENABLE_VGF=ON
 ./install_executorch.sh --editable --optional-dependency vgf

2. wheel builds:
 # will invoke .ci/scripts/wheel/pre_build_script.sh
 # suitable platforms have EXECUTORCH_PYBIND_ENABLE_VGF=ON set

3. end users:
 pip install executorch[vgf]
 # published wheels contain runtime delegate on supported platforms

I'd still like to remove emulation_layer from the requirements as a
platform setup item (vulkan and emulated vs real is a property of the
platform we land on, not our problem to solve).

Change-Id: I63caf3a3691022c83468a9c45f30884222779d33
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com>
Copilot AI review requested due to automatic review settings May 5, 2026 09:40
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 5, 2026

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 4 New Failures, 6 Unrelated Failures

As of commit a5010de with merge base 8e653a6 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs 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.

@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 May 5, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an opt-in mechanism to include Arm’s VGF runtime delegate in ExecuTorch pybind builds (developer installs and CI wheel builds), enabling the delegate only when explicitly requested and when required build inputs are available.

Changes:

  • Added an EXECUTORCH_PYBIND_ENABLE_VGF env-var gate in the pybind CMake preset, enabling EXECUTORCH_BUILD_VGF (and currently Vulkan) for Linux/macOS pybind builds.
  • Updated Arm setup flows to split “AoT VGF” vs “VGF runtime library” pip requirements, enabling more targeted dependency installation.
  • Updated wheel pre-build CI logic to opportunistically install VGF build inputs and enable VGF only when available, plus added a macOS Vulkan SDK setup script.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/cmake/preset/pybind.cmake Adds env-var gating to enable VGF (and Vulkan) in the default pybind preset on Linux/macOS.
examples/arm/setup.sh Splits MLSDK pip dependency installation to separate AoT deps vs runtime VGF library deps.
CMakeLists.txt Links vgf_backend into pybind when EXECUTORCH_BUILD_VGF is enabled.
backends/arm/scripts/setup-mlsdk-from-source.sh Updates “keep in sync” comment to include the new runtime requirements file.
backends/arm/requirements-arm-vgf.txt Removes ai_ml_sdk_vgf_library from the AoT VGF requirements file.
backends/arm/requirements-arm-vgf-runtime.txt New runtime-only requirements file for ai_ml_sdk_vgf_library.
.ci/scripts/wheel/pre_build_script.sh Adds logic to install runtime VGF build inputs and configure Vulkan for VGF-enabled wheel builds when possible.
.ci/scripts/setup-vulkan-macos-deps.sh New helper to install Vulkan SDK on macOS CI runners for VGF/Vulkan builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backends/arm/requirements-arm-vgf-runtime.txt
Comment thread .ci/scripts/wheel/pre_build_script.sh
Comment thread tools/cmake/preset/pybind.cmake
robell added 2 commits May 5, 2026 13:16
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com>
Change-Id: Idbe56c440a7c720d232d1e593674485509f687d1
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com>
Change-Id: I5680de25e7a004ac6883bd4f855baee1bf6b4874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: arm Issues related to arm backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants