Once the tensor operations are desugared, a transformation we call “partitioning” extracts the graph operations from the program and builds a new SIL function to represent the tensor code. In addition to removing the tensor operations from the host code, new calls are injected that call into our new runtime library to start up TensorFlow, rendezvous to collect any results, and send/receive values between the host and the tensor program as it runs. The bulk of the Graph Program Extraction transformation itself lives in TFPartition.cpp.
Once the tensor function is formed, it has some transformations applied to it, and is eventually emitted to a TensorFlow graph using the code in TFLowerGraph.cpp. After the TensorFlow graph is formed, we serialize it to a protobuf and encode the bits directly into the executable, making it easy to load at program runtime.
Today, 1th of June Google brain team committed new code in public.
There are some interesting points:
1) High level APIs will be presented as a separate SwiftPM package under github.com/tensorflow.
High level APIs were added earlier purely to explore the programming model, not to be usable by anyone. Having high level APIs be part of the stdlib module conveys a wrong message for beta testers, and it has been confusing ever since our open source release.
2) Supporting Python code is one of priority:
Improved Python diagnostics related to member access.
Improved Python C API functions for binary arithmetic operations.
3) Improved cross-device sends and receives support.
4) Lots of work done around supporting generic @dynamicCallable methods.