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
Your website says "... contribute SWIG interfaces to your favorite language ...". It will be good if yo have pure implementations in other languages like JVM and .NET without having to use SWIG.
Reacted by Mark Fortner, Aaron Brooks, mttdbrd, Tarık Yılmaz, kevinwright, Vincent.Chan, Juber Patel, dentmaged, Max Fröhlich, Marcin Kowalczyk and 3 more
Since raw performance is one of the goals of this library I think that pure implementations don't make too much sense.
A prettier API on top of the generated interfaces would be nice though.
Although we may not pursue this ourselves, the internal formats used for communication (GraphDef, etc.) are all platform independent protobuf. Thus, it is possible to implement all or part of the tensorflow API in Java while preserving communication compatibility with the existing code. Since a Java version would likely be slower, one useful bit would be a pure inference layer that evaluates graphs but isn't necessarily able to build them; this would allow graphs built in Python and trained in Python / C++ on GPUs to be run from Java servers.
Is there a canonical / repeatable test suite, so language bindings can have a target and level of confidence? Is there a build server? Could there be a build server?
There's a testsuite with fairly good converge, but currently it's mostly Python with a few C++ tests. There's also a lot of functionality for building graphs that's currently Python only, in particular the automatic differentiation functionality, though that doesn't matter for evaluation of graphs in Java. There are plans to move this functionality into the underlying C++ in future, at which point Java SWIG bindings would be more useful for creating graphs.
If someone takes up the Java SWIG challenge, we'd be happy to accept it upstream pending review, etc., at which point it would be part of our continuous testing. The details of accepting contributions is in flux at the moment, but that will stabilize.
If you search for RegisterGradient in the python directory, you'll see all the places we define the gradients of various ops. The gradients are defined by Python code, so they aren't available from pure C++ as yet (we hope to change this at some point).
I don't fully grasp the architecture/order of operations, but could one populate the gradients using python, while still calling into the C++ code via a bridge?
Alternatively: Run the python code once to generate the gradients for every op, serialize all those gradients to a file, and then other runtimes can read them off and register them?
If all the functionality is not available in the C++ core then porting will be very difficult and some cases not possible (with respect to a fully functional version). Also I opened this: #476
Activity
sheepdreamofandroids commentedon Nov 9, 2015
Since raw performance is one of the goals of this library I think that pure implementations don't make too much sense.
A prettier API on top of the generated interfaces would be nice though.
girving commentedon Nov 9, 2015
Although we may not pursue this ourselves, the internal formats used for communication (
GraphDef, etc.) are all platform independent protobuf. Thus, it is possible to implement all or part of the tensorflow API in Java while preserving communication compatibility with the existing code. Since a Java version would likely be slower, one useful bit would be a pure inference layer that evaluates graphs but isn't necessarily able to build them; this would allow graphs built in Python and trained in Python / C++ on GPUs to be run from Java servers.edblackburn commentedon Nov 9, 2015
Is there a canonical / repeatable test suite, so language bindings can have a target and level of confidence? Is there a build server? Could there be a build server?
girving commentedon Nov 9, 2015
There's a testsuite with fairly good converge, but currently it's mostly Python with a few C++ tests. There's also a lot of functionality for building graphs that's currently Python only, in particular the automatic differentiation functionality, though that doesn't matter for evaluation of graphs in Java. There are plans to move this functionality into the underlying C++ in future, at which point Java SWIG bindings would be more useful for creating graphs.
If someone takes up the Java SWIG challenge, we'd be happy to accept it upstream pending review, etc., at which point it would be part of our continuous testing. The details of accepting contributions is in flux at the moment, but that will stabilize.
sirinath commentedon Nov 10, 2015
Also perhaps https://github.com/bytedeco/javacpp can be used to generate bindings.
kovasb commentedon Dec 10, 2015
@girving What aspect of automatic differentiation is not available from other languages? Is that just for defining new ops?
girving commentedon Dec 10, 2015
If you search for
RegisterGradientin the python directory, you'll see all the places we define the gradients of various ops. The gradients are defined by Python code, so they aren't available from pure C++ as yet (we hope to change this at some point).kovasb commentedon Dec 10, 2015
I don't fully grasp the architecture/order of operations, but could one populate the gradients using python, while still calling into the C++ code via a bridge?
Alternatively: Run the python code once to generate the gradients for every op, serialize all those gradients to a file, and then other runtimes can read them off and register them?
girving commentedon Dec 10, 2015
Both of those might work, but I don't know how much of a savings they are compared to doing it the right way and porting the code to C++.
kovasb commentedon Dec 10, 2015
I fully agree, just sounding out a temporary solution so I'm not blocked (I imagine it might be a while before all that code is ported)
sirinath commentedon Dec 11, 2015
If all the functionality is not available in the C++ core then porting will be very difficult and some cases not possible (with respect to a fully functional version). Also I opened this: #476
ieee8023 commentedon Jan 1, 2016
+1 for Java
Merge pull request tensorflow#3 from suryabhupa/master
120 remaining items
Fix crash on reentrant call to LRUCache::Clear().
Fix crash on reentrant call to LRUCache::Clear().
Fix crash on reentrant call to LRUCache::Clear().
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
Refactor SymbolicMap and SymbolicExpr parsing and printing
PR #38932: [xla:gpu] Add rendezvous before AND after first collective…
PR #38932: [xla:gpu] Add rendezvous before AND after first collective…
fix: address review — C++ spinlock fix, test decorator, import order