未验证 提交 921ca4f4 编写于 作者: X xsrobin 提交者: GitHub

Update refactorization.md (#1017)

上级 fd3e869b
......@@ -121,29 +121,28 @@ Compile Time -> IR -> Runtime
```
- Automatic Model Parallelism (planned for future)
---
## Operator/OpWithKernel/OpKernel
---
## Operator
### Operator
* `Operator` is the fundamental building block of the user interface.
* Operator stores input/output variable names and attributes.
* The `InferShape` interface is used to infer the shape of the output variables based on the shapes of the input variables.
* Use `Run` to compute the `output` variables from the `input` variables.
---
## OpWithKernel/Kernel
### OpWithKernel/Kernel
* `OpWithKernel` inherits `Operator`.
* `OpWithKernel` contains a Kernel map.
* `OpWithKernel::Run` get device's kernel, and invoke `OpKernel::Compute`.
* `OpKernelKey` is the map key. Only device place now, but may be data type later.
---
## Why separate Kernel and Operator
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册