| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
docs: 移除Markdown文档中中英文及中文与数字之间的空格 Co-authored-by: EliasKaslan<eliaskaslan@outlook.com> # message auto-generated for no-merge-commit merge: !176 merge docs/remove-spaces-cn-en into master docs: 移除Markdown文档中中英文及中文与数字之间的空格 Created-by: EliasKaslan Commit-by: EliasKaslan Merged-by: ascend-robot Description: ## What this PR does / why we need it? 统一MindSpeed Ops文档空格规范:移除所有Markdown文档中中文与英文之间、中文与数字之间的空格。 - 覆盖范围:README、docs/zh、docker、ci、tests、tools等目录共35个Markdown文档,合计2346处空格调整 - 仅删除中英文、中文与数字之间的空格;代码块、行内代码、链接URL、表格结构均保持不变 - 相关章节标题同步调整后,已确认仓库内引用的锚点链接无失效(install_guide.md中被引用的章节标题原本即无空格) - docs/zh/release_notes_ops.md的空格调整由"版本说明按模板重构"的关联PR统一覆盖,避免两个PR改动冲突 ## Does this PR introduce any user-facing change? 无,仅文档格式统一,不涉及任何功能变更。 ## How was this patch tested? CI verification only(文档门禁markdownlint与链接有效性检查)。 See merge request: Ascend/MindSpeed-Ops!176 | 1 个月前 | |
feat(atb): add MatmulAdd operators for fused wgrad accumulation Co-authored-by: Liz<lizhi166@huawei.com> # message auto-generated for no-merge-commit merge: !182 merge master into master feat(atb): add MatmulAdd operators for fused wgrad accumulation Created-by: Liz_ Commit-by: Liz Merged-by: ascend-robot Description: ## What this PR does / why we need it? Megatron gradient accumulation updates the main weight-gradient buffer as grad += grad_output.T @ total_input. The previous decomposed path materializes an [N, K] intermediate and launches a separate add kernel, increasing allocation and memory traffic. This PR adapts the MindSpeed MatmulAdd implementation to MindSpeed-Ops and provides: - npu_matmul_add_fp32 for bf16/fp16 operands accumulated into an fp32 grad; it uses the ATB fused MatmulAdd path on A2/A3 and addmm_ on A5. - npu_matmul_add_fp16 for bf16/fp16 operands and a matching half-precision grad; it replaces matmul + add_ with one in-place addmm_ call. - zero-sized-input protection, chip dispatch, builder integration, public documentation, and expanded unit coverage. - reproducible ATK case definitions and execution plugin for accuracy, device performance, and device memory validation. Generated cases, reports, and logs stay ignored; the final result summary is retained at tests/atk_tests/atb/matmul_add/atk_output/console/SUMMARY.md. This is feature enablement, not a bug fix. Related issue: N/A. ## Does this PR introduce any user-facing change? Yes. NPU callers can import npu_matmul_add_fp32 or npu_matmul_add_fp16 from mindspeed_ops.api.atb.npu_matmul_add. Both APIs mutate grad in place and return None. Inputs must be 2-D tensors with shapes total_input=[M,K], grad_output=[M,N], and grad=[N,K]. Operand dtypes must match and be bf16 or fp16. The fp32 API requires an fp32 grad buffer; the fp16 API requires grad to match the operand dtype. Empty inputs are a no-op. Usage and benchmark documentation: docs/zh/atb/matmul_add.md. ATK reproduction guide: tests/atk_tests/atb/matmul_add/README.md. ## How was this patch tested? Unit test in the 018 environment: - conda activate lz_py312_018 - python -m pytest tests/unit_tests/atb/test_npu_matmul_add.py -q -rs - Result: 8 passed, 7 skipped. The skipped cases require cann-nnal/ATB and were skipped because ATB_HOME_PATH was not set in this environment. ATK 26.4.30 was run on Ascend 910B3 (A2) with CANN 9.0.0 + ATB, Python 3.10, torch 2.7.1, and torch_npu 2.7.1.post4. Each API used 8 cases covering {bf16, fp16} operands across four shape tuples. - Accuracy, NPU vs CPU high-precision reference: fp32 8/8 Pass; fp16 8/8 Pass. - Device performance, fused dev0 vs decomposed dev1: fp32 average ratio 1.3662 with 100% case pass rate; fp16 average ratio 1.0007 with 87.5% case pass rate and overall Pass. - Device memory, fused dev0 vs decomposed dev1: fp32 and fp16 both 8/8 Pass with 100% memory pass rate under the fused/reference <= 1.1 criterion. The A2/A3 fp32 path requires cann-nnal and ATB_HOME_PATH. Its first invocation JIT-builds the C++ extension and takes about 30 seconds; performance measurements must use warmed, cache-hit runs. The public APIs are Ascend NPU-specific and do not provide a CUDA fallback. [RFC](https://gitcode.com/Ascend/MindSpeed-Ops/issues/80) See merge request: Ascend/MindSpeed-Ops!182 | 1 个月前 | |
feat:Add Sinkhorn for DS V4 Co-authored-by: liu_zhi_xu<liuzhexu1@huawei.com> # message auto-generated for no-merge-commit merge: !24 merge sinkhorn into master feat:Add Sinkhorn for DS V4 Created-by: liu_zhi_xu Commit-by: liu_zhi_xu Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1、New model adaptation operator completion [#related roadmap](https://gitcode.com/Ascend/MindSpeed-Ops/issues/1) 2、Operator Description Enhancement for rmsnorm_without_weight 3、Refactor the common test func related Add/RMS/SINK ## Does this PR introduce any user-facing change? Reference Operator Markdown Description ## How was this patch tested? [UT] pytest test_sinkhorn.py  [ATK] atk case -f sinkhorn.yaml -p generate_input.py atk node --backend triton --devices 0 node --backend npu --devices 0 task -c result/sinkhorn/json/all_sinkhorn.json --task performance_device -p sinkhorn.py atk node --backend triton --devices 0 node --backend npu --devices 0 task -c result/sinkhorn/json/all_sinkhorn.json --task accuracy -p sinkhorn.py   See merge request: Ascend/MindSpeed-Ops!24 | 5 个月前 | |
add ATK installation dependencies and operator ATK test case specifications Co-authored-by: wangx700<wangxin700@huawei.com> | 6 个月前 | |
fix(triton): upcast for dhu atk accuracy tests and use num threads = 1 for solve tril/wy fast Co-authored-by: LinMingZhe<linmingzhe3@huawei.com> Co-authored-by: gitcode-bot<noreply@gitcode.com> # message auto-generated for no-merge-commit merge: !79 merge fix0626 into master fix(triton): upcast for dhu atk accuracy tests and use num threads = 1 for solve tril/wy fast Created-by: LinMingZhe Commit-by: LinMingZhe;gitcode-bot Merged-by: ascend-robot Description: ## What this PR does / why we need it? upcast for dhu atk accuracy tests ## Does this PR introduce any user-facing change? NA ## How was this patch tested? ATK & UT    See merge request: Ascend/MindSpeed-Ops!79 | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 5 个月前 | ||
| 6 个月前 | ||
| 3 个月前 |