From e2b1c5d925f3eccca028d90cf3f8853cb369c774 Mon Sep 17 00:00:00 2001 From: gongweibao Date: Sat, 30 Jun 2018 04:13:32 -0500 Subject: [PATCH] fix code style (#11862) --- paddle/fluid/platform/mkldnn_helper.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/platform/mkldnn_helper.h b/paddle/fluid/platform/mkldnn_helper.h index a6cccc31219..33fec2c1073 100644 --- a/paddle/fluid/platform/mkldnn_helper.h +++ b/paddle/fluid/platform/mkldnn_helper.h @@ -14,6 +14,7 @@ limitations under the License. */ #pragma once #include +#include #include #include "paddle/fluid/framework/operator.h" #include "paddle/fluid/platform/place.h" @@ -182,10 +183,11 @@ class MKLDNNHandler { } std::shared_ptr AcquireMemory( - mkldnn::memory::primitive_desc& mpd, - mkldnn::memory::primitive_desc& user_mpd, + mkldnn::memory::primitive_desc& mpd, // NOLINT + mkldnn::memory::primitive_desc& user_mpd, // NOLINT const std::shared_ptr user_memory_p, - const std::string& suffix, std::vector& pipeline) { + const std::string& suffix, + std::vector& pipeline) { // NOLINT // create reorder primitive if the input format is not the preferred one auto local_key = key_ + suffix; auto key_reorder_p = key_ + suffix + "reorder_p"; @@ -218,7 +220,7 @@ class MKLDNNHandler { return target_memory_p; } - static std::string GetHash(mkldnn::memory::dims& operand_dims, + static std::string GetHash(mkldnn::memory::dims& operand_dims, // NOLINT const std::string& suffix) { auto dims2str = [](const mkldnn::memory::dims& operand_dims) { std::string dstr = ""; @@ -227,6 +229,7 @@ class MKLDNNHandler { } return dstr; }; + return dims2str(operand_dims) + suffix; } -- GitLab