分布式tensorflow源码

Distributed tensorflow source code

想查看一下tensorflow分布式训练特性的源码和整体结构。 Worker-PS 关系等。但是我迷失在 tensorflow 的存储库中。有人可以指导我浏览存储库并指出我正在寻找的源代码吗?

遗憾的是,并不是所有的tensorflow代码(尤其是与分布式计算相关的部分)都是开源的。引用来自 Hands-On Machine Learning with Scikit-Learn and TensorFlow 的 Aurélien Géron:

The TensorFlow whitepaper presents a friendly dynamic placer algorithm that auto-magically distributes operations across all available devices, taking into account things like the measured computation time in previous runs of the graph, estimations of the size of the input and output tensors to each operation, the amount of RAM available in each device, communication delay when transferring data in and out of devices, hints and constraints from the user, and more. Unfortunately, this sophisticated algorithm is internal to Google; it was not released in the open source version of TensorFlow.

但这里是 public 仓库中 TF distributed 的主要入口点:

要深入研究,您需要在 tensorflow/core/distributed_runtime package, e.g., here's gRPC server implementation.

中输入本机 C++ 代码