Giter Site home page Giter Site logo

gottingen / tf-reading Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 68.01 MB

tensorflow code reading

License: Apache License 2.0

Starlark 2.90% Batchfile 0.03% Python 25.72% C++ 61.85% C 0.68% Shell 0.43% CMake 0.07% MLIR 3.21% Jupyter Notebook 0.56% Cython 0.01% LLVM 0.01% Smarty 0.03% HTML 2.70% SourcePawn 0.01% Go 1.16% Java 0.56% Perl 0.01% Vim Snippet 0.01% Pawn 0.01% Objective-C 0.09%
tensorflow2 xla llvm-ir tensorflow

tf-reading's Introduction

tensorflow reading code

tensorflow README.md

base on tensorflow 2.6.2 source

架构

TensorFlow 模块化和分层设计十分精良,具体模块和层层如下:

整个框架以C API为界,分为前端和后端两大部分。

  • 前端:提供编程模型,多语言的接口支持,比如Python Java C++等。通过C API建立前后端的连接,后面详细讲解。

  • 后端:提供运行环境,完成计算图的执行。进一步分为4层

    • 运行时:分为分布式运行时和本地运行时,负责计算图的接收,构造,编排等。
    • 计算层:提供各op算子的内核实现,例如conv2d, relu等
    • 通信层:实现组件间数据通信,基于GRPC和RDMA两种通信方式
    • 设备层:提供多种异构设备的支持,如CPU GPU TPU FPGA等

源码

tensorflow

third_party

阅读

源码目录

目录 功能
tensorflow/c C API代码
tensorflow/cc C++ API代码
tensorflow/compiler XLA,JIT等编译优化相关
tensorflow/core tf核心代码
tensorflow/examples 例子相关代码
tensorflow/go go API相关代码
tensorflow/java java API相关代码
tensorflow/python Python API相关代码
tensorflow/stream_executor 并行计算框架代码
tensorflow/tools 各种辅助工具工程代码,例如第二章中生成Python安装包的代码就在这里
tensorflow/user_ops tf插件代码
third_party/ 依赖的第三方代码
tools 工程编译配置相关
tensorflow/docs_src 文档相关文件
tensorflow/contrib

tensorflow/core

目录 功能
tensorflow/core/common_runtime 公共运行库
tensorflow/core/debug 调试相关
tensorflow/core/distributed_runtime 分布式运行模块
tensorflow/core/example 例子代码
tensorflow/core/framework 基础功能模块
tensorflow/core/graph 计算图相关
tensorflow/core/grappler 模型优化模块
tensorflow/core/kernels 操作核心的实现代码,包括CPU和GPU上的实现
tensorflow/core/lib 公共基础库
tensorflow/core/ops 操作代码
tensorflow/core/platform 平台实现相关代码
tensorflow/core/protobuf .proto定义文件
tensorflow/core/public API头文件

framwork

common runtime 本地运行时

技术议题

版本变化

编译优化

模型优化

llvm ir

mpi

机器编译

tf-reading's People

Contributors

lilothar avatar tiger631 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kuaikuai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.