调用昇腾310推理出现内存错误
收藏回复举报
调用昇腾310推理出现内存错误
发表于2024-12-25 08:50:41
0 查看

1 系统环境

硬件环境(Ascend/GPU/CPU): Ascend

MindSpore版本: mindspore=2.2.14

执行模式(PyNative/ Graph):不限

Python版本: Python=3.8

操作系统平台: linux

2 报错信息

2.1 问题描述

使用Ascend后端推理后会出现内存错误:

使用mindspore-lite自带的benchmark工具使用310卡进行推理后会出现该错误;

使用mindspore-lite实现的推理代码调用310卡推理后同样会出现该错误。而使用CPU进行推理则无该问题出现;

2.2 报错信息

malloc(): mismatching next->prev_size (unsorted)

Aborted (core dumped)

2.3 设置信息

[root@310 converter]# ../../benchmark/benchmark --modelFile=./mindir/yolox_nano_ascend.mindir --device=Ascend --inputShapes=1,3,640,640    

ModelPath = ./mindir/yolox_nano_ascend.mindir

ModelType = MindIR       

InDataPath =                                  

GroupInfoFile =                                        

ConfigFilePath =                                     

InDataType = bin                                    

LoopCount = 10                                    

DeviceType = Ascend                                      

AccuracyThreshold = 0.5                                  

CosineDistanceThreshold = -1.1                             

WarmUpLoopCount = 3                      

NumThreads = 2                                 

InterOpParallelNum = 1                                      

Fp16Priority = 0                               

EnableParallel = 0                                    

calibDataPath =                                  

EnableGLTexture = 0                                     

cpuBindMode = HIGHER_CPU                                 

CalibDataType = FLOAT                            

Resize Dims: 1 3 640 640                               

start unified benchmark run                            

PrepareTime = 1161.66 ms                         

Running warm up loops...                            

Running benchmark loops...                           

Model = yolox_nano_ascend.mindir, NumThreads = 2, MinRunTime = 6.209000 ms, MaxRuntime = 6.245000 ms, AvgRunTime = 6.222000 ms                  

Run Benchmark yolox_nano_ascend.mindir Success.                         

malloc(): mismatching next->prev_size (unsorted)    

Aborted (core dumped)

3 根因分析

******此处由用户填写******

4 解决方案

******此处由用户填写******

包含文字方案和最终脚本代码

请将正确的脚本打包并上传附件

我要发帖子