From 63e444645fbb4e5ac6452ad3e620fadd4549798f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Thu, 17 Sep 2020 14:59:43 +0800 Subject: [PATCH] [cherry-pick] fix building of xpu operators, test=develop (#4332) (#4350) * revert lite/utils/logging.h to bd4fd8d, test=develop * fix building of xpu operators, test=develop (#4332) --- lite/operators/__xpu__conv2d_op.cc | 2 +- lite/utils/logging.h | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lite/operators/__xpu__conv2d_op.cc b/lite/operators/__xpu__conv2d_op.cc index 8c3330f9e3..61d6177f96 100644 --- a/lite/operators/__xpu__conv2d_op.cc +++ b/lite/operators/__xpu__conv2d_op.cc @@ -133,7 +133,7 @@ bool XPUConv2dOp::AttachImpl(const cpp::OpDesc& op_desc, lite::Scope* scope) { scope->FindVar(op_desc.Output("OutputMax").front())->GetMutable(); param_.strides = op_desc.GetAttr>("strides"); - auto paddings = op_desc.GetAttr>("paddings"); + std::vector paddings = op_desc.GetAttr>("paddings"); auto dilations = op_desc.GetAttr>("dilations"); param_.dilations = std::make_shared>(dilations); param_.groups = op_desc.GetAttr("groups"); diff --git a/lite/utils/logging.h b/lite/utils/logging.h index 731ba7ad71..c7fa8d4cf1 100644 --- a/lite/utils/logging.h +++ b/lite/utils/logging.h @@ -189,9 +189,7 @@ class LogMessageFatal : public LogMessage { #ifndef LITE_ON_TINY_PUBLISH abort(); #else - // If we decide whether the process exits according to the NDEBUG macro - // definition, assert() can be used here. - abort(); + assert(false); #endif #endif } @@ -252,11 +250,7 @@ class VoidifyFatal : public Voidify { #ifdef LITE_WITH_EXCEPTION ~VoidifyFatal() noexcept(false) { throw std::exception(); } #else - ~VoidifyFatal() { - // If we decide whether the process exits according to the NDEBUG macro - // definition, assert() can be used here. - abort(); - } + ~VoidifyFatal() { assert(false); } #endif }; -- GitLab