Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
2487951b
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2487951b
编写于
7月 16, 2018
作者:
X
Xin Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add draft design doc
上级
9c9e28b5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
81 addition
and
0 deletion
+81
-0
doc/fluid/design/ir/draft.md
doc/fluid/design/ir/draft.md
+81
-0
未找到文件。
doc/fluid/design/ir/draft.md
0 → 100644
浏览文件 @
2487951b
## Motivation
There is a
```gap```
between the
```Program```
defined by
user and the
```Executable```
that can be scheduled
efficiently on heterogeneous hardware, either locally
or distributedly.
Usually, the
```gap```
is bridged by
*
A serious transformations with defined order.
*
The transformations usually invovle
```
insert, delete, clustering, split, dependency analysis```.
* Has a simple way to verify and debug each transformation.
* Flexible to add, remove or customize transformations to fit
the requirements of various algorithms (models) and hardware secenarios.
Some other events also push us to a better unified pattern.
* The deep learning framework is built around the concepts of graphs.
To leverage tools such as compilation (e.g. TVM and nGraph) or
cross-framework conversion (e.g. ONNX), we also need a intermediate
representation that can be connected to the rest of the ecosystem.
We need a unified pattern to naturally support the requirements
described above. The pattern should fit both training, inference
and other offline serielized model transformations.
Learned from LLVM and other deep learning framework, we draft the
design below.
## Design
### Major Concepts
#### Node
```
Node
``` represents an operation that performs some computation or
a variable that is input or output of operation.
```
Node
```s are connected to other ```
Node
```s via inputs and outputs.
#### Graph
```
Graph
``` contains a list of ```
Node
```s.
TODO: Better definitions for the graph.
```
Graph
``` can also contain ```
Attribute
```s. ```
Attribute
```s
can be ``any`` thing. For example, it can be a list of "wraper"
nodes. The ```
wrapper
``` nodes compose ```
Node
```s and provide
helper method for execution. ```
Attribute
``` can also contain
other things that describe some properties of the ```
Graph
```.
#### Pass
```
Pass
``` represents a transformation of ```
Graph
```. Its input
is a ```
Graph
``` and its output is also a ```
Graph
```. For example,
a ```
Pass
``` can simply print out the ```
Graph
```. A ```
Pass
```
can also fuse some ```
Graph
```'s ```
Node
```s.
#### Optimize
```
Optimize
``` contains a series of ```
Pass
``` with defined order.
```
Optimize
``` transforms a ```
Graph
``` that only contains raw
modeling logic to a ```
Graph
```
that can be run efficiently while
maintaining the original modeling logic.
### Workflow
*
Program is first converted to Graph.
*
Graph goes through a series of Pass
*
Graph is transformed from raw model logic to a
form that is efficient to execute.
Graph->Pass1->Graph->Pass2->Graph->Pass3->Executor
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录