You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original e-mail:
I'd like to write Rust bindings for TensorFlow, and I had a few questions. First of all, is anyone already working on this, and if so, can I lend a hand? If not, is this something the TensorFlow team would be interested in? I assume that the TensorFlow team would not be willing to commit right now to supporting Rust, so I thought a separate open source project (with the option to fold into the main project later) would be the way to go.
Reacted by Soroush Mirzaei, Alexander Battisti, nbro and Mubelotix
Rust bindings would be cool! I don't think there's anyone working on rust bindings so far, though it might be worth an email to [email protected] to check. Agreed that a separate project is probably good to start out.
To start the conversation, there are a couple different levels of bindings:
Bindings that do not know about specific ops, but can create graphs "manually" or load them from GraphDefs, evaluate graphs (so that tensorflow models can be run inside rust servers), etc. There's hopefully nothing blocking that.
Autogenerated bindings for each C++ op. We do this for Python, and similar things should work for Rust (ideally with a lot more type safety). I have limited intuition for rust's handling of ad-hoc polymorphism, so I can't judge how easy it'll be to fit tensorflow's notions of polymorphism into rust's. Again, there's hopefully nothing blocking this.
Idiomatic bindings. We currently have a lot of logic in pure Python, including both per-op sugar and key features such as automatic differentiation. We will likely eventually move this to C++, but until then it will be difficult to capture this functionality in rust bindings without duplicating a ton of effort. Unfortunately, automatic differentiation in particular is (mostly) necessary if you want to train models.
It's probably best to shoot for (1) to start and only move to (2) once it's clear how much of (3) will be a blocker for the desired applications.
Activity
girving commentedon Dec 1, 2015
Moving email discussion here:
Rust bindings would be cool! I don't think there's anyone working on rust bindings so far, though it might be worth an email to [email protected] to check. Agreed that a separate project is probably good to start out.
To start the conversation, there are a couple different levels of bindings:
It's probably best to shoot for (1) to start and only move to (2) once it's clear how much of (3) will be a blocker for the desired applications.
ajtulloch commentedon Dec 4, 2015
FWIW, getting something like 1) is pretty straightforward with
rust-bindgenandtensor_c_api.h, I put something together the other weekend in https://github.com/ajtulloch/tensorflow-rs/blob/master/src/tf.rs if that's useful.thomasquintana commentedon Jan 27, 2016
I would be glad to work on a Rust interface for TensorFlow if nobody is currently working on a solution.
adamcrume commentedon Feb 5, 2016
I just launched a project to provide the Rust bindings at https://github.com/google/tensorflow-rust. The build glue is there, but most of the bindings have yet to be written.
girving commentedon Feb 5, 2016
Nice! I'm happy to help with any issues you run into.
jendap commentedon Feb 5, 2016
Cool!
asimshankar commentedon Oct 7, 2016
It seems that the Rust bindings are building on top of c_api.h using the approach outlined in the how-to, which is great.
If you run into concerns with the documentation or the C-API, please do create a separate issue
Thanks!
jhseu commentedon Nov 4, 2016
Closing this issue. The Rust bindings have been moved to github.com/tensorflow/rust
Merge pull request tensorflow#388 from ROCmSoftwarePlatform/develop-u…