Skip to content

Commit dffea3d

Browse files
committed
Build VGF pybind without Vulkan backend
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com> Change-Id: Id1514f7154e3e449d7d85c3b0e841cdb1cb1ebb7
1 parent a5010de commit dffea3d

3 files changed

Lines changed: 2 additions & 97 deletions

File tree

.ci/scripts/setup-vulkan-macos-deps.sh

Lines changed: 0 additions & 63 deletions
This file was deleted.

.ci/scripts/wheel/pre_build_script.sh

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,37 +59,13 @@ fi
5959

6060
"${GITHUB_WORKSPACE}/${REPOSITORY}/install_requirements.sh" --example
6161

62-
setup_vulkan_for_vgf() {
63-
if [[ "$UNAME_S" == "Linux" && "$(uname -m)" == "x86_64" ]]; then
64-
source "${GITHUB_WORKSPACE}/${REPOSITORY}/.ci/scripts/setup-vulkan-linux-deps.sh"
65-
elif [[ "$UNAME_S" == "Darwin" ]]; then
66-
source "${GITHUB_WORKSPACE}/${REPOSITORY}/.ci/scripts/setup-vulkan-macos-deps.sh"
67-
fi
68-
69-
if ! command -v glslc >/dev/null 2>&1; then
70-
return 1
71-
fi
72-
73-
for _var in PATH VULKAN_SDK LD_LIBRARY_PATH DYLD_LIBRARY_PATH VK_ICD_FILENAMES VK_DRIVER_FILES ETVK_USING_SWIFTSHADER; do
74-
if [[ -n "${!_var:-}" ]]; then
75-
echo "${_var}=${!_var}" >> "${GITHUB_ENV}"
76-
fi
77-
done
78-
79-
return 0
80-
}
81-
8262
# Enable VGF in pybind wheel builds when the platform-specific build input is
8363
# available from pip.
8464
if [[ "$UNAME_S" == "Linux" || "$UNAME_S" == "Darwin" ]]; then
8565
if python3 -m pip install -r \
8666
"${GITHUB_WORKSPACE}/${REPOSITORY}/backends/arm/requirements-arm-vgf-runtime.txt"; then
87-
if setup_vulkan_for_vgf; then
88-
export EXECUTORCH_PYBIND_ENABLE_VGF=ON
89-
echo "EXECUTORCH_PYBIND_ENABLE_VGF=ON" >> "${GITHUB_ENV}"
90-
else
91-
echo "glslc unavailable after VGF build dependency install; building without VGF"
92-
fi
67+
export EXECUTORCH_PYBIND_ENABLE_VGF=ON
68+
echo "EXECUTORCH_PYBIND_ENABLE_VGF=ON" >> "${GITHUB_ENV}"
9369
else
9470
echo "VGF build dependency unavailable on this platform; building without VGF"
9571
fi

tools/cmake/preset/pybind.cmake

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ endif()
4141
# TODO(larryliu0820): Temporarily disable building llm_runner for Windows wheel
4242
# due to the issue of tokenizer file path length limitation.
4343
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
44-
# VGF depends on Vulkan in the pybind flow.
45-
set_overridable_option(
46-
EXECUTORCH_BUILD_VULKAN ${_executorch_pybind_enable_vgf}
47-
)
4844
set_overridable_option(EXECUTORCH_BUILD_VGF ${_executorch_pybind_enable_vgf})
4945
set_overridable_option(EXECUTORCH_BUILD_COREML ON)
5046
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TRAINING ON)
@@ -69,10 +65,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
6965
endif()
7066
endif()
7167
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
72-
# VGF depends on Vulkan in the pybind flow.
73-
set_overridable_option(
74-
EXECUTORCH_BUILD_VULKAN ${_executorch_pybind_enable_vgf}
75-
)
7668
set_overridable_option(EXECUTORCH_BUILD_VGF ${_executorch_pybind_enable_vgf})
7769
set_overridable_option(EXECUTORCH_BUILD_COREML ON)
7870
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TRAINING ON)

0 commit comments

Comments
 (0)