@@ -371,53 +371,28 @@ jobs:
371371 # see if we can import the module successfully
372372 python -c "from executorch.extension.pybindings import portable_lib; print('success!')"
373373
374- test-binary-size-linux-gcc :
375- name : test-binary-size-linux-gcc
376- uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
377- permissions :
378- id-token : write
379- contents : read
380- strategy :
381- fail-fast : false
382- with :
383- runner : linux.2xlarge
384- docker-image : executorch-ubuntu-22.04-gcc9
385- submodules : ' true'
386- ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
387- timeout : 90
388- script : |
389- # The generic Linux job chooses to use base env, not the one setup by the image
390- CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
391- conda activate "${CONDA_ENV}"
392-
393- ./install_requirements.sh --use-pt-pinned-commit
394- # build module for executorch.extension.pybindings.portable_lib
395- bash test/build_size_test.sh
396- strip cmake-out/test/size_test
397- output=$(ls -la cmake-out/test/size_test)
398- arr=($output)
399- size=${arr[4]}
400- # threshold=48120 on devserver with gcc11.4
401- # todo(lfq): update once binary size is below 50kb.
402- threshold="51504"
403- if [[ "$size" -le "$threshold" ]]; then
404- echo "Success $size <= $threshold"
405- else
406- echo "Fail $size > $threshold"
407- exit 1
408- fi
409-
410374 test-binary-size-linux :
411375 name : test-binary-size-linux
412376 uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
413377 permissions :
414378 id-token : write
415379 contents : read
416380 strategy :
381+ matrix :
382+ include :
383+ - runner : linux.2xlarge
384+ docker-image : executorch-ubuntu-22.04-gcc9
385+ threshold : 51504
386+ - runner : linux.2xlarge
387+ docker-image : executorch-ubuntu-22.04-clang12
388+ threshold : 51784
389+ - runner : linux.arm64.2xlarge
390+ docker-image : executorch-ubuntu-22.04-gcc11-aarch64
391+ threshold : 51784
417392 fail-fast : false
418393 with :
419- runner : linux.2xlarge
420- docker-image : executorch-ubuntu-22.04-clang12
394+ runner : ${{ matrix.runner }}
395+ docker-image : ${{ matrix.docker-image }}
421396 submodules : ' true'
422397 ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
423398 timeout : 90
@@ -427,16 +402,13 @@ jobs:
427402 conda activate "${CONDA_ENV}"
428403
429404 ./install_requirements.sh --use-pt-pinned-commit
430-
431405 # build module for executorch.extension.pybindings.portable_lib
432406 bash test/build_size_test.sh
433407 strip cmake-out/test/size_test
434408 output=$(ls -la cmake-out/test/size_test)
435409 arr=($output)
436410 size=${arr[4]}
437- # threshold=48120 on devserver with gcc11.4
438- # todo(lfq): update once binary size is below 50kb.
439- threshold="51784"
411+ threshold= "${{ matrix.threshold }}"
440412 if [[ "$size" -le "$threshold" ]]; then
441413 echo "Success $size <= $threshold"
442414 else
0 commit comments