Pull Request已成功合入, 合并人@ascend-robot
(感谢 gengli8 的贡献)compile


Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-Ascend/MindIE-LLM | ✅ 陈歆怡, earthmanylf (2/2) | ✅ 陈歆怡 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
forcekeng, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Linking Issue Notice
@forcekeng , the pull request must be linked to at least one issue.
If an issue has already been linked, but the needs-issue label remains, you can remove the label by commenting /check-issue .


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_ops_x86_A3 | 🕚 | >>> |
| Build_ops_arm_A3 | 🕚 | >>> | |
| Build_ops_x86_A2 | 🕚 | >>> | |
| Build_ops_arm_A2 | 🕚 | >>> | |
| Build_linux_x86_abi1_atb | 🕚 | >>> | |
| Build_linux_x86_abi1_llm | 🕚 | >>> | |
| Build_linux_arm_abi1_atb | 🕚 | >>> | |
| Build_linux_arm_abi1_llm | 🕚 | >>> | |
| Build_linux_arm_abi0_atb | 🕚 | >>> | |
| Build_linux_arm_abi0_llm | 🕚 | >>> | |
| 恶意代码检查 | Antipoison | 🕚 | >>> |
| 编码安全与规范检查 | pre-commit | 🕚 | >>> |
| 开源片段检查 | SCA | 🕚 | >>> |
| 开发者测试 | UT_linux_arm_mindie-llm | 🕚 | >>> |
| UT_linux_arm_atb-models | 🕚 | >>> | |
| 流水线 | PR-pipeline_MindIE-LLM_gitcode | 🟨 | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


ascend docs pipeline is running...


ascend docs pipeline is running...


变更摘要
该 PR 修复了同时启用 W8A8 量化 + LoRA + FlashComm 时出现的精度劣化和回复重复乱码问题。根因是:AllGather 在父图中原本读取 intermediate_quant_input 张量,但量化操作使父图试图读取子图中尚未初始化的 intermediate_inner_tp_input。修复方案是在 AddAllGather 函数中增加对 supportLora 标志的判断,当 LoRA 启用时统一回退到读取父图的 in_input,避免跨图引用未初始化张量。
主要改动
-
AllGather 输入张量选择逻辑增加 LoRA 条件: 在
linear.cpp的AddAllGather中,原本仅根据quantType是否为 W8A8 系列量化类型来决定使用"intermediate_quant_input"还是"in_input";现在增加了&& !param.supportLora条件,当 LoRA 启用时强制使用"in_input",避免读取子图未初始化的中间张量。 -
动态量化场景的 AllGatherInputScale 节点创建增加 LoRA 条件: 原本当
quantType为LINEAR_W8A8_DYNAMIC_QUANT或LINEAR_W8A8_DYNAMIC_DEQUANT时会额外创建allGatherInputScaleNode;现在同样加入&& !param.supportLora判断,LoRA 启用时跳过该节点的创建,保持与主 AllGather 输入张量选择的一致性。


✅ 跳过 docs ci 检查,没有需要检查的文档文件


✅ 跳过 docs ci 检查,没有需要检查的文档文件


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_ops_x86_A3 | 🕚 | >>> |
| Build_ops_arm_A3 | 🕚 | >>> | |
| Build_ops_x86_A2 | 🕚 | >>> | |
| Build_ops_arm_A2 | 🕚 | >>> | |
| Build_linux_x86_abi1_atb | 🕚 | >>> | |
| Build_linux_x86_abi1_llm | 🕚 | >>> | |
| Build_linux_arm_abi1_atb | 🕚 | >>> | |
| Build_linux_arm_abi1_llm | 🕚 | >>> | |
| Build_linux_arm_abi0_atb | 🕚 | >>> | |
| Build_linux_arm_abi0_llm | 🕚 | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | pre-commit | ❌ | >>> |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_linux_arm_mindie-llm | 🕚 | >>> |
| UT_linux_arm_atb-models | 🕚 | >>> | |
| 流水线 | PR-pipeline_MindIE-LLM_gitcode | ❌ | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


compile


ascend docs pipeline is running...


ascend docs pipeline is running...


✅ 跳过 docs ci 检查,没有需要检查的文档文件


✅ 跳过 docs ci 检查,没有需要检查的文档文件


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_ops_x86_A3 | ✅ | >>> |
| Build_ops_arm_A3 | ✅ | >>> | |
| Build_ops_x86_A2 | ✅ | >>> | |
| Build_ops_arm_A2 | ✅ | >>> | |
| Build_linux_x86_abi1_atb | ✅ | >>> | |
| Build_linux_x86_abi1_llm | ✅ | >>> | |
| Build_linux_arm_abi1_atb | ✅ | >>> | |
| Build_linux_arm_abi1_llm | ✅ | >>> | |
| Build_linux_arm_abi0_atb | ✅ | >>> | |
| Build_linux_arm_abi0_llm | ✅ | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | pre-commit | ✅ | >>> |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_linux_arm_mindie-llm | ✅ | >>> |
| UT_linux_arm_atb-models | ✅ | >>> | |
| 流水线 | PR-pipeline_MindIE-LLM_gitcode | ✅ | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


/lgtm


/merge


/approve


1、修复quant+lora+flashcomm精度劣化,请求回复出现重复乱码等。
2、根因:同时启用lora+flashcomm+w8a8_quant,allgather在父图只能读到 in_input,但量化会让父图读子图还没初始化的 intermediate_inner_tp_input。
3、修改atb-models的allgatehr逻辑,在开启lora时候读取in_input。
修复前:gsm8k精度80%,输出内容有重复;修复后gsm8k精度84.38%,和不使用lora的场景持平,输出内容无重复。