Skip to content

[Backend Tester] Run Core ML tests in nightly CI #13446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: gh/GregoryComer/129/head
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .ci/scripts/backend-test-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
set -eux

SUITE=$1
FLOW=$2
ARTIFACT_DIR=$3

echo "Running backend test job for suite $SUITE, flow $FLOW."
echo "Saving job artifacts to $ARTIFACT_DIR."

${CONDA_RUN} --no-capture-output pip install awscli==1.37.21

bash .ci/scripts/setup-conda.sh
eval "$(conda shell.bash hook)"

PYTHON_EXECUTABLE=python
${CONDA_RUN} --no-capture-output .ci/scripts/setup-macos.sh --build-tool cmake --build-mode Release

${CONDA_RUN} --no-capture-output python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report "$ARTIFACT_DIR/test_results.csv"
24 changes: 24 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,27 @@ jobs:
EXIT_CODE=0
.ci/scripts/backend-test-linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
echo "Test run complete with exit code $EXIT_CODE."

backend-test-macos:
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
strategy:
fail-fast: false
matrix:
flow: [coreml, coreml_static_int8]
suite: [models, operators]
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: macos-latest-xlarge
python-version: 3.12
submodules: recursive
timeout: 90
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
script: |
set -eux

# This is needed to get the prebuilt PyTorch wheel from S3
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21

EXIT_CODE=0
.ci/scripts/backend-test-macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
echo "Test run complete with exit code $EXIT_CODE."
Loading