Skip to content

Commit 84273f4

Browse files
authored
Speed up unittest-buck by skipping ExecuTorch cmake builds (#8688)
1 parent 185a0af commit 84273f4

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

.ci/scripts/unittest-linux.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,26 @@ eval "$(conda shell.bash hook)"
2727
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
2828
conda activate "${CONDA_ENV}"
2929

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

33-
PYTHON_EXECUTABLE=python \
34-
EXECUTORCH_BUILD_PYBIND=ON \
35-
CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
36-
.ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE"
34+
PYTHON_EXECUTABLE=python \
35+
EXECUTORCH_BUILD_PYBIND=ON \
36+
CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
37+
.ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE"
3738

38-
# Install llama3_2_vision dependencies.
39-
PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh
39+
# Install llama3_2_vision dependencies.
40+
PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh
4041

41-
if [[ "$BUILD_TOOL" == "cmake" ]]; then
4242
.ci/scripts/unittest-linux-cmake.sh
4343
elif [[ "$BUILD_TOOL" == "buck2" ]]; then
44+
# Removing this breaks sccache in the Buck build, apparently
45+
# because TMPDIR gets messed up? Please feel free to fix this and
46+
# speed up this CI job!
47+
PYTHON_EXECUTABLE=python \
48+
.ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE"
49+
4450
.ci/scripts/unittest-buck2.sh
4551
else
4652
echo "Unknown build tool $BUILD_TOOL"

.ci/scripts/unittest-macos.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ export TMP_DIR=$(mktemp -d)
3030
export PATH="${TMP_DIR}:$PATH"
3131
trap 'rm -rfv ${TMP_DIR}' EXIT
3232

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

40-
# Install llama3_2_vision dependencies.
41-
PYTHON_EXECUTABLE=python \
42-
${CONDA_RUN} --no-capture-output \
43-
./examples/models/llama3_2_vision/install_requirements.sh
41+
# Install llama3_2_vision dependencies.
42+
PYTHON_EXECUTABLE=python \
43+
${CONDA_RUN} --no-capture-output \
44+
./examples/models/llama3_2_vision/install_requirements.sh
4445

45-
if [[ "$BUILD_TOOL" == "cmake" ]]; then
4646
.ci/scripts/unittest-macos-cmake.sh
4747
elif [[ "$BUILD_TOOL" == "buck2" ]]; then
4848
.ci/scripts/unittest-buck2.sh

0 commit comments

Comments
 (0)