diff --git a/doc/fluid/design/motivation/refactorization.md b/doc/fluid/design/motivation/refactorization.md index 10c9dd02ad622201c9e3f4aa1a45d33941259ae1..e393a6e3d69e11ca674d6b92101b39e4a1d1459d 100644 --- a/doc/fluid/design/motivation/refactorization.md +++ b/doc/fluid/design/motivation/refactorization.md @@ -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