@@ -18,8 +18,8 @@ concurrency:
1818 cancel-in-progress : true
1919
2020jobs :
21- test-models-macos :
22- name : test-models-macos
21+ test-models-macos-cpu :
22+ name : test-models-macos-cpu
2323 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
2424 strategy :
2525 matrix :
5555 # Build and test executorch
5656 PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}"
5757
58+ test-models-macos-coreml :
59+ name : test-models-macos-coreml
60+ uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
61+ strategy :
62+ matrix :
63+ model : [dl3, edsr, efficient_sam, emformer_join, emformer_transcribe, ic3, mobilebert, mv3, resnet50, vit, w2l]
64+ backend : [coreml-test] # Just "coreml" tests AOT only. "coreml-test" tests both AOT and runtime.. Sigh...
65+ fail-fast : false
66+ with :
67+ runner : macos-m1-stable
68+ python-version : ' 3.11'
69+ submodules : ' recursive'
70+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
71+ timeout : 90
72+ script : |
73+ MODEL_NAME=${{ matrix.model }}
74+ BUILD_TOOL=cmake
75+ BACKEND=${{ matrix.backend }}
76+
77+ bash .ci/scripts/setup-conda.sh
78+ # Setup MacOS dependencies as there is no Docker support on MacOS atm
79+ PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
80+ # Build and test executorch
81+ PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}"
82+
5883 test-models-linux-aarch64 :
5984 name : test-models-linux-aarch64
6085 uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
@@ -567,8 +592,8 @@ jobs:
567592 PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
568593 PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh ${{ matrix.model }} "cmake" "qnn"
569594
570- test-apple-model :
571- name : test-apple-model
595+ test-models-macos-mps :
596+ name : test-models-macos-mps
572597 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
573598 strategy :
574599 fail-fast : false
@@ -585,16 +610,10 @@ jobs:
585610
586611 # Setup MacOS dependencies as there is no Docker support on MacOS atm
587612 PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
588- PYTHON_EXECUTABLE=python ${CONDA_RUN} bash backends/apple/coreml/scripts/install_requirements.sh
589- echo "Finishing installing coreml."
590613
591- # Build and test coreml model
614+ # Build and test models on mps
592615 MODELS=(mv3 ic4 resnet50 edsr mobilebert w2l)
593616 for MODEL_NAME in "${MODELS[@]}"; do
594- echo "::group::Exporting coreml model: $MODEL_NAME"
595- PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "coreml"
596- echo "::endgroup::"
597-
598617 echo "::group::Exporting mps model: $MODEL_NAME"
599618 PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "mps"
600619 echo "::endgroup::"
0 commit comments