PaddlePaddle/Paddle-Inference-Demo

用最新的develop分支,执行c++ -> cpu -> yoloV3样例报错

Opened this issue · 2 comments

以下是配置项:
image

以下是错误堆栈:
image

文字信息:
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1130 22:23:30.442376 14563 analysis_predictor.cc:2142] MKLDNN is enabled
I1130 22:23:30.442462 14563 analysis_predictor.cc:2259] Ir optimization is turned off, no ir pass will be executed.
--- Running analysis [ir_graph_build_pass]
I1130 22:23:30.449360 14563 executor.cc:183] Old Executor is Running.
--- Running analysis [ir_analysis_pass]
--- Running analysis [ir_params_sync_among_devices_pass]
--- Running analysis [adjust_cudnn_workspace_size_pass]
--- Running analysis [inference_op_replace_pass]
--- Running analysis [save_optimized_model_pass]
--- Running analysis [ir_graph_to_program_pass]
I1130 22:23:30.606269 14563 analysis_predictor.cc:2348] ======= ir optimization completed =======
terminate called after throwing an instance of 'common::enforce::EnforceNotMet'
what():


C++ Traceback (most recent call last):

0 paddle_infer::CreatePredictor(paddle::AnalysisConfig const&)
1 paddle_infer::Predictor::Predictor(paddle::AnalysisConfig const&)
2 std::unique_ptr<paddle::PaddlePredictor, std::default_deletepaddle::PaddlePredictor > paddle::CreatePaddlePredictor<paddle::AnalysisConfig, (paddle::PaddleEngineKind)2>(paddle::AnalysisConfig const&)
3 paddle::AnalysisPredictor::Init(std::shared_ptrpaddle::framework::Scope const&, std::shared_ptrpaddle::framework::ProgramDesc const&)
4 paddle::AnalysisPredictor::PrepareProgram(std::shared_ptrpaddle::framework::ProgramDesc const&)
5 paddle::TranslateLegacyProgramToProgram(paddle::framework::ProgramDesc const&)
6 paddle::translator::ProgramTranslator::Translate()
7 paddle::translator::ProgramTranslator::TranslateBlock(paddle::framework::BlockDesc const&, unsigned long, unsigned long, paddle::translator::TranslationContext*, pir::Block*)
8 paddle::translator::ProgramTranslator::TranslateGeneralOperation(paddle::framework::OpDesc const*, paddle::translator::TranslationContext*, pir::Block*)
9 paddle::translator::OpTranscriber::operator()(pir::IrContext*, paddle::translator::TranslationContext*, paddle::framework::OpDesc const&, pir::Block*)
10 pir::Operation::Create(std::vector<pir::Value, std::allocatorpir::Value > const&, std::unordered_map<std::string, pir::Attribute, std::hash<std::string >, std::equal_to<std::string >, std::allocator<std::pair<std::string const, pir::Attribute> > > const&, std::vector<pir::Type, std::allocatorpir::Type > const&, pir::OpInfo, unsigned long, std::vector<pir::Block*, std::allocatorpir::Block* > const&, bool)
11 pir::Op<paddle::dialect::YoloBoxOp, paddle::dialect::InferMetaInterface, pir::InferSymbolicShapeInterface, paddle::dialect::OpYamlInfoInterface, paddle::dialect::GetKernelTypeForVarInterface>::VerifySigInvariants(pir::Operation*)
12 paddle::dialect::YoloBoxOp::VerifySig()
13 common::enforce::GetCurrentTraceBackStringabi:cxx11


Error Message Summary:

InvalidArgumentError: Type of attribute: iou_aware_factor is not pir::FloatAttribute.
[Hint: Expected attributes.at("iou_aware_factor").isapir::FloatAttribute() == true, but received attributes.at("iou_aware_factor").isapir::FloatAttribute():0 != true:1.] (at /paddle/build/paddle/fluid/pir/dialect/operator/ir/pd_op4.cc:30369)

Aborted

看报错信息相关是 iou_aware_factor的类型设置有误,请问目前这个值是怎么给的呢;

另外可以尝试下 export FLAGS_enable_pir_api=0 在非PIR模式下进行导出和预测是否仍然报错?

@zoooo0820 这个问题解决了,应该是mklml的问题,关了吧,另外麻烦看看我另一个issuse,接入yolov8/v10模型的问题,感谢