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

Compiling torch for MacOS 13 Ventura (M1) #99

Closed
cdmatters opened this issue Jan 12, 2023 · 7 comments
Closed

Compiling torch for MacOS 13 Ventura (M1) #99

cdmatters opened this issue Jan 12, 2023 · 7 comments

Comments

@cdmatters
Copy link

I'm trying to compile pytorch v.1.13.0 from source for MacOS (yes CPU only, which simplifies things) and we seem to get reaaally close before you hit something that looks pretty critical.
Screenshot 2023-01-12 at 20 23 08

Is there any chance you happen to have a branch of any modifications you made to pytorch to make it compile for your custom package index? Or does this require something a little more involved?

@cdmatters
Copy link
Author

Ah okay I have found your personal fork of pytorch with the nogil branch. I'll try here!

@colesbury
Copy link
Owner

Yeah, that’s the right branch. I haven’t built 1.13 or macOS wheels yet. I’d like to do so, but I won’t have time to look into it until next week.

@cdmatters
Copy link
Author

I'm actually happy with 1.9.0 but I seem to be setting segfaults building sleef

@cdmatters
Copy link
Author

cdmatters commented Jan 12, 2023

This is the error I'm encountering, dubiously no comment since 2021. The comment suggests cross compile should be fine, so maybe wheels will be alright...

@colesbury
Copy link
Owner

I'm looking into this now. I might end up building 1.13 wheels because I'm not sure 1.9.0 supports M1.

@colesbury
Copy link
Owner

I'm still working on building the wheels, but if you are feeling impatient you can try:

git clone https://github.com/colesbury/pytorch.git -b v1.13.1-nogil

And once you install the prerequisites, build it with:

BUILD_FUNCTORCH=0 python setup.py install

Functorch doesn't build right now because of changes to the bytecode format and PyCodeObject structure.

@colesbury
Copy link
Owner

I've uploaded PyTorch 1.13.1 wheels for macOS (x86-64 and arm64). Please let me know if you run into any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants