Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
在 hccl/src/ops/all_gather_v/all_gather_v_op.cc:156 中,AllGatherVOutPlace 通过 malloc(sizeof(OpParam) + varMemSize) 分配 paramMem,并用 placement new 构造 OpParam。
hccl/src/ops/all_gather_v/all_gather_v_op.cc:156
AllGatherVOutPlace
malloc(sizeof(OpParam) + varMemSize)
paramMem
placement new
OpParam
但当 userRankSize == 1 时,代码调用 SingleRankProc 后直接 return HCCL_SUCCESS,没有执行后面的
userRankSize == 1
SingleRankProc
return HCCL_SUCCESS
paramPtr->~OpParam(); free(paramMem);
因此每次单 rank 调用都会泄漏一次临时内存。
相关代码点:
all_gather_v_op.cc
master分支
单 rank 场景应成功完成本地拷贝,并在返回前释放 paramMem、析构 OpParam;重复调用不应导致进程内存持续增长。
同重现步骤。
感谢对于社区的关注与反馈,当前issue所提问题我们尽快明确修复。
当前问题已明确,后续会尽快解决上库
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
在
hccl/src/ops/all_gather_v/all_gather_v_op.cc:156中,AllGatherVOutPlace通过malloc(sizeof(OpParam) + varMemSize)分配paramMem,并用placement new构造OpParam。但当
userRankSize == 1时,代码调用SingleRankProc后直接return HCCL_SUCCESS,没有执行后面的因此每次单 rank 调用都会泄漏一次临时内存。
相关代码点:
all_gather_v_op.cc: 156all_gather_v_op.cc: 200-203all_gather_v_op.cc: 214-215Environment / 环境信息 (Mandatory / 必填)
master分支
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
Describe the expected behavior / 预期结果 (Mandatory / 必填)
单 rank 场景应成功完成本地拷贝,并在返回前释放 paramMem、析构 OpParam;重复调用不应导致进程内存持续增长。
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
同重现步骤。
Special notes for this issue/备注 (Optional / 选填)