Open msaroufim opened 3 months ago
seems like this can be done by creating a build_wheels_macos.yml
following this guide? https://github.com/pytorch/test-infra/wiki/Using-Nova-Reusable-Build-Workflows
It looks straight-forward enough, maybe I can make a PR for this. (Unless you want Meta people for CI stuff only)
You could give it a shot although not sure Nova has had non Meta people try it out - cc @atalman in case this is interesting
oh ya realize I might not be able to test it. Will try and see.
stuck at "Download artifact" step: https://github.com/gau-nernst/ao/actions/runs/9510166711/job/26214222390. Seems like due to some CI configs, since "Build Linux wheel" CI is also failing at this step in my fork.
I basically made a combination of torchvision CI (https://github.com/pytorch/vision/blob/main/.github/workflows/build-wheels-m1.yml) and our existing Linux wheel CI (https://github.com/pytorch/ao/blob/main/.github/workflows/build_wheels_linux.yml). Just paste it here for Meta people to take it from here (uncomment PYPI_API_TOKEN).
# From https://github.com/pytorch/test-infra/wiki/Using-Nova-Reusable-Build-Workflows
name: Build MacOS Wheels
on:
pull_request:
paths:
- build/packaging/**
- .github/workflows/build_wheels_m1.yml
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]+
schedule:
- cron: '0 0 * * *' # Runs at midnight UTC every day
workflow_dispatch:
jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: macos-arm64
build:
needs: generate-matrix
permissions:
id-token: write
contents: read
uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main
with:
# Set the ref to an empty string instead of the default nightly because
# torchao doesn't have nightly branch setup yet, instead the build is
# triggered daily from main with a schedule
repository: pytorch/ao
ref: ""
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
# env-var-script: packaging/env_var_script_linux.sh
pre-script: packaging/pre_build_script.sh
post-script: packaging/post_build_script.sh
smoke-test-script: packaging/smoke_test.py
package-name: torchao
trigger-event: ${{ github.event_name }}
runner-type: macos-m1-stable
# secrets:
# PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
Seems like it should work. The only thing that might break for MacOS is https://github.com/pytorch/ao/blob/main/packaging/post_build_script.sh since it looks Linux-specific.
Right now if I
pip install torchao
on my M1 laptop it'll install 0.1 binaries and not the latest release for 0.2Similarly if I try to install the nightly binaries I get a hard error