Migrate MacOs wheel binary builds to ephemeral M1 runners (#110432)

Surprisingly there are no speed difference between running the cross-compilation on `macos12-xl` (x86_64 12 core machine) and `macos-13-xlarge` (m1 6 core machine)

Most of the changes are on the https://github.com/pytorch/builder side:
- 50a6e91f97 skips installing mkl on M1 machines
- bbb29b0467 same for llvm-9
- 8bcc83dbb1 bumps minimal numpy version to 1.19 (as 1.17 is not available for m1)
- cc4f1f9055 skips building tests/distributed for M1
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110432
Approved by: https://github.com/kit1980
This commit is contained in:
Nikita Shulga
2023-10-03 17:31:28 +00:00
committed by PyTorch MergeBot
parent 7f0a659ccc
commit cd0e7d133b
7 changed files with 134 additions and 51 deletions

View File

@ -60,7 +60,7 @@ class BinaryBuildWorkflow:
branches: str = "nightly"
# Mainly for macos
cross_compile_arm64: bool = False
xcode_version: str = ""
macos_runner: str = "macos-12-xl"
def __post_init__(self) -> None:
if self.abi_version:
@ -307,7 +307,8 @@ MACOS_BINARY_BUILD_WORKFLOWS = [
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
OperatingSystem.MACOS_ARM64
),
cross_compile_arm64=True,
cross_compile_arm64=False,
macos_runner="macos-13-xlarge",
ciflow_config=CIFlowConfig(
labels={LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_WHEEL},
isolated_workflow=True,