Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Mac wheels in CI #230

Merged
merged 17 commits into from
Oct 28, 2024
Merged

Build Mac wheels in CI #230

merged 17 commits into from
Oct 28, 2024

Conversation

scotts
Copy link
Contributor

@scotts scotts commented Sep 27, 2024

Note that this summary was written a month after opening the PR. As evidenced by the commit history below, getting this in shape has been a journey. A summary of the actual changes we'll commit:

  1. A separate workflow for compiling and testing Mac wheels. While it has a lot of overlap with the workflow for Linux wheels, there is still some specialization needed when building the wheel. In particular, we are actually still using the test-infra@macbuildwheel branch. Eventually that branch will get merged, and we can use main, just like with Linux. At that point, it will be worth seeing if we can consolidate the workflows and make Mac vs Linux a matrix option. (And maybe CUDA as well, see Add ability to build cuda wheels #272.)
  2. Minor changes to the Linux wheel workflow to keep it aligned with Mac wheels.
  3. Generalization of some of our packaging scripts to be aware of "Linux" versus "Darwin."
  4. The removal of logging calls (VLOG and LOG) from our C++ code. For reasons that we have not been able to fully explain, we get segfaults in those logging calls only when we ran from a Mac wheel. We do not segfault there when we build and test Mac from source, or in any situation with Linux. That might indicate a problem in PyTorch core. If we want logging back, we can decide how best to it then.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 27, 2024
@scotts scotts mentioned this pull request Sep 27, 2024
@scotts scotts force-pushed the mac_wheels_ci branch 5 times, most recently from 65d2476 to 10dd8ca Compare September 27, 2024 20:38
atalman pushed a commit to pytorch/test-infra that referenced this pull request Oct 1, 2024
This PR enable the build of M1 wheels to rely on `python -m build`
instead of `python setup.py`. The default is still `python setup.py`.
This is the same as #5071 and
#5076 that were landed for
linux wheels.

We need this for torchcodec to support M1 wheels
pytorch/torchcodec#230

CC @scotts @atalman
@scotts scotts force-pushed the mac_wheels_ci branch 9 times, most recently from 7ae2cc3 to 1032dd1 Compare October 3, 2024 03:29
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a ride. Thank you so much @scotts for pushing through!
Nothing blocking from me, just nits and one Q

packaging/check_glibcxx.py Outdated Show resolved Hide resolved
.github/workflows/macos_wheel.yaml Show resolved Hide resolved
.github/workflows/macos_wheel.yaml Show resolved Hide resolved
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a ride. Thank you so much @scotts for pushing through!
Nothing blocking from me, just nits and one Q

@scotts scotts force-pushed the mac_wheels_ci branch 4 times, most recently from cd96123 to b78a737 Compare October 23, 2024 16:03
@scotts scotts merged commit f932e07 into pytorch:main Oct 28, 2024
43 checks passed
@scotts scotts deleted the mac_wheels_ci branch October 28, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants