From 109b4b2fe86c75975925c3227c2c3613f6eb1698 Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 6 Sep 2024 08:31:49 -0700 Subject: [PATCH 1/6] Create build-wheels-m1.yml --- .github/workflows/build-wheels-m1.yml | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/build-wheels-m1.yml diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml new file mode 100644 index 0000000000..df107f1f0e --- /dev/null +++ b/.github/workflows/build-wheels-m1.yml @@ -0,0 +1,52 @@ +name: Build M1 Wheels + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +permissions: + id-token: write + contents: read + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: macos-arm64 + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/ao + pre-script: packaging/pre_build_script.sh + post-script: packaging/post_build_script.sh + smoke-test-script: test/smoke_test.py + package-name: torchao + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + runner-type: macos-m1-stable + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} From 26f658287449acaeac7eb768bbaf6e82d911ba9e Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 6 Sep 2024 08:35:55 -0700 Subject: [PATCH 2/6] Update build-wheels-m1.yml --- .github/workflows/build-wheels-m1.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml index df107f1f0e..4dc6f96c52 100644 --- a/.github/workflows/build-wheels-m1.yml +++ b/.github/workflows/build-wheels-m1.yml @@ -33,7 +33,7 @@ jobs: include: - repository: pytorch/ao pre-script: packaging/pre_build_script.sh - post-script: packaging/post_build_script.sh + # post-script: packaging/post_build_script.sh smoke-test-script: test/smoke_test.py package-name: torchao name: ${{ matrix.repository }} @@ -45,7 +45,7 @@ jobs: test-infra-ref: main build-matrix: ${{ needs.generate-matrix.outputs.matrix }} pre-script: ${{ matrix.pre-script }} - post-script: ${{ matrix.post-script }} + # post-script: ${{ matrix.post-script }} package-name: ${{ matrix.package-name }} runner-type: macos-m1-stable smoke-test-script: ${{ matrix.smoke-test-script }} From b0283b15272f72eb58180075ab0e09bfd118608a Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 6 Sep 2024 08:48:34 -0700 Subject: [PATCH 3/6] Update build-wheels-m1.yml Co-authored-by: Eli Uriegas <1700823+seemethere@users.noreply.github.com> --- .github/workflows/build-wheels-m1.yml | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml index 4dc6f96c52..6a18ae8711 100644 --- a/.github/workflows/build-wheels-m1.yml +++ b/.github/workflows/build-wheels-m1.yml @@ -27,26 +27,13 @@ jobs: test-infra-ref: main build: needs: generate-matrix - strategy: - fail-fast: false - matrix: - include: - - repository: pytorch/ao - pre-script: packaging/pre_build_script.sh - # post-script: packaging/post_build_script.sh - smoke-test-script: test/smoke_test.py - package-name: torchao - name: ${{ matrix.repository }} + name: pytorch/ao uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main with: - repository: ${{ matrix.repository }} - ref: "" - test-infra-repository: pytorch/test-infra - test-infra-ref: main build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - pre-script: ${{ matrix.pre-script }} - # post-script: ${{ matrix.post-script }} - package-name: ${{ matrix.package-name }} + pre-script: packaging/pre_build_script.sh + # post-script: packaging/post_build_script.sh + package-name: torchao runner-type: macos-m1-stable - smoke-test-script: ${{ matrix.smoke-test-script }} + smoke-test-script: test/smoke_test.py trigger-event: ${{ github.event_name }} From 998df10e5c2935c325236a5aab242ee8ace88e32 Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 6 Sep 2024 08:48:42 -0700 Subject: [PATCH 4/6] Update build-wheels-m1.yml Co-authored-by: Eli Uriegas <1700823+seemethere@users.noreply.github.com> --- .github/workflows/build-wheels-m1.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml index 6a18ae8711..fdc55693a5 100644 --- a/.github/workflows/build-wheels-m1.yml +++ b/.github/workflows/build-wheels-m1.yml @@ -23,8 +23,6 @@ jobs: with: package-type: wheel os: macos-arm64 - test-infra-repository: pytorch/test-infra - test-infra-ref: main build: needs: generate-matrix name: pytorch/ao From c64849b0941476d4aca09c25e91206ef8621fdfe Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 6 Sep 2024 08:56:55 -0700 Subject: [PATCH 5/6] Update .github/workflows/build-wheels-m1.yml Co-authored-by: Eli Uriegas <1700823+seemethere@users.noreply.github.com> --- .github/workflows/build-wheels-m1.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml index fdc55693a5..8bef4c911a 100644 --- a/.github/workflows/build-wheels-m1.yml +++ b/.github/workflows/build-wheels-m1.yml @@ -28,6 +28,7 @@ jobs: name: pytorch/ao uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main with: + ref: ${{ github.head_ref || github.ref_name }} build-matrix: ${{ needs.generate-matrix.outputs.matrix }} pre-script: packaging/pre_build_script.sh # post-script: packaging/post_build_script.sh From b4dc903c52d002168f34e6abfdded7f3cce68419 Mon Sep 17 00:00:00 2001 From: Eli Uriegas <1700823+seemethere@users.noreply.github.com> Date: Fri, 6 Sep 2024 09:10:01 -0700 Subject: [PATCH 6/6] add repository argument --- .github/workflows/build-wheels-m1.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml index 8bef4c911a..49c9b8cf20 100644 --- a/.github/workflows/build-wheels-m1.yml +++ b/.github/workflows/build-wheels-m1.yml @@ -28,6 +28,7 @@ jobs: name: pytorch/ao uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main with: + repository: pytorch/ao ref: ${{ github.head_ref || github.ref_name }} build-matrix: ${{ needs.generate-matrix.outputs.matrix }} pre-script: packaging/pre_build_script.sh