提供昇腾优化的训练业务自定义算子实现
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
add ci& add ut Co-authored-by: shiyuan680<917935075@qq.com> | 3 个月前 | |
feat: CI split Co-authored-by: Raining__<wangruining5@huawei.com> # message auto-generated for no-merge-commit merge: !72 merge master into master feat: CI split Created-by: Raining__ Commit-by: Raining__ Merged-by: ascend-robot Description: ## What this PR does / why we need it? Currently, CI pipeline for all UT tests exceeds 30mins and needs to be optimized to within 30min. This PR splits CI into 4 to run different UT tests. ## Does this PR introduce any user-facing change? Users are unaware of changes. ## How was this patch tested? CI running. See merge request: Ascend/MindSpeed-Ops!72 | 25 天前 | |
[Feature] Add Aclnn ops compilation and dependencies Co-authored-by: YuhanBai<baiyuhan1@h-partners.com> # message auto-generated for no-merge-commit merge: !52 merge aclnn-adapter into master [Feature] Add aclnn ops compiletion and dependencies Created-by: yuhanBai Commit-by: YuhanBai Merged-by: ascend-robot Description: ## What this PR does / why we need it? 本PR参考vllm-ascend中的算子工程,添加了aclnn算子的编译依赖 RFC: https://gitcode.com/Ascend/MindSpeed-Ops/issues/33 Co-Auther with: [@Liccol](https://gitcode.com/Liccol) [@qq_45570708](https://gitcode.com/qq_45570708) ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-Ops!52 | 1 个月前 | |
feat: add docker file Co-authored-by: yangcheng<yangcheng104@huawei.com> # message auto-generated for no-merge-commit merge: !75 merge dockerfile into master feat: add docker file Created-by: zhizaidicengshehua Commit-by: yangcheng Merged-by: ascend-robot Description: ## What this PR does / why we need it? add dockerfile to helps users save time on setting up the environment ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? 构建完成  进入容器测试ut用例  See merge request: Ascend/MindSpeed-Ops!75 | 23 天前 | |
[Feat] Add tilelang op sinkhorn Co-authored-by: zhuweichen<calvin_zhu0210@outlook.com> # message auto-generated for no-merge-commit merge: !73 merge sinkhorn into master [Feat] Add tilelang op sinkhorn Created-by: zhuweichen Commit-by: zhuweichen Merged-by: ascend-robot Description: ## Related Issue https://gitcode.com/Ascend/MindSpeed-Ops/issues/50 ## What this PR does / why we need it? This PR adds a forward-only TileLang implementation of the HC-Split Sinkhorn operator for Ascend arch32. Main changes: - Add mindspeed_ops.api.tilelang.sinkhorn.sinkhorn as the public Python API. - Add the arch32 TileLang kernel implementation for HC-Split Sinkhorn. - Support hc_mult=4. - Support torch.float32 and torch.bfloat16 inputs/outputs. For BF16, the kernel keeps BF16 IO and uses FP32 UB buffers for internal sigmoid, exp, reduce, and Sinkhorn normalization. - Add input validation for shape, dtype, hc_mult, sinkhorn_iters, and unsupported arch35. - Add unit tests and ATK accuracy cases for TileLang Sinkhorn. - Add operator documentation at docs/tilelang/sinkhorn.md. ## Does this PR introduce any user-facing change? Yes. This PR introduces a new TileLang Sinkhorn API: python from mindspeed_ops.api.tilelang.sinkhorn import sinkhorn Supported usage: - mixes: shape [batch_size, seq_len, (2 + hc_mult) * hc_mult] - hc_scale: shape [3] - hc_base: shape [(2 + hc_mult) * hc_mult] - hc_mult: 4 - dtype: torch.float32 or torch.bfloat16 - platform: Ascend arch32 only The operator is forward-only and does not provide autograd backward. Usage details are documented in docs/tilelang/sinkhorn.md. ## How was this patch tested? Verified on Ascend NPU environment: Ascend910_9382, CANN 9.0.0, Python 3.11, TileLang-Ascend installed. 1. Unit test bash pytest -q tests/unit_tests/tilelang/test_sinkhorn.py Result: 42 passed 2. ATK accuracy test sh cd tests/atk_tests/tilelang/sinkhorn export PYTHONPATH=/home/z30046196/MindSpeed-Ops-pr73:$PYTHONPATH atk node --backend triton --devices 0 node --backend npu --devices 0 task -c result/sinkhorn/json/all_sinkhorn.json --task accuracy -tup ./ -p tilelang_sinkhorn.py ATK accuracy log: sh +-------+----------+------------------+------------------+--------------+----------------------+--------+--------------+ | 名称 | 总用例数 | 执行成功用例个数 | 执行失败用例个数 | 通过用例个数 | 错误信息匹配用例个数 | 通过率 | 精度是否达标 | +-------+----------+------------------+------------------+--------------+----------------------+--------+--------------+ | npu_0 | 36 | 36 | 0 | 36 | 0 | 100.0 | Pass | +-------+----------+------------------+------------------+--------------+----------------------+--------+--------------+ Total Task: 36, success 36, failed 0 Summary info: acc_pass_result:Pass is_acc_dc_pass:None is_e2e_perf_pass:None is_benchmark_perf_pass:None is_device_perf_pass:None is_device_memory_pass:None is_memory_check_pass:None . atk task success! atk task finish. cost time: 9 s 3. ATK device performance test sh cd tests/atk_tests/tilelang/sinkhorn export PYTHONPATH=/home/z30046196/MindSpeed-Ops-pr73:$PYTHONPATH atk node --backend triton --devices 0 node --backend npu --devices 0 task -c result/sinkhorn/json/all_sinkhorn.json --task performance_device -tup ./ -p tilelang_sinkhorn.py ATK performance log: sh +-------+----------+------------------+------------------+--------------------+ | 名称 | 总用例数 | device性能通过率 | 平均device性能比 | device性能是否达标 | +-------+----------+------------------+------------------+--------------------+ | npu_0 | 36 | 94.4444 | 7.2842 | Pass | +-------+----------+------------------+------------------+--------------------+ Total Task: 36, success 36, failed 0 Summary info: acc_pass_result:None is_acc_dc_pass:None is_e2e_perf_pass:None is_benchmark_perf_pass:None is_device_perf_pass:Pass is_device_memory_pass:None is_memory_check_pass:None . save result excel file: /home/z30046196/MindSpeed-Ops-pr73/tests/atk_tests/tilelang/sinkhorn/atk_output/all_sinkhorn_2026-07-09-09-54-25-397923/report/ all_sinkhorn_reports_2026-07-09-09-54-26.xlsx atk task success! atk task finish. cost time: 537 s See merge request: Ascend/MindSpeed-Ops!73 | 5 天前 | |
[Bugfix] Fix chunk_kda_bwd precision Co-authored-by: zhuweichen<calvin_zhu0210@outlook.com> # message auto-generated for no-merge-commit merge: !105 merge kda_fix into master [Bugfix] Fix chunk_kda_bwd precision Created-by: zhuweichen Commit-by: zhuweichen Merged-by: ascend-robot Description: ## What this PR does / why we need it? Fix chunk_kda_bwd precision. ## Does this PR introduce any user-facing change? No. ## How was this patch tested? ATK & UT   See merge request: Ascend/MindSpeed-Ops!105 | 1 天前 | |
feat: 新增gitleaks敏感信息检测 Co-authored-by: wujinyuan1<wujinyuan1@huawei.com> # message auto-generated for no-merge-commit merge: !81 merge master into master feat: 新增gitleaks敏感信息检测 Created-by: wujinyuan1 Commit-by: wujinyuan1 Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. 引入gitleaks二进制离线扫描工具 2. 新增pre-commit/.gitleaks.toml配置,继承官方全部检测规则 3. 配置pre-commit钩子,提交前自动扫描密钥硬编码风险。 ## Does this PR introduce any user-facing change? 无. ## How was this patch tested? PR流水线pre-commit检测新增敏感信息检测. See merge request: Ascend/MindSpeed-Ops!81 | 21 天前 | |
[Bugfix] Fix chunk_kda_bwd precision Co-authored-by: zhuweichen<calvin_zhu0210@outlook.com> # message auto-generated for no-merge-commit merge: !105 merge kda_fix into master [Bugfix] Fix chunk_kda_bwd precision Created-by: zhuweichen Commit-by: zhuweichen Merged-by: ascend-robot Description: ## What this PR does / why we need it? Fix chunk_kda_bwd precision. ## Does this PR introduce any user-facing change? No. ## How was this patch tested? ATK & UT   See merge request: Ascend/MindSpeed-Ops!105 | 1 天前 | |
feat: add skills of ops performance profile Co-authored-by: shiyuan680<yangcheng104@huawei.com> # message auto-generated for no-merge-commit merge: !51 merge skills into master feat: add skills of ops performance profile Created-by: zhizaidicengshehua Commit-by: shiyuan680 Merged-by: ascend-robot Description: ## What this PR does / why we need it? support skill which can profile ops performance two mode: random input file input ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? add example random mode python3 operator_performance_profile.py --api "from mindspeed_ops.api.triton.add import add" --input [10,10] x float32 --input [10,10] y float32 --iterations 10 --input-mode random file mode python3 operator_performance_profile.py --api "from mindspeed_ops.api.triton.add import add" --input ../x.pth --input ../y.pth --other-optional-params '{"alpha": 0.1}' --iterations 10 --input-mode file result shows OP Type Core Type Min Time(us) Avg Time(us) Max Time(us) Count Axpy AI_VECTOR_CORE 2.24 3.52 5.28 10 ================================================================================ See merge request: Ascend/MindSpeed-Ops!51 | 1 个月前 | |
【feat】修改完善pre-commit配置文件 Co-authored-by: wujinyuan1<wujinyuan1@huawei.com> | 2 个月前 | |
[Feature] Add Aclnn ops compilation and dependencies Co-authored-by: YuhanBai<baiyuhan1@h-partners.com> # message auto-generated for no-merge-commit merge: !52 merge aclnn-adapter into master [Feature] Add aclnn ops compiletion and dependencies Created-by: yuhanBai Commit-by: YuhanBai Merged-by: ascend-robot Description: ## What this PR does / why we need it? 本PR参考vllm-ascend中的算子工程,添加了aclnn算子的编译依赖 RFC: https://gitcode.com/Ascend/MindSpeed-Ops/issues/33 Co-Auther with: [@Liccol](https://gitcode.com/Liccol) [@qq_45570708](https://gitcode.com/qq_45570708) ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-Ops!52 | 1 个月前 | |
feat: 新增gitleaks敏感信息检测 Co-authored-by: wujinyuan1<wujinyuan1@huawei.com> # message auto-generated for no-merge-commit merge: !81 merge master into master feat: 新增gitleaks敏感信息检测 Created-by: wujinyuan1 Commit-by: wujinyuan1 Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. 引入gitleaks二进制离线扫描工具 2. 新增pre-commit/.gitleaks.toml配置,继承官方全部检测规则 3. 配置pre-commit钩子,提交前自动扫描密钥硬编码风险。 ## Does this PR introduce any user-facing change? 无. ## How was this patch tested? PR流水线pre-commit检测新增敏感信息检测. See merge request: Ascend/MindSpeed-Ops!81 | 21 天前 | |
feat: Add add_rms_norm_bias compiletion Co-authored-by: Liccol<740821011@qq.com> # message auto-generated for no-merge-commit merge: !54 merge aclnn-case into master feat: Add add_rms_norm_bias compiletion Created-by: Liccol Commit-by: Liccol Merged-by: ascend-robot Description: ## What this PR does / why we need it? 新增 add_rms_norm_bias 自定义 ACLNN 算子,将逐元素加法(Add)与 RMS 归一化合并为单个 AscendC Kernel 执行,用于 Transformer 模型推理中残差连接 + RMSNorm 的融合优化。 主要变更: - 新增 add_rms_norm_bias 算子源码 - 新增 cann/ 下的 ACLNN 绑定及 torch_binding 算子注册 - 新增 Python 调用接口(api/aclnn/)及 JIT 构建器(op_builder/) - 引入 cmake/common/scripts/utils 等编译工具链及公共组件 - 新增算子使用文档及开发指南(docs/aclnn/) ## Does this PR introduce any user-facing change? 是,新增 npu_add_rms_norm_bias 接口 ## How was this patch tested? 通过单元测试与 CPU 参考实现对比验证: - 对比分离执行 Add + RMSNorm 与融合算子的数值精度 - 覆盖 float32 / float16 / bfloat16 三种数据类型 - 覆盖有 beta / 无 beta 两种场景  See merge request: Ascend/MindSpeed-Ops!54 | 26 天前 | |
[Feature] Add Aclnn ops compilation and dependencies Co-authored-by: YuhanBai<baiyuhan1@h-partners.com> # message auto-generated for no-merge-commit merge: !52 merge aclnn-adapter into master [Feature] Add aclnn ops compiletion and dependencies Created-by: yuhanBai Commit-by: YuhanBai Merged-by: ascend-robot Description: ## What this PR does / why we need it? 本PR参考vllm-ascend中的算子工程,添加了aclnn算子的编译依赖 RFC: https://gitcode.com/Ascend/MindSpeed-Ops/issues/33 Co-Auther with: [@Liccol](https://gitcode.com/Liccol) [@qq_45570708](https://gitcode.com/qq_45570708) ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-Ops!52 | 1 个月前 | |
add ci& add ut Co-authored-by: shiyuan680<917935075@qq.com> | 3 个月前 | |
[Feat] Add tilelang op sinkhorn Co-authored-by: zhuweichen<calvin_zhu0210@outlook.com> # message auto-generated for no-merge-commit merge: !73 merge sinkhorn into master [Feat] Add tilelang op sinkhorn Created-by: zhuweichen Commit-by: zhuweichen Merged-by: ascend-robot Description: ## Related Issue https://gitcode.com/Ascend/MindSpeed-Ops/issues/50 ## What this PR does / why we need it? This PR adds a forward-only TileLang implementation of the HC-Split Sinkhorn operator for Ascend arch32. Main changes: - Add mindspeed_ops.api.tilelang.sinkhorn.sinkhorn as the public Python API. - Add the arch32 TileLang kernel implementation for HC-Split Sinkhorn. - Support hc_mult=4. - Support torch.float32 and torch.bfloat16 inputs/outputs. For BF16, the kernel keeps BF16 IO and uses FP32 UB buffers for internal sigmoid, exp, reduce, and Sinkhorn normalization. - Add input validation for shape, dtype, hc_mult, sinkhorn_iters, and unsupported arch35. - Add unit tests and ATK accuracy cases for TileLang Sinkhorn. - Add operator documentation at docs/tilelang/sinkhorn.md. ## Does this PR introduce any user-facing change? Yes. This PR introduces a new TileLang Sinkhorn API: python from mindspeed_ops.api.tilelang.sinkhorn import sinkhorn Supported usage: - mixes: shape [batch_size, seq_len, (2 + hc_mult) * hc_mult] - hc_scale: shape [3] - hc_base: shape [(2 + hc_mult) * hc_mult] - hc_mult: 4 - dtype: torch.float32 or torch.bfloat16 - platform: Ascend arch32 only The operator is forward-only and does not provide autograd backward. Usage details are documented in docs/tilelang/sinkhorn.md. ## How was this patch tested? Verified on Ascend NPU environment: Ascend910_9382, CANN 9.0.0, Python 3.11, TileLang-Ascend installed. 1. Unit test bash pytest -q tests/unit_tests/tilelang/test_sinkhorn.py Result: 42 passed 2. ATK accuracy test sh cd tests/atk_tests/tilelang/sinkhorn export PYTHONPATH=/home/z30046196/MindSpeed-Ops-pr73:$PYTHONPATH atk node --backend triton --devices 0 node --backend npu --devices 0 task -c result/sinkhorn/json/all_sinkhorn.json --task accuracy -tup ./ -p tilelang_sinkhorn.py ATK accuracy log: sh +-------+----------+------------------+------------------+--------------+----------------------+--------+--------------+ | 名称 | 总用例数 | 执行成功用例个数 | 执行失败用例个数 | 通过用例个数 | 错误信息匹配用例个数 | 通过率 | 精度是否达标 | +-------+----------+------------------+------------------+--------------+----------------------+--------+--------------+ | npu_0 | 36 | 36 | 0 | 36 | 0 | 100.0 | Pass | +-------+----------+------------------+------------------+--------------+----------------------+--------+--------------+ Total Task: 36, success 36, failed 0 Summary info: acc_pass_result:Pass is_acc_dc_pass:None is_e2e_perf_pass:None is_benchmark_perf_pass:None is_device_perf_pass:None is_device_memory_pass:None is_memory_check_pass:None . atk task success! atk task finish. cost time: 9 s 3. ATK device performance test sh cd tests/atk_tests/tilelang/sinkhorn export PYTHONPATH=/home/z30046196/MindSpeed-Ops-pr73:$PYTHONPATH atk node --backend triton --devices 0 node --backend npu --devices 0 task -c result/sinkhorn/json/all_sinkhorn.json --task performance_device -tup ./ -p tilelang_sinkhorn.py ATK performance log: sh +-------+----------+------------------+------------------+--------------------+ | 名称 | 总用例数 | device性能通过率 | 平均device性能比 | device性能是否达标 | +-------+----------+------------------+------------------+--------------------+ | npu_0 | 36 | 94.4444 | 7.2842 | Pass | +-------+----------+------------------+------------------+--------------------+ Total Task: 36, success 36, failed 0 Summary info: acc_pass_result:None is_acc_dc_pass:None is_e2e_perf_pass:None is_benchmark_perf_pass:None is_device_perf_pass:Pass is_device_memory_pass:None is_memory_check_pass:None . save result excel file: /home/z30046196/MindSpeed-Ops-pr73/tests/atk_tests/tilelang/sinkhorn/atk_output/all_sinkhorn_2026-07-09-09-54-25-397923/report/ all_sinkhorn_reports_2026-07-09-09-54-26.xlsx atk task success! atk task finish. cost time: 537 s See merge request: Ascend/MindSpeed-Ops!73 | 5 天前 | |
fix/docs: 废弃无用内容,调整部分约束 Co-authored-by: liu_zhi_xu<liuzhexu1@huawei.com> # message auto-generated for no-merge-commit merge: !95 merge update into master fix/docs: 废弃无用内容,调整部分约束 Created-by: liu_zhi_xu Commit-by: liu_zhi_xu Merged-by: ascend-robot Description: ## What this PR does / why we need it? 废弃无用内容:add示例冗余做移除 调整部分约束:torch版本放宽,兼容多场景 ## Does this PR introduce any user-facing change? 不涉及 ## How was this patch tested? 不涉及 See merge request: Ascend/MindSpeed-Ops!95 | 9 天前 | |
fix/docs: 废弃无用内容,调整部分约束 Co-authored-by: liu_zhi_xu<liuzhexu1@huawei.com> # message auto-generated for no-merge-commit merge: !95 merge update into master fix/docs: 废弃无用内容,调整部分约束 Created-by: liu_zhi_xu Commit-by: liu_zhi_xu Merged-by: ascend-robot Description: ## What this PR does / why we need it? 废弃无用内容:add示例冗余做移除 调整部分约束:torch版本放宽,兼容多场景 ## Does this PR introduce any user-facing change? 不涉及 ## How was this patch tested? 不涉及 See merge request: Ascend/MindSpeed-Ops!95 | 9 天前 | |
feat: Add add_rms_norm_bias compiletion Co-authored-by: Liccol<740821011@qq.com> # message auto-generated for no-merge-commit merge: !54 merge aclnn-case into master feat: Add add_rms_norm_bias compiletion Created-by: Liccol Commit-by: Liccol Merged-by: ascend-robot Description: ## What this PR does / why we need it? 新增 add_rms_norm_bias 自定义 ACLNN 算子,将逐元素加法(Add)与 RMS 归一化合并为单个 AscendC Kernel 执行,用于 Transformer 模型推理中残差连接 + RMSNorm 的融合优化。 主要变更: - 新增 add_rms_norm_bias 算子源码 - 新增 cann/ 下的 ACLNN 绑定及 torch_binding 算子注册 - 新增 Python 调用接口(api/aclnn/)及 JIT 构建器(op_builder/) - 引入 cmake/common/scripts/utils 等编译工具链及公共组件 - 新增算子使用文档及开发指南(docs/aclnn/) ## Does this PR introduce any user-facing change? 是,新增 npu_add_rms_norm_bias 接口 ## How was this patch tested? 通过单元测试与 CPU 参考实现对比验证: - 对比分离执行 Add + RMSNorm 与融合算子的数值精度 - 覆盖 float32 / float16 / bfloat16 三种数据类型 - 覆盖有 beta / 无 beta 两种场景  See merge request: Ascend/MindSpeed-Ops!54 | 26 天前 |
MindSpeed-Ops
简介
提供昇腾优化的训练业务自定义算子实现
版本说明
| 软件 | 版本 |
|---|---|
| MindSpeed Ops分支 | master |
| CANN版本 | 9.0.0 |
| PyTorch | >=2.7.1 |
| triton-ascend | 3.2.1 |
| Python版本 | >=Python3.10.x |
安装
安装依赖的软件
在安装MindSpeed-Ops之前,请参考版本配套表,安装配套的昇腾软件栈,软件列表如下:
| 依赖软件 | 软件安装指南 |
|---|---|
| 昇腾NPU驱动 | 《驱动固件安装指南》 |
| 昇腾NPU固件 | |
| Toolkit(开发套件) | 《CANN 软件安装指南》 |
| Kernel(算子包) | |
| NNAL(Ascend Transformer Boost加速库) | |
| PyTorch | 《Ascend Extension for PyTorch 配置与安装》 |
| torch_npu插件 | |
| apex |
获取MindSpeed-Ops源码并安装
git clone https://gitcode.com/Ascend/MindSpeed-Ops.git
cd MindSpeed-Ops
# 如果原先有mindspeed_ops安装,请先卸载再重新安装
pip install -e . --extra-index-url=https://triton-ascend.osinfra.cn/pypi/simple --no-build-isolation --no-deps
可选:安装 TileLang-Ascend 以使用 TileLang 算子
MindSpeed-Ops 默认安装流程不会自动编译或安装 TileLang-Ascend。如需使用 mindspeed_ops.api.tilelang
下的算子,请在已安装 CANN、PyTorch 和 torch_npu 的 Ascend 环境中额外安装 TileLang-Ascend。
从源码构建并安装 TileLang-Ascend wheel:
git clone --recursive https://github.com/tile-ai/tilelang-ascend.git
cd tilelang-ascend
source /usr/local/Ascend/ascend-toolkit/latest/set_env.sh
export ASCEND_HOME_PATH=/usr/local/Ascend/ascend-toolkit/latest
./build_wheel_ascend.sh --enable-llvm -v
pip install -U dist/tilelang-*.whl
安装完成后,验证 TileLang-Ascend 和 MindSpeed-Ops 均可正常导入:
python -c "import tilelang; print(tilelang.__version__)"
python -c "from mindspeed_ops.api.tilelang.sinkhorn import sinkhorn; print(sinkhorn)"
支持算子清单
| 算子名称 | 算子描述 | Released | triton | tilelang |
|---|---|---|---|---|
FusedCrossEntropyLoss |
自定义融合算子 | ❌ | √ | ❌ |
RmsnormWithoutWeight |
自定义融合算子 | ❌ | √ | ❌ |
Sinkhorn |
Sinkhorn算法 | ❌ | √ | √ |
Causal_conv1d |
causal_conv1d算子 | ❌ | √ | ❌ |
Wy_fast |
wy_fast算子 | ❌ | √ | ❌ |
RmsNormGated |
RmsNormGated算子 | ❌ | √ | ❌ |
chunk_kda_bwd_wy_dqkg_fused |
KDA chunk backward 融合算子 | ❌ | √ | ❌ |
recompute_w_u_fwd |
GDN recompute_w_u_fwd 算子 | ❌ | √ | ❌ |
Sort_chunks_by_idx |
MoE chunk重排算子 | ❌ | √ | ❌ |
Clipped_swiglu |
GPT-OSS风格SwiGLU-gate融合算子 | ❌ | √ | ❌ |
分支维护策略
🛠️ MindSpeed-Ops 版本分支的维护阶段如下:
| 状态 | 时间 | 说明 |
|---|---|---|
| 计划 🕐 | 1-3 个月 | 计划特性 |
| 开发 🕔 | 3 个月 | 开发特性 |
| 维护 🕚 | 6-12 个月 | 合入所有已解决的问题并发布版本,针对不同的MindSpeed-Ops 版本采取不同的维护策略,常规版本和长期支持版本维护周期分别为6个月和12个月 |
| 无维护 🕛 | 0-3 个月 | 合入所有已解决的问题,无专职维护人员,无版本发布 |
| 生命周期终止(EOL)🚫 | N/A | 分支不再接受任何修改 |
算子开发及合入说明
1、算子合入说明请参考ops.md
2、算子开发可参考使用skills工具:
- triton相关:
triton算子迁移nputriton在npu上优化 - tilelang相关:
tilelang算子迁移npu - 性能采集skills:
算子性能采集
常见问题
| 现象 | 介绍 |
|---|---|
| module 'triton.language' has no attribute 'extract_slice' | 问题介绍 |
免责声明
致MindSpeed-Ops使用者
- MindSpeed-Ops提供的所有内容仅供您用于非商业目的。
- 对于MindSpeed-Ops测试用例以及示例文件中所涉及的各模型和数据集,平台仅用于功能测试,华为不提供任何模型权重和数据集,如您使用这些数据进行训练,请您特别注意应遵守对应模型和数据集的License,如您因使用这些模型和数据集而产生侵权纠纷,华为不承担任何责任。
- 如您在使用MindSpeed-Ops过程中,发现任何问题(包括但不限于功能问题、合规问题),请在GitCode提交issue,我们将及时审视并解决。
License声明
Ascend MindSpeed-Ops中涉及的算子,如目录下存在License的,以该License为准。如目录下不存在License的,以Apache 2.0许可证许可,对应许可证文本可查阅Ascend MindSpeed-Ops根目录。