Skip to content

Speed up unittest-buck by skipping ExecuTorch cmake builds #8688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .ci/scripts/unittest-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,26 @@ eval "$(conda shell.bash hook)"
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"

# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
source .ci/scripts/setup-vulkan-linux-deps.sh
if [[ "$BUILD_TOOL" == "cmake" ]]; then
# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
source .ci/scripts/setup-vulkan-linux-deps.sh

PYTHON_EXECUTABLE=python \
EXECUTORCH_BUILD_PYBIND=ON \
CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
.ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE"
PYTHON_EXECUTABLE=python \
EXECUTORCH_BUILD_PYBIND=ON \
CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
.ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE"

# Install llama3_2_vision dependencies.
PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh
# Install llama3_2_vision dependencies.
PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh

if [[ "$BUILD_TOOL" == "cmake" ]]; then
.ci/scripts/unittest-linux-cmake.sh
elif [[ "$BUILD_TOOL" == "buck2" ]]; then
# Removing this breaks sccache in the Buck build, apparently
# because TMPDIR gets messed up? Please feel free to fix this and
# speed up this CI job!
PYTHON_EXECUTABLE=python \
.ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE"

.ci/scripts/unittest-buck2.sh
else
echo "Unknown build tool $BUILD_TOOL"
Expand Down
22 changes: 11 additions & 11 deletions .ci/scripts/unittest-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ export TMP_DIR=$(mktemp -d)
export PATH="${TMP_DIR}:$PATH"
trap 'rm -rfv ${TMP_DIR}' EXIT

# Setup MacOS dependencies as there is no Docker support on MacOS atm
PYTHON_EXECUTABLE=python \
EXECUTORCH_BUILD_PYBIND=ON \
CMAKE_ARGS="-DEXECUTORCH_BUILD_COREML=ON -DEXECUTORCH_BUILD_MPS=ON -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
${CONDA_RUN} --no-capture-output \
.ci/scripts/setup-macos.sh "${BUILD_TOOL}" "${BUILD_MODE}"
if [[ "$BUILD_TOOL" == "cmake" ]]; then
# Setup MacOS dependencies as there is no Docker support on MacOS atm
PYTHON_EXECUTABLE=python \
EXECUTORCH_BUILD_PYBIND=ON \
CMAKE_ARGS="-DEXECUTORCH_BUILD_COREML=ON -DEXECUTORCH_BUILD_MPS=ON -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
${CONDA_RUN} --no-capture-output \
.ci/scripts/setup-macos.sh "${BUILD_TOOL}" "${BUILD_MODE}"

# Install llama3_2_vision dependencies.
PYTHON_EXECUTABLE=python \
${CONDA_RUN} --no-capture-output \
./examples/models/llama3_2_vision/install_requirements.sh
# Install llama3_2_vision dependencies.
PYTHON_EXECUTABLE=python \
${CONDA_RUN} --no-capture-output \
./examples/models/llama3_2_vision/install_requirements.sh

if [[ "$BUILD_TOOL" == "cmake" ]]; then
.ci/scripts/unittest-macos-cmake.sh
elif [[ "$BUILD_TOOL" == "buck2" ]]; then
.ci/scripts/unittest-buck2.sh
Expand Down
Loading