Enable Arm VGF delegate in pybind builds#19290
Conversation
- 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>
🔗 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 SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 4 New Failures, 6 Unrelated FailuresAs of commit a5010de with merge base 8e653a6 ( 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. |
This PR needs a
|
There was a problem hiding this comment.
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_VGFenv-var gate in the pybind CMake preset, enablingEXECUTORCH_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.
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com> Change-Id: Idbe56c440a7c720d232d1e593674485509f687d1
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com> Change-Id: I5680de25e7a004ac6883bd4f855baee1bf6b4874
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:
developer flows ./examples/arm/setup.sh --enable-mlsdk-deps export EXECUTORCH_PYBIND_ENABLE_VGF=ON ./install_executorch.sh --editable --optional-dependency vgf
wheel builds: # will invoke .ci/scripts/wheel/pre_build_script.sh # suitable platforms have EXECUTORCH_PYBIND_ENABLE_VGF=ON set
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