拓冰建站拓冰建站
首页 / 资讯中心 / 正文

昇腾GE量化模型输入大小过大问题解析

量化模型时模型输入大小过大AI Core执行任务失败量化模型失败【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge问题现象描述模型转换命令示例如下模型输入大小与input_shape参数指定的shape有关atc --modelxxxxxx.pb --framework3 --outputxxxxxx --soc_versionxxxxxx --input_shapeinput:64,224,224,3 --input_formatNHWC --compression_optimize_confconfig/quant.cfg模型转换时报错示例如下[ERROR] AMCT(757013,atc.bin):2023-03-14-14:15:54[model_process.cpp:299]execute model failed, modelId is 1, errorCode is 507011 [ERROR] AMCT(757013,atc.bin):2023-03-14-14:15:54[sample_process.cpp:320]execute inference failed [ERROR] AMCT(757013,atc.bin):2023-03-14-14:15:55[sample_process.cpp:275]ACL model infer failed. [ERROR] AMCT(757013,atc.bin):2023-03-14-14:15:55[quantize_api.cpp:242]sample process failed [ERROR] AMCT(757013,atc.bin):2023-03-14-14:15:55[quantize_api.cpp:378]Do Calibration failed. [ERROR] AMCT(757013,atc.bin):2023-03-14-14:15:56[inner_graph_calibration.cpp:77]Failed to execute InnerQuantizeGraph failed. ATC run failed, Please check the detail log, Try atc --help for more information EZ9999: Inner Error! EZ9999 Aicore kernel execute failed, device_id0, stream_id11, report_stream_id2, task_id209, flip_num0, fault kernel_name17786444594805609729-1_0_1_vgg_16/conv1/conv1_2/Conv2D_histo, program id206, hash1846532111878224358.[FUNC:GetError][FILE:stream.cc][LINE:1131] TraceBack (most recent call last): Model synchronize execute failed, model_id1![FUNC:GetStreamToSyncExecute][FILE:model.cc][LINE:630] rtModelExecute execute failed, reason[the model stream execute failed][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:49] [Exec][Model]Execute model failed, ge result[507011], modelId[1][FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161] [Exec][Model]modelId[1] execute failed, result[507011][FUNC:ReportInnerError][FILE:log_inner.cpp][LINE:145] An unknown error occurred. Please check the log.原因分析AI Core执行任务失败猜测可能是因为input_shape参数处的Batch size值过大导致AI Core上的算子执行失败。解决措施可将input_shape参数处的Batch size值调小例如--input_shapeinput:8,224,224,3调整参数值之后再重新转换模型。【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
分享:

看完干货,该让你的企业上线了

免费需求沟通 · 48 小时内出具建站方案 · 河南本地可上门