Skip to content

Commit

Permalink
Update refactorization.md (PaddlePaddle#1017)
Browse files Browse the repository at this point in the history
  • Loading branch information
xsrobin authored Jul 18, 2019
1 parent fd3e869 commit 921ca4f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions doc/fluid/design/motivation/refactorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 921ca4f

Please sign in to comment.