Move x86 binaries builder to macos-12 to enable MPS build

Pull Request resolved: https://github.com/pytorch/pytorch/pull/77662

Approved by: https://github.com/seemethere
This commit is contained in:
Alban Desmaison 2022-05-18 10:58:20 -04:00 committed by PyTorch MergeBot
parent 8cacb199ba
commit fd121dfeec
4 changed files with 12 additions and 12 deletions

View File

@ -61,10 +61,10 @@ jobs:
{%- for config in build_configs %}
!{{ config["build_name"] }}-build:
if: ${{ github.repository_owner == 'pytorch' }}
{%- if cross_compile_arm64 %}
runs-on: macos-12
{%- else %}
{%- if config["package_type"] == "libtorch" %}
runs-on: macos-10.15
{%- else %}
runs-on: macos-12
{%- endif %}
{%- if config["package_type"] == "libtorch" %}
# libtorch builds take a long time on github hosted runners

View File

@ -37,7 +37,7 @@ concurrency:
jobs:
conda-py3_7-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -212,7 +212,7 @@ jobs:
docker system prune -af
conda-py3_8-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -387,7 +387,7 @@ jobs:
docker system prune -af
conda-py3_9-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -562,7 +562,7 @@ jobs:
docker system prune -af
conda-py3_10-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch

View File

@ -37,7 +37,7 @@ concurrency:
jobs:
wheel-py3_7-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -212,7 +212,7 @@ jobs:
docker system prune -af
wheel-py3_8-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -387,7 +387,7 @@ jobs:
docker system prune -af
wheel-py3_9-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch
@ -562,7 +562,7 @@ jobs:
docker system prune -af
wheel-py3_10-cpu-build:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: macos-10.15
runs-on: macos-12
timeout-minutes: 240
env:
PYTORCH_ROOT: ${{ github.workspace }}/pytorch

View File

@ -947,7 +947,7 @@ endif()
if(APPLE)
if(USE_MPS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_MPS -fno-objc-arc -framework Foundation -weak_framework MetalPerformanceShaders -weak_framework MetalPerformanceShadersGraph -weak_framework Metal")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_MPS -fno-objc-arc -weak_framework Foundation -weak_framework MetalPerformanceShaders -weak_framework MetalPerformanceShadersGraph -weak_framework Metal")
endif()
string(APPEND CMAKE_CXX_FLAGS " -Wno-unused-private-field")
string(APPEND CMAKE_CXX_FLAGS " -Wno-missing-braces")