未验证 提交 63e44464 编写于 作者: 石晓伟 提交者: GitHub

[cherry-pick] fix building of xpu operators, test=develop (#4332) (#4350)

* revert lite/utils/logging.h to bd4fd8d3, test=develop

* fix building of xpu operators, test=develop (#4332)
上级 784f75fa
...@@ -133,7 +133,7 @@ bool XPUConv2dOp::AttachImpl(const cpp::OpDesc& op_desc, lite::Scope* scope) { ...@@ -133,7 +133,7 @@ bool XPUConv2dOp::AttachImpl(const cpp::OpDesc& op_desc, lite::Scope* scope) {
scope->FindVar(op_desc.Output("OutputMax").front())->GetMutable<Tensor>(); scope->FindVar(op_desc.Output("OutputMax").front())->GetMutable<Tensor>();
param_.strides = op_desc.GetAttr<std::vector<int>>("strides"); param_.strides = op_desc.GetAttr<std::vector<int>>("strides");
auto paddings = op_desc.GetAttr<std::vector<int>>("paddings"); std::vector<int> paddings = op_desc.GetAttr<std::vector<int>>("paddings");
auto dilations = op_desc.GetAttr<std::vector<int>>("dilations"); auto dilations = op_desc.GetAttr<std::vector<int>>("dilations");
param_.dilations = std::make_shared<std::vector<int>>(dilations); param_.dilations = std::make_shared<std::vector<int>>(dilations);
param_.groups = op_desc.GetAttr<int>("groups"); param_.groups = op_desc.GetAttr<int>("groups");
......
...@@ -189,9 +189,7 @@ class LogMessageFatal : public LogMessage { ...@@ -189,9 +189,7 @@ class LogMessageFatal : public LogMessage {
#ifndef LITE_ON_TINY_PUBLISH #ifndef LITE_ON_TINY_PUBLISH
abort(); abort();
#else #else
// If we decide whether the process exits according to the NDEBUG macro assert(false);
// definition, assert() can be used here.
abort();
#endif #endif
#endif #endif
} }
...@@ -252,11 +250,7 @@ class VoidifyFatal : public Voidify { ...@@ -252,11 +250,7 @@ class VoidifyFatal : public Voidify {
#ifdef LITE_WITH_EXCEPTION #ifdef LITE_WITH_EXCEPTION
~VoidifyFatal() noexcept(false) { throw std::exception(); } ~VoidifyFatal() noexcept(false) { throw std::exception(); }
#else #else
~VoidifyFatal() { ~VoidifyFatal() { assert(false); }
// If we decide whether the process exits according to the NDEBUG macro
// definition, assert() can be used here.
abort();
}
#endif #endif
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册