【求助】Atlas 300I Duo (310P) 在CANN环境下内存溢出错误,但自定义Python脚本测试正常
收藏回复举报
【求助】Atlas 300I Duo (310P) 在CANN环境下内存溢出错误,但自定义Python脚本测试正常
t('forum.solved') 已解决
新人帖
发表于2025-12-24 17:12:39
0 查看

【求助】Atlas 300I Duo (310P) 在CANN环境下内存溢出错误,但自定义Python脚本测试正常

问题描述

我在使用华为 Atlas 300I Duo (310P) 推理卡时遇到一个奇怪的问题:

  1. 自定义Python脚本调用NPU正常:使用自行编写的Python脚本(基于PyTorch/ONNX等)可以正常调用NPU并完成推理,无内存错误。
  2. 华为CANN官方测试用例失败:运行华为提供的CANN测试用例(如ATC模型转换、msame推理工具、样例代码等)时,持续出现内存溢出(OOM)错误
  3. 在物理机部署deepseek也出现同样错误

环境信息

项目

详情

硬件

Atlas 300I Duo (310P)

操作系统

麒麟ARM版(基于Ubuntu)

驱动版本

Ascend-hdk-310p-npu-driver_x.x.x_linux-aarch64.run

CANN版本

CANN 8.0与8.3

Python版本

3.8

固件版本

通过npu-smi info查看25

内存大小

系统内存:128GB,NPU内存:96GB

详细现象

1. 自定义脚本工作正常

2. CANN测试用例报错

RuntimeError: operator():build/CMakeFiles/torch_npu.dir/compiler_depend.ts:25 NPU function error: c10_npu::acl::AclrtSynchronizeStreamWithTimeout(copy_stream), error code is 507015

[ERROR] 2025-12-24-01:19:31 (PID:598, Device:0, RankID:-1) ERR00100 PTA call acl api failed

[Error]: The aicore execution is abnormal.

        Rectify the fault based on the error information in the ascend log.

EZ9999: Inner Error!

EZ9999[PID: 598] 2025-12-24-01:19:31.740.203 (EZ9999):  The error from device(0), serial number is 1, there is an error of aicore, core id is 1, error code = 0x800000, dump info: pc start: 0x800124000002000, current: 0x1240000020c8, vec error info: 0x811adff, mte error info: 0x3000023, ifu error info: 0xbfc7efe7c600, ccu error info: 0xfc1682130047cfc6, cube error info: 0xed, biu error info: 0, aic error mask: 0x65000200d00028c, para base: 0x12c000262840, errorStr: The DDR address of the MTE instruction is out of range.[FUNC:PrintCoreErrorInfo][FILE:device_error_core_proc.cc][LINE:46]

        TraceBack (most recent call last):

       The extend info from device(0), serial number is 1, there is aicore error, core id is 1, aicore int: 0x10, aicore error2: 0, axi clamp ctrl: 0, axi clamp state: 0x1717, biu status0: 0x101d14000000000, biu status1: 0x80000201020000, clk gate mask: 0, dbg addr: 0, ecc en: 0, mte ccu ecc 1bit error: 0xc80000000000000, vector cube ecc 1bit error: 0, run stall: 0x1, dbg data0: 0, dbg data1: 0, dbg data2: 0, dbg data3: 0, dfx data: 0x4d[FUNC:PrintCoreErrorInfo][FILE:device_error_core_proc.cc][LINE:77]

       The dha(mata) info from device(0), dha id is 0, dha status 1 info:0x23[FUNC:ProcessCoreErrorInfo][FILE:device_error_core_proc.cc][LINE:178]

       The dha(mata) info from device(0), dha id is 1, dha status 1 info:0x3[FUNC:ProcessCoreErrorInfo][FILE:device_error_core_proc.cc][LINE:178]

       The device(0), core list[0-0], error code is:[FUNC:PrintCoreInfoErrMsg][FILE:device_error_core_proc.cc][LINE:105]

       coreId( 0):        0x800000    [FUNC:PrintCoreInfoErrMsg][FILE:device_error_core_proc.cc][LINE:119]

       Kernel task happen error, retCode=0x26, [aicore exception].[FUNC:PreCheckTaskErr][FILE:davinci_kernel_task.cc][LINE:1555]

       Op execute failed. origin_op_name [Equal2], op_name [Equal2], error_info: task_id 3, stream_id 2, tid 598, device_id 0, retcode 0x7bc87[FUNC:ErrorTrackingCallback][FILE:error_tracking.cc][LINE:117]

       rtStreamSynchronizeWithTimeout execute failed, reason=[aicore exception][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:53]

       synchronize stream with timeout failed, runtime result = 507015[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:162]

已尝试的解决步骤

  1. 基础检查
    • npu-smi info 显示NPU状态正常
    • 驱动版本与CANN版本匹配(官方兼容性列表验证)
    • 系统内存充足(128GB)
  2. 环境验证
    • 重新安装驱动和CANN(完全卸载后重装)
    • 测试不同CANN版本和对应的npu驱动固件(8.3/8.0 / 7.0)
    • 检查日志:/var/log/ascend_log/ 无异常报错

关键疑问点

  1. 为什么自定义脚本能正常工作,而CANN官方工具反而OOM?
  2. CANN环境是否有隐藏的内存配置或限制?
  3. 310P的NPU内存是否需要在CANN中特殊配置?
  4. 是否存在驱动与CANN版本的不完全兼容问题?

请求帮助

  1. 是否有针对Atlas 300I Duo (310P) 的特定内存配置指南?
  2. 如何调试CANN环境下的内存分配问题?
  3. 能否提供310P在CANN环境下的正确配置示例?
  4. 是否有已知的类似问题及修复补丁?

特别需求:

能否给与一个可用的环境推荐:

1、npu的驱动、固件下载版本

2、cann相关的下载版本

3、ptorch相关的下载版本

4、mindie可用的镜像包版本

我要发帖子