Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Feature Request: Apple Silicon Support #565

Open
ifsheldon opened this issue Nov 16, 2020 · 4 comments
Open

Feature Request: Apple Silicon Support #565

ifsheldon opened this issue Nov 16, 2020 · 4 comments
Assignees

Comments

@ifsheldon
Copy link

As Apple begins to ship new Macbooks with Apple Silicon and Tensforflow was claimed to support Apple Silicon, I wonder whether Swift for Tensorflow will work on Apple Silicon-based Macs. Or, does it work with Rosseta2?

@RahulBhalley
Copy link
Contributor

RahulBhalley commented Nov 22, 2020

I hope Apple Silicon will help in focusing S4TF towards macOS and Xcode. It will be really awesome if we could simply add S4TF package in Xcode (without installing custom S4TF toolchain, of course after differentiation been baked into stable Swift toolchains) and use it with M chip series accelerated Macs. I think this is important because it helps in keeping the training algorithm private as opposed to cloud computing.

Maybe this is a dumb thought, but I was wondering how could Swift's differentiation (in compiler) could possibly take advantage of ML Compute (written in Metal). 🤔

@ifsheldon
Copy link
Author

@RahulBhalley You may want to take a look at the TF release by Apple, but Apple did not release the source code, which is not so friendly

@RahulBhalley
Copy link
Contributor

@ifsheldon yea, I've seen that.

@compnerd
Copy link
Contributor

There are a few different things being discussed here.

@RahulBhalley I think that supporting ASi is a completely different task from using stock toolchains. The work required for both is completely disjoint.

Use of acceleration in X10 is yet a separate item.

I'd rather not this issue become a tracker for wishlist items, but stay focused on the specifics to support ASi.

As to supporting ASi, I think that it should be possible to do that. I did take a stab at getting Swift building (a while ago) and found that there was a bunch of work to be done. After fixing things like libdispatch and the runtime, I got to the point where the swift compiler test suite was passing. However, the next stage requires building swift-apis. That in turn requires x10 where the problem lies. x10 has a dependency on tensorflow, which requires bazel, which requires the JVM which is not (or at least was not?) available. It should be possible to cross-compile now I believe, which was not possible when I had looked at it. Thanks to the use of CMake, I'd say that if we can get x10 built, the rest should be possible to get through.

The one thing to remember is that although ASi is similar to AArch64, it is merely derived from it, and is not identical. So, although it is possible to use items on ARM64 Linux, that does not immediately translate into ASi support.

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

No branches or pull requests

3 participants