-
Notifications
You must be signed in to change notification settings - Fork 316
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
tch-rs does not run on m1 mac #629
Comments
What's the error message you're running into? How did you install torch? I ended up symlinking the |
Could also check out this repository, pretty much exactly what I did and seems to be a fairly minimal environment setup. |
@chrisvander builds ok but when I tried running I got some linking errors. I think tch-rs downloads for mac but the version is not correct. I think it downloads for x86 but it needs ARM64 version which is provided by python3's pytorch. I used the same solution as your suggested repository. This is the script I created to help users to overcome. Unfortunately there is no way to set the variables by build.rs script. Instead I updated our build.rs to error out and let the users know to run the script. Also I updated our Cargo.toml to skip download for mac users. Hope this temporary workaround helps others too. I looking forward when this will be fixed in tch-rs. |
The Mac download at https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip contains only the Intel version. Maybe disable downloads on aarch64 and build from source instead? |
I made an environment in Conda and installed it that way. That version is aarch64. |
Thanks, I just made some changes to the torch-sys |
@LaurentMazare I tested your changes on Mac and I can confirm it panics as intended:
|
Great thanks a lot @antimora |
Linking a Torch's issue ticket here: pytorch/pytorch#96046 Someone requested "Add arm64 builds for libtorch on MacOS with mps support" |
Thanks for the python script antimora - that's what fixed the problem for me! |
I am getting error |
i got:
Indeed, I am experiencing a similar issue. Have you attempted to address the problems arising from colleagues' earlier writing? Solved by this: #629 (comment) |
tch-rs
does not run on m1 MacOS. To fix the problem I followed these steps adopted from https://github.com/ssoudan/tch-m1.The text was updated successfully, but these errors were encountered: