未验证 提交 b99986a3 编写于 作者: H hong19860320 提交者: GitHub

[Core] Fix stack overflow in STL::ostream (#3503)

上级 92e1142d
......@@ -161,6 +161,7 @@ std::set<TargetType> ExpandValidTargets(TargetType target) {
TARGET(kBM),
TARGET(kMLU),
TARGET(kAPU),
TARGET(kRKNPU),
TARGET(kFPGA)});
if (target == TARGET(kAny)) {
return valid_set;
......
......@@ -260,6 +260,9 @@ class KernelRegistry final {
KernelRegistryForTarget<TARGET(kRKNPU),
PRECISION(kAny),
DATALAYOUT(kAny)> *, //
KernelRegistryForTarget<TARGET(kRKNPU),
PRECISION(kAny),
DATALAYOUT(kNCHW)> *, //
KernelRegistryForTarget<TARGET(kRKNPU),
PRECISION(kFloat),
DATALAYOUT(kNCHW)> *, //
......
......@@ -40,9 +40,9 @@ void ostream::pad(const std::string& text) {
#ifdef LITE_SHUTDOWN_LOG
#define ADD_DATA_AS_STRING(data_, obj_)
#else
#define ADD_DATA_AS_STRING(data_, obj_) \
std::string text = paddle::lite::to_string(obj_); \
pad(text); \
#define ADD_DATA_AS_STRING(data_, obj_) \
std::string text = std::to_string(obj_); \
pad(text); \
data_ = data_ + text;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册