文件最后提交记录最后更新时间
fix: grouped matmul swiglu quant v2 mxfp4 shape infer Co-authored-by: wang_ziqi<wangziqi4@huawei.com> # message auto-generated for no-merge-commit merge: !5049 merge gmm_bugfix into master fix: grouped matmul swiglu quant v2 mxfp4 shape infer Created-by: wang-ziqi-code Commit-by: wang_ziqi Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [x] 问题单 https://atomgit.com/Ascend/op-plugin/issues/84 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 修复 npu_grouped_matmul_swiglu_quant_v2 在 Ascend950 MXFP4 / packed FP4 场景下的 output shape 推导问题。 1. 对齐 CANN infer shape 逻辑,MX 场景下 weightScale[E, ceil(K/64), N, 2],逻辑 N 应取 weightScale.dim2,不能按转置 view 或 FP4 uint8 物理存储再做额外补偿。 2. npu_grouped_matmul_swiglu_quant_v2_meta 中移除旧的 FP4_IN_INT8 output/outputScale shape 补偿逻辑,统一按 CANN 输出: - output = [M, N / 2] - outputScale = [M, ceil((N / 2) / 64), 2] 3. GroupedMatmulSwigluQuantV2NpuOpapi.cpp 中保留 5D NZ 和 950 逻辑 3D weight 的路径区分: - 5D NZ 场景从 weightScale 推导逻辑 N。 - Ascend950 逻辑 3D weight 场景继续从 weight.size(2) 推导 N。 4. 新增 fake tensor 和 Ascend950 shape-only 用例,覆盖 MXFP4 input + FP8/FP4 output 的 shape 推导,避免 CPU golden 当前不支持 packed float4 MX 输入的问题影响回归看护。 # 【资料变更】 不涉及。 # 【接口变更】 不涉及 public API / YAML / schema 变更。 # 【功能验证】 新增/调整用例: 1. test/core_tests/test_fake_tensor.py - 新增 Ascend950 MXFP4 fake tensor shape 回归,覆盖 FP8 output 和 FP4 output。 - 校验 output/outputScale shape 与 CANN infer shape 一致。 2. test/test_custom_ops/test_npu_grouped_matmul_swiglu_quant_v2.py - 新增 Ascend950 MXFP4 shape-only 后端用例。 - 覆盖 x_dtype/weight_dtype=torch_npu.float4_e2m1fn_x2weight_scale_dtype/x_scale_dtype=torch_npu.float8_e8m0fnu。 - 校验 output/outputScale shape 和 dtype,不做数值 golden。 - **910B** ![image.png](https://raw.gitcode.com/user-images/assets/7403085/cfb0a01e-4b2b-47f2-9bdb-048dc1eb9ef0/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/7403085/c87d6fdd-3d29-4bad-9320-34d04f6a4a3d/image.png 'image.png') - **950** ![image.png](https://raw.gitcode.com/user-images/assets/7403085/56b63bf8-9018-4379-b8a0-057a915101ba/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/7403085/b058a623-25a4-4020-be9f-b21e50ad107c/image.png 'image.png') # 【CheckList】 - [x] 代码注释完整,关键 shape 推导原因已说明 - [x] 参数合法性沿用现有校验逻辑 - [x] PR 标题建议使用 fix: grouped matmul swiglu quant v2 mxfp4 shape infer - [ ] CI 执行通过 ``` See merge request: Ascend/op-plugin!50494 小时前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
fix: grouped matmul swiglu quant v2 mxfp4 shape infer Co-authored-by: wang_ziqi<wangziqi4@huawei.com> # message auto-generated for no-merge-commit merge: !5049 merge gmm_bugfix into master fix: grouped matmul swiglu quant v2 mxfp4 shape infer Created-by: wang-ziqi-code Commit-by: wang_ziqi Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [x] 问题单 https://atomgit.com/Ascend/op-plugin/issues/84 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 修复 npu_grouped_matmul_swiglu_quant_v2 在 Ascend950 MXFP4 / packed FP4 场景下的 output shape 推导问题。 1. 对齐 CANN infer shape 逻辑,MX 场景下 weightScale[E, ceil(K/64), N, 2],逻辑 N 应取 weightScale.dim2,不能按转置 view 或 FP4 uint8 物理存储再做额外补偿。 2. npu_grouped_matmul_swiglu_quant_v2_meta 中移除旧的 FP4_IN_INT8 output/outputScale shape 补偿逻辑,统一按 CANN 输出: - output = [M, N / 2] - outputScale = [M, ceil((N / 2) / 64), 2] 3. GroupedMatmulSwigluQuantV2NpuOpapi.cpp 中保留 5D NZ 和 950 逻辑 3D weight 的路径区分: - 5D NZ 场景从 weightScale 推导逻辑 N。 - Ascend950 逻辑 3D weight 场景继续从 weight.size(2) 推导 N。 4. 新增 fake tensor 和 Ascend950 shape-only 用例,覆盖 MXFP4 input + FP8/FP4 output 的 shape 推导,避免 CPU golden 当前不支持 packed float4 MX 输入的问题影响回归看护。 # 【资料变更】 不涉及。 # 【接口变更】 不涉及 public API / YAML / schema 变更。 # 【功能验证】 新增/调整用例: 1. test/core_tests/test_fake_tensor.py - 新增 Ascend950 MXFP4 fake tensor shape 回归,覆盖 FP8 output 和 FP4 output。 - 校验 output/outputScale shape 与 CANN infer shape 一致。 2. test/test_custom_ops/test_npu_grouped_matmul_swiglu_quant_v2.py - 新增 Ascend950 MXFP4 shape-only 后端用例。 - 覆盖 x_dtype/weight_dtype=torch_npu.float4_e2m1fn_x2weight_scale_dtype/x_scale_dtype=torch_npu.float8_e8m0fnu。 - 校验 output/outputScale shape 和 dtype,不做数值 golden。 - **910B** ![image.png](https://raw.gitcode.com/user-images/assets/7403085/cfb0a01e-4b2b-47f2-9bdb-048dc1eb9ef0/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/7403085/c87d6fdd-3d29-4bad-9320-34d04f6a4a3d/image.png 'image.png') - **950** ![image.png](https://raw.gitcode.com/user-images/assets/7403085/56b63bf8-9018-4379-b8a0-057a915101ba/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/7403085/b058a623-25a4-4020-be9f-b21e50ad107c/image.png 'image.png') # 【CheckList】 - [x] 代码注释完整,关键 shape 推导原因已说明 - [x] 参数合法性沿用现有校验逻辑 - [x] PR 标题建议使用 fix: grouped matmul swiglu quant v2 mxfp4 shape infer - [ ] CI 执行通过 ``` See merge request: Ascend/op-plugin!50494 小时前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
!875 op_plugin ut run with torch_npu version. Merge pull request !875 from 李金鑫/ut_master 2 年前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
Checkout v2r13 Co-authored-by: Chansinging<1183520536@qq.com> Co-authored-by: chansinging<chenxingying2@huawei.com> # message auto-generated for no-merge-commit merge: !4923 merge main_sync_20260511 into master Checkout v2r13 Created-by: chansinging Commit-by: Chansinging;chansinging Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 参考社区演进和以往PR记录 - [ ] 需求 - [ ] 问题单 - [x] issue/工单[社区演进](https://gitcode.com/Ascend/op-plugin/issues/77) - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 参考社区演进和以往PR记录 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/f9dd5824-f779-4cf3-b3ae-7547de2625e8/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!492322 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前
修改fusedCausalConv1d接口,新增fusedCausalConv1d原地更新接口 Co-authored-by: wkyan<yanwenkai@huawei.com> # message auto-generated for no-merge-commit merge: !4969 merge 0518FCC into master 修改fusedCausalConv1d接口,新增fusedCausalConv1d原地更新接口 Created-by: wkyan Commit-by: wkyan Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 修改FusedCausalConv1d算子,新增InplaceFusedCausalConv1d算子,修改npu_fused_causal_conv1d,新增npu_fused_causal_conv1d_v2接口 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” 修改FusedCausalConv1d算子资料 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 修改FusedCausalConv1d算子接口 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 本地自验证:根据算子信息库,从支持的数据类型以及输入数据维度两个角度设计测试用例测试接口功能 npu_fused_causal_conv1d算子: [npu_fused_causal_conv1d] 单算子 | dtype=bfloat16 | batch=8 | cu_seq_len=24 | dim=64 | K=3 | pad_slot_id=-1 | residual_connection=1 | max_query_len=3 | state_len=4 | block_size=178 | conv_mode=1 | APC=ON | 3D | manual test 输入shape:x: torch.Size([8, 3, 64]) weight: torch.Size([3, 64]) conv_states: torch.Size([29, 4, 64]) cache_indices: torch.Size([8, 3]) num_computed_tokens: torch.Size([8]) Result: PASS [npu_fused_causal_conv1d] 单算子 | dtype=bfloat16 | batch=1 | cu_seq_len=7 | dim=384 | K=3 | pad_slot_id=-1 | residual_connection=0 | max_query_len=7 | state_len=8 | block_size=223 | conv_mode=1 | APC=ON | 3D | manual test 输入shape:x: torch.Size([1, 7, 384]) weight: torch.Size([3, 384]) conv_states: torch.Size([9, 8, 384]) cache_indices: torch.Size([1, 4]) num_computed_tokens: torch.Size([1]) Result: PASS [npu_fused_causal_conv1d] 单算子 | dtype=float16 | batch=8 | cu_seq_len=764 | dim=512 | K=3 | pad_slot_id=-1 | residual_connection=0 | max_query_len=188 | state_len=3 | block_size=47 | conv_mode=1 | APC=ON | manual test 输入shape:x: torch.Size([764, 512]) weight: torch.Size([3, 512]) conv_states: torch.Size([69, 3, 512]) cache_indices: torch.Size([8, 8]) num_computed_tokens: torch.Size([8]) Result: PASS [npu_fused_causal_conv1d] 单算子 | dtype=bfloat16 | batch=4 | cu_seq_len=73 | dim=1536 | K=3 | pad_slot_id=-1 | residual_connection=0 | max_query_len=45 | state_len=3 | block_size=20 | conv_mode=1 | APC=ON | manual test 输入shape:x: torch.Size([73, 1536]) weight: torch.Size([3, 1536]) conv_states: torch.Size([29, 3, 1536]) cache_indices: torch.Size([4, 6]) num_computed_tokens: torch.Size([4]) Result: PASS npu_fused_causal_conv1d_v2算子: [npu_fused_causal_conv1d_v2] 单算子 | dtype=float16 | batch=4 | cu_seq_len=93 | dim=512 | K=3 | pad_slot_id=-1 | residual_connection=1 | max_query_len=64 | state_len=5 | block_size=48 | conv_mode=1 | APC=ON | manual test 输入shape:x: torch.Size([93, 512]) weight: torch.Size([3, 512]) conv_states: torch.Size([21, 5, 512]) cache_indices: torch.Size([4, 4]) num_computed_tokens: torch.Size([4]) Result: PASS [npu_fused_causal_conv1d_v2] 单算子 | dtype=bfloat16 | batch=128 | cu_seq_len=3476 | dim=2048 | K=3 | pad_slot_id=-1 | residual_connection=0 | max_query_len=182 | state_len=9 | block_size=98 | conv_mode=1 | APC=ON | manual test 输入shape:x: torch.Size([3476, 2048]) weight: torch.Size([3, 2048]) conv_states: torch.Size([773, 9, 2048]) cache_indices: torch.Size([128, 6]) num_computed_tokens: torch.Size([128]) Result: PASS [npu_fused_causal_conv1d_v2] 单算子 | dtype=float16 | batch=128 | cu_seq_len=1024 | dim=256 | K=3 | pad_slot_id=-1 | residual_connection=1 | max_query_len=8 | state_len=9 | block_size=119 | conv_mode=1 | APC=ON | manual test 输入shape:x: torch.Size([1024, 256]) weight: torch.Size([3, 256]) conv_states: torch.Size([645, 9, 256]) cache_indices: torch.Size([128, 5]) num_computed_tokens: torch.Size([128]) Result: PASS [npu_fused_causal_conv1d_v2] 单算子 | dtype=float16 | batch=1 | cu_seq_len=8 | dim=1536 | K=3 | pad_slot_id=-1 | residual_connection=1 | max_query_len=8 | state_len=9 | block_size=165 | conv_mode=1 | APC=ON | manual test 输入shape:x: torch.Size([8, 1536]) weight: torch.Size([3, 1536]) conv_states: torch.Size([6, 9, 1536]) cache_indices: torch.Size([1, 1]) num_computed_tokens: torch.Size([1]) Result: PASS # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!49695 天前
torch_npu api support 0-d cpu tensor input Co-authored-by: XianglongZeng<zengxianglong1@huawei.com> # message auto-generated for no-merge-commit merge: !4958 merge myop into master torch_npu api support 0-d cpu tensor input Created-by: probiotics_53 Commit-by: XianglongZeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 - 对 22 个 API 进行适配,使其在输入包含 0-d CPU Tensor 时与 GPU 行为一致 - 采用两层适配策略:代码生成模板适配(自动生成 API)+ 接入层手写适配(手写 API) - 有标量专用 aclnn 算子时优先调用标量算子(零拷贝),无标量专用算子时使用 copy_scalar_to_device 详细设计和修改方案见RFC文档:https://gitcode.com/Ascend/pytorch/issues/1919 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/b187c5b2-ec75-48d1-addf-769d23baf77a/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/7403085/b4e2cbb6-7869-450d-a100-ef68b4f941de/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!495810 天前
[Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Co-authored-by: zhoupeng<zp2165064878@163.com> # message auto-generated for no-merge-commit merge: !5043 merge op_code_check into master [Fix] Enable trailing whitespace check, Fix trailing-whitespace errors detected by pre-commit Created-by: thickhair Commit-by: zhoupeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/129 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 修改pre-commit-config.yaml,开启trailing-whitespace检查,使用pre-commit进行检查和修复 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 ![image.png](https://raw.gitcode.com/user-images/assets/7403085/549c5212-645f-4d66-82e2-88926bc8515e/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!50431 天前