File tree Expand file tree Collapse file tree 8 files changed +40
-8
lines changed Expand file tree Collapse file tree 8 files changed +40
-8
lines changed Original file line number Diff line number Diff line change 22
22
# have already been installed, so we use PyTorch build from source here instead
23
23
# of nightly. This allows CI to test against latest commits from PyTorch
24
24
install_executorch " use-pt-pinned-commit"
25
- build_executorch_runner " ${BUILD_TOOL} "
25
+ build_executorch_runner " ${BUILD_TOOL} " " ${2 :- Release} "
26
26
27
27
if [[ " ${GITHUB_BASE_REF:- } " == * main* || " ${GITHUB_BASE_REF:- } " == * gh* ]]; then
28
28
do_not_use_nightly_on_ci
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ install_pytorch_and_domains
136
136
# We build PyTorch from source here instead of using nightly. This allows CI to test against
137
137
# the pinned commit from PyTorch
138
138
install_executorch " use-pt-pinned-commit"
139
- build_executorch_runner " ${BUILD_TOOL} "
139
+ build_executorch_runner " ${BUILD_TOOL} " " ${2 :- Release} "
140
140
141
141
if [[ " ${GITHUB_BASE_REF:- } " == * main* || " ${GITHUB_BASE_REF:- } " == * gh* ]]; then
142
142
do_not_use_nightly_on_ci
Original file line number Diff line number Diff line change 14
14
exit 1
15
15
fi
16
16
17
+ BUILD_MODE=$2
18
+ if [[ " ${BUILD_MODE:- } " =~ ^(Debug| Release)$ ]]; then
19
+ echo " Running tests in build mode ${BUILD_MODE} ..."
20
+ else
21
+ echo " Unsupported build mode ${BUILD_MODE} , options are Debug or Release."
22
+ exit 1
23
+ fi
24
+
17
25
# The generic Linux job chooses to use base env, not the one setup by the image
18
26
eval " $( conda shell.bash hook) "
19
27
CONDA_ENV=$( conda env list --json | jq -r " .envs | .[-1]" )
@@ -25,7 +33,7 @@ source .ci/scripts/setup-vulkan-linux-deps.sh
25
33
PYTHON_EXECUTABLE=python \
26
34
EXECUTORCH_BUILD_PYBIND=ON \
27
35
CMAKE_ARGS=" -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
28
- .ci/scripts/setup-linux.sh " $BUILD_TOOL "
36
+ .ci/scripts/setup-linux.sh " $BUILD_TOOL " " $BUILD_MODE "
29
37
30
38
# Install llama3_2_vision dependencies.
31
39
PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh
Original file line number Diff line number Diff line change 14
14
exit 1
15
15
fi
16
16
17
+ BUILD_MODE=$2
18
+ if [[ $BUILD_MODE =~ ^(Debug| Release)$ ]]; then
19
+ echo " Running tests in build mode ${BUILD_MODE} ..."
20
+ else
21
+ echo " Unsupported build mode ${BUILD_MODE} , options are Debug or Release."
22
+ exit 1
23
+ fi
24
+
17
25
bash .ci/scripts/setup-conda.sh
18
26
eval " $( conda shell.bash hook) "
19
27
@@ -27,7 +35,7 @@ PYTHON_EXECUTABLE=python \
27
35
EXECUTORCH_BUILD_PYBIND=ON \
28
36
CMAKE_ARGS=" -DEXECUTORCH_BUILD_COREML=ON -DEXECUTORCH_BUILD_MPS=ON -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
29
37
${CONDA_RUN} --no-capture-output \
30
- .ci/scripts/setup-macos.sh cmake
38
+ .ci/scripts/setup-macos.sh " ${BUILD_TOOL} " " ${BUILD_MODE} "
31
39
32
40
# Install llama3_2_vision dependencies.
33
41
PYTHON_EXECUTABLE=python ./examples/models/llama3_2_vision/install_requirements.sh
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ build_executorch_runner_cmake() {
109
109
pushd " ${CMAKE_OUTPUT_DIR} " || return
110
110
# This command uses buck2 to gather source files and buck2 could crash flakily
111
111
# on MacOS
112
- retry cmake -DPYTHON_EXECUTABLE=" ${PYTHON_EXECUTABLE} " -DCMAKE_BUILD_TYPE=Release ..
112
+ retry cmake -DPYTHON_EXECUTABLE=" ${PYTHON_EXECUTABLE} " -DCMAKE_BUILD_TYPE=" ${1 :- Release} " ..
113
113
popd || return
114
114
115
115
if [ " $( uname) " == " Darwin" ]; then
@@ -124,7 +124,7 @@ build_executorch_runner() {
124
124
if [[ $1 == " buck2" ]]; then
125
125
build_executorch_runner_buck2
126
126
elif [[ $1 == " cmake" ]]; then
127
- build_executorch_runner_cmake
127
+ build_executorch_runner_cmake " $2 "
128
128
else
129
129
echo " Invalid build tool $1 . Only buck2 and cmake are supported atm"
130
130
exit 1
Original file line number Diff line number Diff line change 7
7
required : true
8
8
type : string
9
9
description : Name of the docker image to use.
10
+ build-mode :
11
+ required : true
12
+ type : string
13
+ description : Build mode to use, Debug or Release.
10
14
build-tool :
11
15
required : true
12
16
type : string
30
34
timeout : 90
31
35
script : |
32
36
set -eux
33
- .ci/scripts/unittest-linux.sh "${{ inputs.build-tool }}"
37
+ .ci/scripts/unittest-linux.sh "${{ inputs.build-tool }}" "${{ inputs.build-mode }}"
34
38
35
39
macos :
36
40
uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
41
45
ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
42
46
script : |
43
47
set -eux
44
- .ci/scripts/unittest-macos.sh "${{ inputs.build-tool }}"
48
+ .ci/scripts/unittest-macos.sh "${{ inputs.build-tool }}" "${{ inputs.build-mode }}"
Original file line number Diff line number Diff line change @@ -367,6 +367,7 @@ jobs:
367
367
id-token : write
368
368
contents : read
369
369
with :
370
+ build-mode : Debug
370
371
build-tool : cmake
371
372
docker-image : executorch-ubuntu-22.04-clang12
372
373
@@ -376,6 +377,7 @@ jobs:
376
377
id-token : write
377
378
contents : read
378
379
with :
380
+ build-mode : Debug
379
381
build-tool : buck2
380
382
docker-image : executorch-ubuntu-22.04-clang12
381
383
Original file line number Diff line number Diff line change @@ -489,3 +489,13 @@ jobs:
489
489
PYTHON_EXECUTABLE=python bash examples/models/llama/install_requirements.sh
490
490
# Test llama2
491
491
PYTHON_EXECUTABLE=python bash .ci/scripts/test_llama.sh -model stories110M -build_tool "${BUILD_TOOL}" -mode "${MODE}" -dtype "${DTYPE}" -pt2e_quantize "${PT2E_QUANTIZE}"
492
+
493
+ unittest-release :
494
+ uses : ./.github/workflows/_unittest.yml
495
+ permissions :
496
+ id-token : write
497
+ contents : read
498
+ with :
499
+ build-mode : Release
500
+ build-tool : cmake
501
+ docker-image : executorch-ubuntu-22.04-clang12
You can’t perform that action at this time.
0 commit comments