Pull Request已成功合入, 合并人@ascend-robot
(感谢 caorenlei 的贡献)变更摘要
本 PR 主要扩展 npu_dequant_swiglu_quant 接口(位于 DequantSwigluQuantOpApi.cpp)对 swiglu_mode 参数的合法性校验范围,由原先仅支持 0、1、2 扩展为同时支持 3,并同步更新了对应的错误提示信息,使该参数校验与新支持的取值保持一致。
主要改动
- 扩展
swiglu_mode合法取值: 在npu_dequant_swiglu_quant的TORCH_CHECK校验中新增swiglu_mode == 3条件,使swiglu_mode支持0、1、2、3四种取值。 - 更新参数校验错误提示: 将报错文案由
"swiglu_mode only support 0, 1 or 2, but got "更新为"swiglu_mode only support 0, 1 , 2 or 3, but got ",确保非法参数时的提示信息与扩展后的校验范围一致。


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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-Ascend/op-plugin | ✅ 褚博宁, liangsongwei (2/2) | ✅ 褚博宁 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
caorenlei, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Linking Issue Notice
@caorenlei , 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 .


ascend docs pipeline is running...


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


ascend docs pipeline is running...


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


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_master_ARM | ✅ COMPLETED | >>> |
| Build_v2_7_1_ARM | ✅ COMPLETED | >>> | |
| Build_v2_9_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_10_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_11_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_12_0_ARM | ✅ COMPLETED | >>> | |
| Build_master_x86 | ✅ COMPLETED | >>> | |
| Build_v2_7_1_x86 | ✅ COMPLETED | >>> | |
| Build_v2_9_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_10_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_11_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_12_0_x86 | ✅ COMPLETED | >>> | |
| 恶意代码检查 | Antipoison | ✅ COMPLETED | >>> |
| 编码安全与规范检查 | codecheck_pre-commit | ✅ COMPLETED | >>> |
| pre-commit | ✅ COMPLETED | >>> | |
| 开源片段检查 | SCA | ✅ COMPLETED | >>> |
| 开发者测试 | UT_master_ARM_01 | ❌ FAILED | >>> |
| UT_v2_7_1_ARM | ❌ FAILED | >>> | |
| UT_v2_9_0_ARM | ❌ FAILED | >>> | |
| UT_v2_10_0_ARM | ❌ FAILED | >>> | |
| UT_v2_11_0_ARM | ❌ FAILED | >>> | |
| UT_v2_12_0_ARM | ❌ FAILED | >>> | |
| UT_212_ARM_cpp | ❌ FAILED | >>> | |
| 流水线 | PR-pipeline_op-plugin | ❌ FAILED | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_master_ARM | ✅ COMPLETED | >>> |
| Build_v2_7_1_ARM | ✅ COMPLETED | >>> | |
| Build_v2_9_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_10_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_11_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_12_0_ARM | ✅ COMPLETED | >>> | |
| Build_master_x86 | ✅ COMPLETED | >>> | |
| Build_v2_7_1_x86 | ✅ COMPLETED | >>> | |
| Build_v2_9_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_10_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_11_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_12_0_x86 | ✅ COMPLETED | >>> | |
| 恶意代码检查 | Antipoison | ✅ COMPLETED | >>> |
| 编码安全与规范检查 | codecheck_pre-commit | ✅ COMPLETED | >>> |
| pre-commit | ✅ COMPLETED | >>> | |
| 开源片段检查 | SCA | ✅ COMPLETED | >>> |
| 开发者测试 | UT_master_ARM_01 | ❌ FAILED | >>> |
| UT_v2_7_1_ARM | ❌ FAILED | >>> | |
| UT_v2_9_0_ARM | ❌ FAILED | >>> | |
| UT_v2_10_0_ARM | ❌ FAILED | >>> | |
| UT_v2_11_0_ARM | ❌ FAILED | >>> | |
| UT_v2_12_0_ARM | ❌ FAILED | >>> | |
| UT_212_ARM_cpp | ❌ FAILED | >>> | |
| 流水线 | PR-pipeline_op-plugin | ❌ FAILED | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_master_ARM | ✅ COMPLETED | >>> |
| Build_v2_7_1_ARM | ✅ COMPLETED | >>> | |
| Build_v2_9_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_10_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_11_0_ARM | ✅ COMPLETED | >>> | |
| Build_v2_12_0_ARM | ✅ COMPLETED | >>> | |
| Build_master_x86 | ✅ COMPLETED | >>> | |
| Build_v2_7_1_x86 | ✅ COMPLETED | >>> | |
| Build_v2_9_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_10_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_11_0_x86 | ✅ COMPLETED | >>> | |
| Build_v2_12_0_x86 | ✅ COMPLETED | >>> | |
| 恶意代码检查 | Antipoison | ✅ COMPLETED | >>> |
| 编码安全与规范检查 | codecheck_pre-commit | ✅ COMPLETED | >>> |
| pre-commit | ✅ COMPLETED | >>> | |
| 开源片段检查 | SCA | ✅ COMPLETED | >>> |
| 开发者测试 | UT_master_ARM_01 | ✅ COMPLETED | >>> |
| UT_v2_7_1_ARM | ✅ COMPLETED | >>> | |
| UT_v2_9_0_ARM | ✅ COMPLETED | >>> | |
| UT_v2_10_0_ARM | ✅ COMPLETED | >>> | |
| UT_v2_11_0_ARM | ✅ COMPLETED | >>> | |
| UT_v2_12_0_ARM | ✅ COMPLETED | >>> | |
| UT_212_ARM_cpp | ✅ COMPLETED | >>> | |
| 流水线 | PR-pipeline_op-plugin | ✅ COMPLETED | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


/lgtm


【合入来源】
关联 issue:#476
【修改方案】
npu_dequant_swiglu_quant的 swiglu_mode 入参校验与算子仓能力对齐:op_plugin/ops/opapi/DequantSwigluQuantOpApi.cpp中 swiglu_mode 的 TORCH_CHECK 合法取值从 {0, 1, 2} 扩展为 {0, 1, 2, 3},报错文案由 "swiglu_mode only support 0, 1 or 2" 同步更新为 "swiglu_mode only support 0, 1, 2 or 3";【资料变更】
不涉及
【接口变更】
涉及:
torch_npu.npu_dequant_swiglu_quant的 swiglu_mode 参数合法取值范围由 {0, 1, 2} 扩展为 {0, 1, 2, 3},属客户面可见的参数约束放宽(向后兼容,原有合法值行为不变)。【功能验证】
【CheckList】