Skip to content

Apple support/build instructions#47

Open
YannickLimmer wants to merge 3 commits intopatrick-kidger:masterfrom
YannickLimmer:master
Open

Apple support/build instructions#47
YannickLimmer wants to merge 3 commits intopatrick-kidger:masterfrom
YannickLimmer:master

Conversation

@YannickLimmer
Copy link

Hi, I figured out how to run the latest version of this package on MacOS. I thought I share this with you.

@patrick-kidger
Copy link
Owner

Great, thanks!

I think it should be possible to still require OpenMP, though. (We used to have Mac builds with OpenMP.) Either way I don't want to remove the ifndef statement. (And instead require users to modify the source code, as you're currently instructing.)

Could you add a disclaimer at the top that these are experimental/not-officially-supported instructions?

Also I don't think the business with site should be necessary - you should be able to clone anywhere.

@hans-riess
Copy link

Thanks for the instructions @patrick-kidger. I'm personally having some trouble still, but it could easily be just me!
torch=2.2.0.dev20231018
python=3.11.5
I'm running macOS Sonoma 14.2 on M1 Pro. If you have any further tips, greatly appreciated!

@jesuinovieira
Copy link

I ran into similar issues when building the PyTorch-2.x update branch on macOS (M3). I first tried the approach here (using LLVM and libomp); the package built successfully but failed at import, likely because it was compiled with LLVM’s libc++ while Python/torch use Apple’s toolchain.

After removing all OpenMP-related flags (-fopenmp, -lomp, -Xpreprocessor) and rebuilding with the default Apple clang, the extension compiled and imported correctly.

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

Successfully merging this pull request may close these issues.

4 participants