Migrating CI/CD jobs to macOS 14 (#127582)

We have half the fleet in MacoS 14 already and it has been running fine so far https://github.com/pytorch/pytorch/issues/127490.  So, I'm preparing the final push to replace the rest of them.  This also switches release build from 13 to 14 (GitHub runners)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127582
Approved by: https://github.com/atalman
This commit is contained in:
Huy Do 2024-05-31 22:30:59 +00:00 committed by PyTorch MergeBot
parent 02248b73eb
commit 57baae9c9b
9 changed files with 40 additions and 45 deletions

View File

@ -23,8 +23,6 @@ self-hosted-runner:
- macos-m1-stable - macos-m1-stable
- macos-m1-13 - macos-m1-13
- macos-m1-14 - macos-m1-14
- macos-12-xl
- macos-12
- macos12.3-m1
- macos-latest-xlarge - macos-latest-xlarge
- macos-13-xlarge - macos-13-xlarge
- macos-14-xlarge

View File

@ -60,7 +60,7 @@ class BinaryBuildWorkflow:
branches: str = "nightly" branches: str = "nightly"
# Mainly for macos # Mainly for macos
cross_compile_arm64: bool = False cross_compile_arm64: bool = False
macos_runner: str = "macos-12-xl" macos_runner: str = "macos-14-xlarge"
def __post_init__(self) -> None: def __post_init__(self) -> None:
if self.abi_version: if self.abi_version:
@ -285,7 +285,7 @@ MACOS_BINARY_BUILD_WORKFLOWS = [
libtorch_variants=["shared-with-deps"], libtorch_variants=["shared-with-deps"],
), ),
cross_compile_arm64=False, cross_compile_arm64=False,
macos_runner="macos-13-xlarge", macos_runner="macos-14-xlarge",
ciflow_config=CIFlowConfig( ciflow_config=CIFlowConfig(
labels={LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_LIBTORCH}, labels={LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_LIBTORCH},
isolated_workflow=True, isolated_workflow=True,
@ -298,7 +298,7 @@ MACOS_BINARY_BUILD_WORKFLOWS = [
OperatingSystem.MACOS_ARM64 OperatingSystem.MACOS_ARM64
), ),
cross_compile_arm64=False, cross_compile_arm64=False,
macos_runner="macos-13-xlarge", macos_runner="macos-14-xlarge",
ciflow_config=CIFlowConfig( ciflow_config=CIFlowConfig(
labels={LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_WHEEL}, labels={LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_WHEEL},
isolated_workflow=True, isolated_workflow=True,
@ -308,7 +308,7 @@ MACOS_BINARY_BUILD_WORKFLOWS = [
os=OperatingSystem.MACOS_ARM64, os=OperatingSystem.MACOS_ARM64,
package_type="conda", package_type="conda",
cross_compile_arm64=False, cross_compile_arm64=False,
macos_runner="macos-13-xlarge", macos_runner="macos-14-xlarge",
build_configs=generate_binary_build_matrix.generate_conda_matrix( build_configs=generate_binary_build_matrix.generate_conda_matrix(
OperatingSystem.MACOS_ARM64 OperatingSystem.MACOS_ARM64
), ),

View File

@ -49,7 +49,7 @@ jobs:
{ config: "default", { config: "default",
shard: 1, shard: 1,
num_shards: 1, num_shards: 1,
runner: "macos-13-xlarge", runner: "macos-14-xlarge",
ios_platform: "SIMULATOR", ios_platform: "SIMULATOR",
ios_arch: "arm64", ios_arch: "arm64",
use_lite_interpreter: ${{ inputs.use_lite_interpreter || 1 }}, use_lite_interpreter: ${{ inputs.use_lite_interpreter || 1 }},
@ -60,7 +60,7 @@ jobs:
{ config: "default", { config: "default",
shard: 1, shard: 1,
num_shards: 1, num_shards: 1,
runner: "macos-13-xlarge", runner: "macos-14-xlarge",
ios_platform: "OS", ios_platform: "OS",
ios_arch: "arm64", ios_arch: "arm64",
use_lite_interpreter: ${{ inputs.use_lite_interpreter || 1 }}, use_lite_interpreter: ${{ inputs.use_lite_interpreter || 1 }},

View File

@ -34,7 +34,7 @@ concurrency:
jobs: jobs:
conda-py3_8-cpu-build: conda-py3_8-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -152,7 +152,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
conda-py3_9-cpu-build: conda-py3_9-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -270,7 +270,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
conda-py3_10-cpu-build: conda-py3_10-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -388,7 +388,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
conda-py3_11-cpu-build: conda-py3_11-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -506,7 +506,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
conda-py3_12-cpu-build: conda-py3_12-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch

View File

@ -34,7 +34,7 @@ concurrency:
jobs: jobs:
libtorch-cpu-shared-with-deps-cxx11-abi-build: libtorch-cpu-shared-with-deps-cxx11-abi-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch

View File

@ -34,7 +34,7 @@ concurrency:
jobs: jobs:
wheel-py3_8-cpu-build: wheel-py3_8-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -153,7 +153,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
wheel-py3_9-cpu-build: wheel-py3_9-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -272,7 +272,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
wheel-py3_10-cpu-build: wheel-py3_10-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -391,7 +391,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
wheel-py3_11-cpu-build: wheel-py3_11-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -510,7 +510,7 @@ jobs:
uses: ./.github/workflows/_binary-upload.yml uses: ./.github/workflows/_binary-upload.yml
wheel-py3_12-cpu-build: wheel-py3_12-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }} if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-13-xlarge runs-on: macos-14-xlarge
timeout-minutes: 240 timeout-minutes: 240
env: env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch PYTORCH_ROOT: ${{ github.workspace }}/pytorch

View File

@ -13,29 +13,28 @@ concurrency:
permissions: read-all permissions: read-all
jobs: jobs:
macos-13-py3-arm64-build: macos-py3-arm64-build:
name: macos-13-py3-arm64 name: macos-py3-arm64
uses: ./.github/workflows/_mac-build.yml uses: ./.github/workflows/_mac-build.yml
with: with:
sync-tag: macos-py3-arm64-build sync-tag: macos-py3-arm64-build
build-environment: macos-13-py3-arm64 build-environment: macos-py3-arm64
runner-type: macos-m1-13 runner-type: macos-m1-stable
build-generates-artifacts: true build-generates-artifacts: true
# To match the one pre-installed in the m1 runners # To match the one pre-installed in the m1 runners
python-version: 3.9.12 python-version: 3.9.12
test-matrix: | test-matrix: |
{ include: [ { include: [
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-13" }, { config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-14" },
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m2-14" },
]} ]}
macos-py3-arm64-mps-test: macos-py3-arm64-mps-test:
name: macos-py3-arm64-mps name: macos-py3-arm64-mps
uses: ./.github/workflows/_mac-test-mps.yml uses: ./.github/workflows/_mac-test-mps.yml
needs: macos-13-py3-arm64-build needs: macos-py3-arm64-build
with: with:
sync-tag: macos-py3-arm64-mps-test sync-tag: macos-py3-arm64-mps-test
build-environment: macos-13-py3-arm64 build-environment: macos-py3-arm64
# Same as the build job # Same as the build job
python-version: 3.9.12 python-version: 3.9.12
test-matrix: ${{ needs.macos-13-py3-arm64-build.outputs.test-matrix }} test-matrix: ${{ needs.macos-py3-arm64-build.outputs.test-matrix }}

View File

@ -151,7 +151,7 @@ jobs:
{ config: "default", { config: "default",
shard: 1, shard: 1,
num_shards: 1, num_shards: 1,
runner: "macos-13-xlarge", runner: "macos-14-xlarge",
ios_platform: "SIMULATOR", ios_platform: "SIMULATOR",
ios_arch: "arm64", ios_arch: "arm64",
use_lite_interpreter: 1, use_lite_interpreter: 1,
@ -162,7 +162,7 @@ jobs:
{ config: "default", { config: "default",
shard: 1, shard: 1,
num_shards: 1, num_shards: 1,
runner: "macos-13-xlarge", runner: "macos-14-xlarge",
ios_platform: "OS", ios_platform: "OS",
ios_arch: "arm64", ios_arch: "arm64",
use_lite_interpreter: 1, use_lite_interpreter: 1,

View File

@ -143,13 +143,13 @@ jobs:
{ config: "default", shard: 1, num_shards: 1, runner: "linux.2xlarge" }, { config: "default", shard: 1, num_shards: 1, runner: "linux.2xlarge" },
]} ]}
macos-13-py3-arm64-build: macos-py3-arm64-build:
name: macos-13-py3-arm64 name: macos-py3-arm64
uses: ./.github/workflows/_mac-build.yml uses: ./.github/workflows/_mac-build.yml
with: with:
sync-tag: macos-py3-arm64-build sync-tag: macos-py3-arm64-build
build-environment: macos-13-py3-arm64 build-environment: macos-py3-arm64
runner-type: macos-m1-13 runner-type: macos-m1-stable
build-generates-artifacts: true build-generates-artifacts: true
# To match the one pre-installed in the m1 runners # To match the one pre-installed in the m1 runners
python-version: 3.9.12 python-version: 3.9.12
@ -163,31 +163,29 @@ jobs:
macos-py3-arm64-mps-test: macos-py3-arm64-mps-test:
name: macos-py3-arm64-mps name: macos-py3-arm64-mps
uses: ./.github/workflows/_mac-test-mps.yml uses: ./.github/workflows/_mac-test-mps.yml
needs: macos-13-py3-arm64-build needs: macos-py3-arm64-build
if: needs.macos-13-py3-arm64-build.outputs.build-outcome == 'success' if: needs.macos-py3-arm64-build.outputs.build-outcome == 'success'
with: with:
sync-tag: macos-py3-arm64-mps-test sync-tag: macos-py3-arm64-mps-test
build-environment: macos-13-py3-arm64 build-environment: macos-py3-arm64
# Same as the build job # Same as the build job
python-version: 3.9.12 python-version: 3.9.12
test-matrix: | test-matrix: |
{ include: [ { include: [
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-13" },
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-14" }, { config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-14" },
]} ]}
macos-13-py3-arm64-test: macos-py3-arm64-test:
name: macos-13-py3-arm64 name: macos-py3-arm64
uses: ./.github/workflows/_mac-test.yml uses: ./.github/workflows/_mac-test.yml
needs: needs:
- macos-13-py3-arm64-build - macos-py3-arm64-build
- target-determination - target-determination
with: with:
build-environment: macos-13-py3-arm64 build-environment: macos-py3-arm64
# Same as the build job # Same as the build job
python-version: 3.9.12 python-version: 3.9.12
test-matrix: ${{ needs.macos-13-py3-arm64-build.outputs.test-matrix }} test-matrix: ${{ needs.macos-py3-arm64-build.outputs.test-matrix }}
win-vs2019-cpu-py3-build: win-vs2019-cpu-py3-build:
name: win-vs2019-cpu-py3 name: win-vs2019-cpu-py3