diff --git a/paddle/fluid/inference/api/analysis_predictor.cc b/paddle/fluid/inference/api/analysis_predictor.cc index 42209d9b0c317f406e77f4b4553ad0f3d07a929e..8ede06aec5304498acb13236fd0968b7f13027fc 100644 --- a/paddle/fluid/inference/api/analysis_predictor.cc +++ b/paddle/fluid/inference/api/analysis_predictor.cc @@ -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(compatible_type) << ") " << type; + if (!framework::kCurProgramVersion) { + LOG(WARNING) << " - Version incompatible (" + << static_cast(compatible_type) << ") " << type; + } res = false; } }