TensorFlow 源码拆解

附录 · 源码索引与回查路径

按问题查 TensorFlow 源码的文件索引

按问题回查

如果你想知道先看再看
eager op 去哪里执行python/eager/execute.pycore/common_runtime/eager/、core/kernels/
tf.function 为什么 retracepython/eager/polymorphic_function/python/framework/func_graph.py、trace_type/
一个 op 为什么没有 GPU kernelcore/ops/core/framework/op_kernel.cc、后端 kernels
graph 节点怎么排队core/graph/graph.hcore/common_runtime/executor.cc
梯度从哪里来python/eager/backprop.pypython/ops/*_grad.py、concrete_function.py
Dataset 为什么变慢python/data/ops/core/data/、profiler
Keras fit 做了什么python/keras/engine/training.pydata_adapter.py、distribute/
分布式卡在哪里python/distribute/core/common_runtime/collective/、distributed_runtime/
XLA/MLIR 失败在哪compiler/mlir/compiler/xla/、Grappler
Lite 模型为什么不能 invokelite/core/interpreter_builder.hlite/core/subgraph.cc、lite/kernels/

一条命令看目录

find tensorflow -maxdepth 2 -type d | sort
rg -n 'REGISTER_OP|REGISTER_KERNEL_BUILDER' tensorflow/core
rg -n 'class Function|def function|class ConcreteFunction' tensorflow/python/eager
rg -n 'class Dataset|GetNext|MakeIterator' tensorflow/python/data tensorflow/core/data

上游源码链接

本项目只保留拆解文档与站点代码,不复制 TensorFlow 源码;源码版权和许可证归 TensorFlow 项目所有。

On this page