diff --git a/paddle/fluid/pybind/inference_api.cc b/paddle/fluid/pybind/inference_api.cc index 634013c4fac0431a76b6b5c794db8375eedafdd1..0f8305e3720382105602c2cdcb704b0bbc5e46f6 100644 --- a/paddle/fluid/pybind/inference_api.cc +++ b/paddle/fluid/pybind/inference_api.cc @@ -120,8 +120,7 @@ void BindMkldnnQuantizerConfig(py::module *m); #endif template -PaddleBuf PaddleBufCreate( - py::array_t data) { +PaddleBuf PaddleBufCreate(py::array_t data) { PaddleBuf buf(data.size() * sizeof(T)); std::copy_n(static_cast(data.data()), data.size(), @@ -130,9 +129,8 @@ PaddleBuf PaddleBufCreate( } template -void PaddleBufReset( - PaddleBuf &buf, // NOLINT - py::array_t data) { // NOLINT +void PaddleBufReset(PaddleBuf &buf, // NOLINT + py::array_t data) { // NOLINT buf.Resize(data.size() * sizeof(T)); std::copy_n(static_cast(data.data()), data.size(), @@ -141,7 +139,7 @@ void PaddleBufReset( template PaddleTensor PaddleTensorCreate( - py::array_t data, + py::array_t data, const std::string name = "", const std::vector> &lod = {}, bool copy = true) { @@ -208,9 +206,8 @@ py::array PaddleTensorGetData(PaddleTensor &tensor) { // NOLINT } template -void ZeroCopyTensorCreate( - ZeroCopyTensor &tensor, // NOLINT - py::array_t data) { +void ZeroCopyTensorCreate(ZeroCopyTensor &tensor, // NOLINT + py::array_t data) { std::vector shape; std::copy_n(data.shape(), data.ndim(), std::back_inserter(shape)); tensor.Reshape(std::move(shape));