forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.58 KB
/
mac-mps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Mac MPS
on:
push:
tags:
- ciflow/mps/*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
permissions: read-all
jobs:
macos-12-py3-arm64-build:
name: macos-12-py3-arm64
uses: ./.github/workflows/_mac-build.yml
with:
sync-tag: macos-12-py3-arm64-build
build-environment: macos-12-py3-arm64
runner-type: macos-m1-stable
build-generates-artifacts: true
# To match the one pre-installed in the m1 runners
python-version: 3.9.12
# We need to set the environment file here instead of trying to detect it automatically because
# MacOS arm64 is cross-compiled from x86-64. Specifically, it means that arm64 conda environment
# is needed when building PyTorch MacOS arm64 from x86-64
environment-file: .github/requirements/conda-env-macOS-ARM64
test-matrix: |
{ include: [
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-12" },
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m2-14" },
]}
macos-12-py3-arm64-mps-test:
name: macos-12-py3-arm64-mps
uses: ./.github/workflows/_mac-test-mps.yml
needs: macos-12-py3-arm64-build
with:
sync-tag: macos-12-py3-arm64-mps-test
build-environment: macos-12-py3-arm64
# Same as the build job
python-version: 3.9.12
test-matrix: ${{ needs.macos-12-py3-arm64-build.outputs.test-matrix }}