Skip to content

Commit 760f413

Browse files
committed
Speed up unittest-buck by skipping ExecuTorch cmake builds
ghstack-source-id: 9017aa8 ghstack-comment-id: 2682906014 Pull Request resolved: #8688
1 parent fcb40f1 commit 760f413

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

.ci/scripts/unittest-linux.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,24 @@ 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+
# XXX: check whether this is sufficient to unbreak sccache
45+
PYTHON_EXECUTABLE=python \
46+
.ci/scripts/setup-linux.sh "$BUILD_TOOL" "$BUILD_MODE"
47+
4448
.ci/scripts/unittest-buck2.sh
4549
else
4650
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)