@@ -370,53 +370,29 @@ jobs:
370370 PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool "${BUILD_TOOL}"
371371 PYTHON_EXECUTABLE=python bash examples/xnnpack/quantization/test_quantize.sh "${BUILD_TOOL}" mv2
372372
373- test-binary-size-linux-gcc :
374- name : test-binary-size-linux-gcc
375- uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
376- permissions :
377- id-token : write
378- contents : read
379- strategy :
380- fail-fast : false
381- with :
382- runner : linux.2xlarge
383- docker-image : ci-image:executorch-ubuntu-22.04-gcc9
384- submodules : ' recursive'
385- ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
386- timeout : 90
387- script : |
388- # The generic Linux job chooses to use base env, not the one setup by the image
389- CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
390- conda activate "${CONDA_ENV}"
391-
392- ./install_requirements.sh --use-pt-pinned-commit
393- # build module for executorch.extension.pybindings.portable_lib
394- bash test/build_size_test.sh
395- strip cmake-out/test/size_test
396- output=$(ls -la cmake-out/test/size_test)
397- arr=($output)
398- size=${arr[4]}
399- # threshold=48120 on devserver with gcc11.4
400- # todo(lfq): update once binary size is below 50kb.
401- threshold="63776"
402- if [[ "$size" -le "$threshold" ]]; then
403- echo "Success $size <= $threshold"
404- else
405- echo "Fail $size > $threshold"
406- exit 1
407- fi
408-
409373 test-binary-size-linux :
410374 name : test-binary-size-linux
411375 uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
412376 permissions :
413377 id-token : write
414378 contents : read
415379 strategy :
380+ matrix :
381+ include :
382+ - runner : linux.2xlarge
383+ docker-image : ci-image:executorch-ubuntu-22.04-gcc9
384+ threshold : 51504
385+ - runner : linux.2xlarge
386+ docker-image : ci-image:executorch-ubuntu-22.04-clang12
387+ threshold : 51784
388+ - runner : linux.arm64.2xlarge
389+ docker-image : ci-image:executorch-ubuntu-22.04-gcc11-aarch64
390+ threshold : 51784
416391 fail-fast : false
392+
417393 with :
418- runner : linux.2xlarge
419- docker-image : ci-image:executorch-ubuntu-22.04-clang12
394+ runner : ${{ matrix.runner }}
395+ docker-image : ${{ matrix.docker-image }}
420396 submodules : ' recursive'
421397 ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
422398 timeout : 90
@@ -426,14 +402,13 @@ jobs:
426402 conda activate "${CONDA_ENV}"
427403
428404 ./install_requirements.sh --use-pt-pinned-commit
429-
430405 # build module for executorch.extension.pybindings.portable_lib
431406 bash test/build_size_test.sh
432407 strip cmake-out/test/size_test
433408 output=$(ls -la cmake-out/test/size_test)
434409 arr=($output)
435410 size=${arr[4]}
436- threshold="51752 "
411+ threshold="${{ matrix.threshold }} "
437412 if [[ "$size" -le "$threshold" ]]; then
438413 echo "Success $size <= $threshold"
439414 else
0 commit comments