Skip to content

Commit 8a1b0b9

Browse files
committed
Add arm64 size_test
1 parent 718aa6f commit 8a1b0b9

File tree

1 file changed

+9
-38
lines changed

1 file changed

+9
-38
lines changed

.github/workflows/pull.yml

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -333,52 +333,23 @@ jobs:
333333
# see if we can import the module successfully
334334
python -c "from executorch.extension.pybindings import portable_lib; print('success!')"
335335
336-
test-binary-size-linux-gcc:
337-
name: test-binary-size-linux-gcc
338-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
339-
permissions:
340-
id-token: write
341-
contents: read
342-
strategy:
343-
fail-fast: false
344-
with:
345-
runner: linux.2xlarge
346-
docker-image: executorch-ubuntu-22.04-gcc9
347-
submodules: 'true'
348-
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
349-
timeout: 90
350-
script: |
351-
# The generic Linux job chooses to use base env, not the one setup by the image
352-
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
353-
conda activate "${CONDA_ENV}"
354-
355-
# build module for executorch.extension.pybindings.portable_lib
356-
bash test/build_size_test.sh
357-
strip cmake-out/test/size_test
358-
output=$(ls -la cmake-out/test/size_test)
359-
arr=($output)
360-
size=${arr[4]}
361-
# threshold=48120 on devserver with gcc11.4
362-
# todo(lfq): update once binary size is below 50kb.
363-
threshold="51504"
364-
if [[ "$size" -le "$threshold" ]]; then
365-
echo "Success $size <= $threshold"
366-
else
367-
echo "Fail $size > $threshold"
368-
exit 1
369-
fi
370-
371336
test-binary-size-linux:
372337
name: test-binary-size-linux
373338
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
374339
permissions:
375340
id-token: write
376341
contents: read
377342
strategy:
343+
matrix:
344+
runner: [linux.2xlarge]
345+
docker-image: [executorch-ubuntu-22.04-gcc9, executorch-ubuntu-22.04-clang12]
346+
include:
347+
- runner: linux.arm64.2xlarge
348+
docker-image: executorch-ubuntu-22.04-gcc11-aarch64
378349
fail-fast: false
379350
with:
380-
runner: linux.2xlarge
381-
docker-image: executorch-ubuntu-22.04-clang12
351+
runner: ${{ matrix.runner }}
352+
docker-image: ${{ matrix.docker-image }}
382353
submodules: 'true'
383354
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
384355
timeout: 90
@@ -395,7 +366,7 @@ jobs:
395366
size=${arr[4]}
396367
# threshold=48120 on devserver with gcc11.4
397368
# todo(lfq): update once binary size is below 50kb.
398-
threshold="51784"
369+
threshold="51504"
399370
if [[ "$size" -le "$threshold" ]]; then
400371
echo "Success $size <= $threshold"
401372
else

0 commit comments

Comments
 (0)