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

optimize version error, test=develop (#20715)

上级 66b2bf55
......@@ -146,7 +146,8 @@ bool AnalysisPredictor::PrepareProgram(
// So in both case, create persistable variables at first.
if (!CheckOperatorCompatible()) {
LOG(WARNING) << "WARNING: Results may be DIFF! "
"Using same versions between model and lib.";
"Please use the corresponding version of the model and "
"prediction library, and do not use the develop branch.";
}
executor_->CreateVariables(*inference_program_, 0, true, sub_scope_);
......@@ -858,8 +859,10 @@ bool AnalysisPredictor::CheckOperatorCompatible() {
auto compatible_type =
op_compatible_map_.IsRequireMiniVersion(type, version);
if (compatible_type != framework::OpCompatibleType::compatible) {
LOG(WARNING) << " - Version incompatible ("
<< static_cast<int>(compatible_type) << ") " << type;
if (!framework::kCurProgramVersion) {
LOG(WARNING) << " - Version incompatible ("
<< static_cast<int>(compatible_type) << ") " << type;
}
res = false;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册