已关闭
[Bug-Report|缺陷反馈]: ReduceCopyMerge enforce 组被同 scope 组外端点误拒导致 scope 融合互锁失效 #3212
wangmingjun创建于 23 天前关闭于 22 天前
23 天前 issue类型由 任务 改变为 缺陷
23 天前 将 hwwangmingjun 设为负责人
23 天前 添加了label:Passes
Wwangmingjun
23 天前 修改标题为 “[Bug-Report|缺陷反馈]: ReduceCopyMerge enforce 组被同 scope 组外端点误拒导致 scope 融合互锁失效”,原标题为“[缺陷] ReduceCopyMerge enforce 组被同 scope 组外端点误拒导致 scope 融合互锁失效”
23 天前 修改标题为 “[Bug-Report|缺陷反馈]: ReduceCopyMerge enforce 组被同 scope 组外端点误拒导致 scope 融合互锁失效”,原标题为“[缺陷] ReduceCopyMerge enforce 组被同 scope 组外端点误拒导致 scope 融合互锁失效”
wangmingjun
22 天前 评论:
22 天前 评论:
修改内容
-
BoundaryTensorInfo 增加端点级 CvFuseId 数据通路:新增
producerCvFuseIds/consumerCvFuseIds与 Subgraphs 逐项平行的向量;RecordBoundaryTensorInfo改为按(subgraphId, op->GetCvFuseId())对去重采集端点(同子图内不同 op 的 scope 信息不丢失)。 -
新增平行判定函数
IsInvalidMergedInnerTensorByCvFuseId(与原IsInvalidMergedInnerTensor平行,原函数零改动):拒绝结构与 subgraphId 判定一致(组内 producer && 组内 consumer && 组外端点),差异仅在组外端点的豁免规则——- tensor 全部端点携带真实 CvFuseId(>=0,scope 信息完整)时,组外端点与组内端点的 CvFuseId 集合相同 → 豁免(同 scope 伙伴,scope 融合机制保证终将同组,输出 DEBUG 日志记录被豁免端点);
- 异 scope 组外端点 → 仍拒绝;
- 任一端点为 -1(含 CvFuseIds 缺失)→ 豁免整体失效,所有组外端点一律按 foreign 拒绝,行为与 subgraphId 判定完全一致(守护 #3160)。
-
分发开关:
CheckNoExternalUseOfMergedInnerTensor新增checkByCvFuseId参数(默认 false),内部二选一分发到新旧两个判定函数,公共骨架(isDDR 门槛、visit-stamp 去重、WARN 日志及跨轮去重)完全共用。 -
enforce 路径启用 CvFuseId 判定:
Merge中 enforce 组分支调用传true;auto-mix 路径(CanMergeWithConstraints内)保持默认 false 走原 subgraphId 判定,行为不变。


wangmingjun
22 天前 评论:
22 天前 评论:
问题已修复,关闭issue


wangmingjun
22 天前 评论:
22 天前 评论:
/close


22 天前 issue状态由 待办的 改变为 已完成
22 天前 关闭了 issue
22 天前 添加了label:resolved
Describe the current behavior / 问题描述 (Mandatory / 必填)
auto_mix_partition=0时,ReduceCopyMerge 仅处理 enforce 合并组(scope 融合组),但 enforce 路径的CheckNoExternalUseOfMergedInnerTensor检查(防止合并产生内用外传畸形结构)仅按 subgraphId 判定组内/组外,未利用端点携带的 CvFuseId scope 信息,把同 scope 的组外端点也一律视为风险拒绝,导致 enforce 组互锁、scope 融合失效。实测 PipeUB2L1 场景(PyPTO_Test case 517,DAV_3510):子图 48~53 的全部边界 tensor 端点携带同一 CvFuseId(scope 0),但出现互锁:
[48, 49, 52, 53]被 tensor 2020 卡住:producer 49 在组内、producer 50 在组外(同为 scope 0);[49, 50, 52, 53]被 tensor 2019 卡住:producer 49 在组内、producer 48 在组外(同为 scope 0);Environment / 环境信息 (Mandatory / 必填)
test_cases/pipetransfer/Case_PipeUB2L1.xlsxcase 517(PipeUB2L1)Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
auto_mix_partition=0下运行 PipeUB2L1 用例;[48,49,52,53]与[49,50,52,53]因组外同 scope 端点被 inner-external-use 检查拒绝,形成互锁,Merge group N ... skipped due to constraints全部跳过。Describe the expected behavior / 预期结果 (Mandatory / 必填)
enforce(scope 融合)路径的内用外传检查应按 CvFuseId 判定组外端点:
预期
[48,49,52,53]先合并、后续组将 50/51 吸收进同一 root,scope 0 全部子图融合为一个混合子图。Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
修改前:enforce 组全部 skipped(26 个候选组合并 0 次);修改后:
Merge group 3 succeeded: actualGroup=[48, 49, 52, 53]等链式合并 26 次成功,用例 Triple Compare / Pipe Mix Result 均 PASS。Special notes for this issue / 备注 (Optional / 选填)
修复 PR 将从 hwwangmingjun/pypto_wmj 提交,关联本 issue。