diff --git a/doc/design/kernel_hint_design.md b/doc/design/kernel_hint_design.md index da4856bb6a0ebdf289708469bd41a88031b8f34a..a54b7da045e1a362626ef066f9ebb56af2c3181a 100644 --- a/doc/design/kernel_hint_design.md +++ b/doc/design/kernel_hint_design.md @@ -36,11 +36,11 @@ const std::string kUseCUDNN = "use_cudnn"; const std::string kUseMKLDNN = "use_mkldnn"; KernelType GetExpectedKernelType() { - if (Attr(kForceCPU)) { - return KernelType(CPUPlace, ...) - } else { - ... - } + if (Attr(kForceCPU)) { + return KernelType(CPUPlace, ...) + } else { + ... + } } ``` @@ -50,8 +50,8 @@ In Python code FORCE_CPU = core.kForceCPU() def xx_layer(..., force_cpu=false): - layer_helper = LayerHelper(...) - layer_helper.append_op( - type="xx", - attr={FORCE_CPU: force_cpu}) + layer_helper = LayerHelper(...) + layer_helper.append_op( + type="xx", + attr={FORCE_CPU: force_cpu}) ```