From bc7be2aa14d85b523f370386b780a921662f96ac Mon Sep 17 00:00:00 2001 From: qijun Date: Mon, 31 Jul 2017 11:12:12 +0000 Subject: [PATCH] pass precommit --- paddle/pybind/pybind.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/paddle/pybind/pybind.cc b/paddle/pybind/pybind.cc index 548277235e..f96540a064 100644 --- a/paddle/pybind/pybind.cc +++ b/paddle/pybind/pybind.cc @@ -159,19 +159,18 @@ All parameter, weight, gradient are variables in Paddle. .def_static("create", [](paddle::platform::CPUPlace& place) -> paddle::platform::DeviceContext* { - return new paddle::platform::CPUDeviceContext(); - }) + return new paddle::platform::CPUDeviceContext(); + }) .def_static( "create", [](paddle::platform::GPUPlace& place) -> paddle::platform::DeviceContext* { #ifdef PADDLE_ONLY_CPU - PADDLE_THROW("'GPUPlace' is not supported in CPU only device."); - + PADDLE_THROW("'GPUPlace' is not supported in CPU only device."); #else - return new paddle::platform::CUDADeviceContext(place); + return new paddle::platform::CUDADeviceContext(place); #endif - }); + }); py::class_(m, "GPUPlace").def(py::init()); -- GitLab