Hacker News new | ask | show | jobs
by akhilcacharya 2524 days ago
They built in Python interop so that you can use numpy in TFSwift
3 comments

Bridges always have trolls under them.

If you don't see the troll, that doesn't mean it isn't there, it's just waiting for you to cross.

Doesn’t that introduce serious overhead compared to first class native arrays as in Julia or FORTRAN?
My impression is that this is to bootstrap adoption, there is a Swift-native TensorFlow package being developed also.
Bridging into NumPy isn’t going to be useful unless it covers some AD system too (XLA?).
XLA is a compiler for array code. It doesn't come with AD -- you need a wrapper like TF or JAX (or Swift, I guess) for that.
I was imagining the FFI emitting XLA code needed to implement the TF/JAX routines behind the scenes, but it's wild speculation.
Correct: you can call Python from Swift OR you can use AD but not both at the same time.