-
Notifications
You must be signed in to change notification settings - Fork 751
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
Arm64 Support For Pytorch? #1174
Comments
I'm sure there's some way to get that working, we just need to spend some time on it. As usual, contributions are welcome! |
Ok, so there's a smattering of resources out there referencing various builds for various ARM architectures:
|
There's no official guide, so we have to spend a bit of time modifying the build script... |
@frankfliu @zachgk @lanking520 How important are ARM builds for Amazon? @jxtps See discussion deepjavalibrary/djl#1550 for some context |
@saudet not sure for Amazon, but we do have some customers in DJL are looking for support on that. |
It looks like PyTorch is publishing ARM wheels and have been for some time: pytorch/pytorch#53357 If you search for "aarch64" on https://download.pytorch.org/whl/torch_stable.html it looks like recent versions are all there. Could whatever build scripts they're using to produce those wheels help here? |
DJL has already published AARCH64 for PyTorch: http://docs.djl.ai/engines/pytorch/pytorch-engine/index.html#for-aarch64-build |
Does that include GPU support, e.g. for use with the AWS G5g instance type? |
If it can cross compile, we can integrate that right away. |
Nevermind, now that I look closer at https://download.pytorch.org/whl/torch_stable.html they don't have anything cross-compiled for cuda (cu113, cu100 etc), it's all just for cpu. I take it that's not helpful here? |
The CUDA builds also compile the libraries for CPU, so we'll need to get that working first anyway. |
Ok, the main project for the build scripts appears to be: https://github.com/pytorch/builder Of particular relevance:
There are multiple scripts in there. From what I can tell |
Thanks! I'm not seeing anything about cross compiling for linux-arm64 though. They seem to be building everything on ARM hardware, just like DJL does, but unfortunately, I don't have the resources of Amazon and Facebook, like these guys do, to do builds on ARM hardware. |
You can try to use Mac OS docker build to build ARM64, or use ARM simulator to initiate docker build |
Yeah, we could try QEMU and what not, someone would have to try that stuff out...
|
I noticed that org.bytedeco CUDA now contains
cuda-11.6-8.3-1.5.7-linux-arm64-redist.jar
, so it sounds like you've compiled CUDA to run on arm64?Any chance of also compiling pytorch for arm64 (ideally both for CPU and GPU)?
That would enable using e.g. AWS G5g instances: https://aws.amazon.com/ec2/instance-types/g5g/
Thanks!
The text was updated successfully, but these errors were encountered: