Hey all it seems that Swift for Tensorflow is now in archive mode. Since the FastAI project builds on pytorch, would there be any interest in a Swift Torch based library?
There is a C++ api for pytorch
Additionally C++ interoperability with swift is currently in an in progress state.
Seems like the original rational behind using the swift language still hold valid, would people be interested in developing SwiftAI on top of the LibTorch C++ backend ?
TLDR
Is there interest for this?
Are there any reasons not to?
Have the reasons for adopting swift changed?
I suppose this partially depends on the future direction of FastAI + Swift.
The main interest in s4tf from fastai was the possible ability to write fast kernels in the host language. At this moment, the marginal benefits of native host language support for kernels do not offset the additional compiler infrastructure costs and the costs of filling the language ecosystem gaps. Even if the compiler tech was there, you could always meta-program it from python.
It’s a work in progress at this point, but I’ve enabled it to build on the newest Swift toolchain and jumped from TensorFlow 2.4 (where it left off) to the recent TensorFlow 2.8. Documentation of how to use it will come after I finish rewriting Swift-Colab.
It has a new home because Google officially rejected my (many) attempts to make PRs to their repositories:
For cross-platform GPU acceleration, I’m planning to cut and paste an entirely custom backend that replaces the C API of TensorFlow. That’s going to take more time than patching up existing bugs and writing documentation, so I don’t expect that to be out soon. Still, it’s the end goal.