未验证 提交 9359787d 编写于 作者: Y yiicy 提交者: GitHub

[cherry-pick] fix tiny_publish link error when open LOG, test=develop (#2976)

上级 28f6506d
...@@ -30,4 +30,3 @@ ...@@ -30,4 +30,3 @@
## 2.6 ## 2.6
[v2.6 project](https://github.com/PaddlePaddle/Paddle-Lite/milestones/v2.6) [v2.6 project](https://github.com/PaddlePaddle/Paddle-Lite/milestones/v2.6)
...@@ -796,7 +796,7 @@ void LoadModelNaiveFromFile(const std::string &filename, ...@@ -796,7 +796,7 @@ void LoadModelNaiveFromFile(const std::string &filename,
const uint64_t opt_version_length = 16 * sizeof(char); const uint64_t opt_version_length = 16 * sizeof(char);
ReadModelDataFromFile<char>( ReadModelDataFromFile<char>(
opt_version, prog_path, &offset, opt_version_length); opt_version, prog_path, &offset, opt_version_length);
VLOG(4) << "Opt_version:" << opt_version; VLOG(4) << "Opt_version:" << static_cast<const char *>(opt_version);
// check version, opt's version should be consistent with current Paddle-Lite // check version, opt's version should be consistent with current Paddle-Lite
// version. // version.
...@@ -806,7 +806,7 @@ void LoadModelNaiveFromFile(const std::string &filename, ...@@ -806,7 +806,7 @@ void LoadModelNaiveFromFile(const std::string &filename,
LOG(WARNING) << "warning: the version of opt that transformed this model " LOG(WARNING) << "warning: the version of opt that transformed this model "
"is not consistent with current Paddle-Lite version." "is not consistent with current Paddle-Lite version."
"\n version of opt:" "\n version of opt:"
<< opt_version << static_cast<const char *>(opt_version)
<< "\n version of current Paddle-Lite:" << paddle_version; << "\n version of current Paddle-Lite:" << paddle_version;
} }
...@@ -893,7 +893,7 @@ void LoadModelNaiveFromMemory(const std::string &model_buffer, ...@@ -893,7 +893,7 @@ void LoadModelNaiveFromMemory(const std::string &model_buffer,
const uint64_t paddle_version_length = 16 * sizeof(char); const uint64_t paddle_version_length = 16 * sizeof(char);
ReadModelDataFromBuffer<char>( ReadModelDataFromBuffer<char>(
opt_version, model_buffer, &offset, paddle_version_length); opt_version, model_buffer, &offset, paddle_version_length);
VLOG(4) << "Opt_version:" << opt_version; VLOG(4) << "Opt_version:" << static_cast<const char *>(opt_version);
// (3)get topo_size and topo_data // (3)get topo_size and topo_data
uint64_t topo_size; uint64_t topo_size;
......
...@@ -100,6 +100,12 @@ ostream& ostream::operator<<(const unsigned& obj) { ...@@ -100,6 +100,12 @@ ostream& ostream::operator<<(const unsigned& obj) {
return *this; return *this;
} }
template <>
ostream& ostream::operator<<(const uint16_t& obj) {
ADD_DATA_AS_STRING(data_, obj);
return *this;
}
template <> template <>
ostream& ostream::operator<<(const unsigned long& obj) { // NOLINT ostream& ostream::operator<<(const unsigned long& obj) { // NOLINT
ADD_DATA_AS_STRING(data_, obj); ADD_DATA_AS_STRING(data_, obj);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册