| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feature: 引入 markdownlint 做文档语法检查,清理存量问题 Co-authored-by: wangjiangben<wangjiangben@huawei.com> # message auto-generated for no-merge-commit merge: !150 merge master into master feature: 引入 markdownlint 做文档语法检查,清理存量问题 Created-by: wangjiangben Commit-by: wangjiangben Merged-by: ascend-robot Description: # feature: 引入 markdownlint 做文档语法检查,清理存量问题 ## 概述 为仓库引入 **markdownlint-cli**(pre-commit 集成)做 Markdown 语法检查,并一次性清理存量问题, npx markdownlint-cli --config .markdownlint.yaml "**/*.md" 现为 0 issues。 裁剪了与中文正文、原生 HTML、多阶段标题冲突的风格规则,只保留真语法/结构检查;配置文件 .markdownlint.yaml 可被 VS Code markdownlint 扩展直接读取,本地编辑即时提示。 ## 变更清单 ### 新增 | 文件 | 说明 | |------|------| | .markdownlint.yaml | lint 配置:默认规则 + 规则裁剪 | | .markdownlintignore | 忽略清单(node_modules、.npm-cache、docs/zh/_menu.md) | ### 修改 | 文件 | 说明 | |------|------| | .pre-commit-config.yaml | 新增 markdownlint hook(rev v0.47.0) | | README.md | 失效锚点 #版本配套表 → #版本说明;补表格尾竖线 | | docs/zh/install_guide.md | 非描述性链接 [Link] → [TorchNPU插件版本] | | docs/zh/introduction.md | 图片补 alt | | ci/CI_GUID.md 及 docs/zh/**、tests/unit_tests/README.md、tools/skills/** 共 12 个 md | --fix 空行/列表标记/裸链接清理 | | tools/skills/operator-performance-profile/SKILL.md | 修复 130+ 处 emoji 乱码、14 处内联代码块、front matter 未转义引号 | ## 规则裁剪 | 关闭的规则 | 原因 | |------|------| | MD013 行宽 | 中文 + 宽表格 | | MD025 | 手册型文档多 H1 | | MD033 | <term>/<table> 原生 HTML | | MD036 | **表 1** 加粗题注 | | MD040 | shell/text 代码块未标注语言 | | MD060 | 表格 compact 风格不强制对齐 | | MD024(放宽 siblings_only) | 允许不同章节同名标题 | 保留语法关键规则:MD011/MD034/MD042/MD051(链接)、MD022/MD031/MD032(空行包裹)、MD009/MD047(尾随空格/末尾换行)、MD012/MD007/MD029/MD030(空行/列表)等。 ## 验证 bash npx markdownlint-cli --config .markdownlint.yaml "**/*.md" # 结果:0 issues 基线从约 1600 条违规收敛到 0:关闭风格类规则 → 约 230 条结构类问题,--fix 清约 230 处,手工修 4 处语义问题,重写 SKILL.md 乱码,最终归零。 ## 相关 - RFC:[[RFC]: MindSpeed-Ops 引入 markdownlint 做文档语法检查](https://gitcode.com/Ascend/MindSpeed-Ops/issues/64) See merge request: Ascend/MindSpeed-Ops!150 | 1 个月前 | |
test: update ci dockerflie Co-authored-by: Raining__<wangruining5@huawei.com> # message auto-generated for no-merge-commit merge: !124 merge test/docker_for_ci into master test: update ci dockerflie Created-by: Raining__ Commit-by: Raining__ Merged-by: ascend-robot Description: ## What this PR does / why we need it? Update ci dockerflie to commercial packages 0.26.0. ## Does this PR introduce any user-facing change? NA. ## How was this patch tested? Build a docker image and a container to run unit tests. The building process was success and ut tests are normal.  See merge request: Ascend/MindSpeed-Ops!124 | 2 个月前 | |
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 个月前 | |
test: CI build for resource pool Co-authored-by: Raining__<wangruining5@huawei.com> # message auto-generated for no-merge-commit merge: !112 merge debug_ci into master test: CI build for resource pool Created-by: Raining__ Commit-by: Raining__ Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. bash script for CI added. 2. preparations for CI pipeline switching into the resource pool. ## Does this PR introduce any user-facing change? The ci pipeline always runs for almost an hour. ## How was this patch tested? CI UT tests pass in test machine.  See merge request: Ascend/MindSpeed-Ops!112 | 3 个月前 | |
test: update ci dockerflie Co-authored-by: Raining__<wangruining5@huawei.com> # message auto-generated for no-merge-commit merge: !124 merge test/docker_for_ci into master test: update ci dockerflie Created-by: Raining__ Commit-by: Raining__ Merged-by: ascend-robot Description: ## What this PR does / why we need it? Update ci dockerflie to commercial packages 0.26.0. ## Does this PR introduce any user-facing change? NA. ## How was this patch tested? Build a docker image and a container to run unit tests. The building process was success and ut tests are normal.  See merge request: Ascend/MindSpeed-Ops!124 | 2 个月前 | |
test: provide dockerfile for CI Co-authored-by: Raining__<wangruining5@huawei.com> # message auto-generated for no-merge-commit merge: !104 merge test/docker-for-ci into master test: provide dockerfile for CI Created-by: Raining__ Commit-by: Raining__ Merged-by: ascend-robot Description: ## What this PR does / why we need it? Provide dockerfile for CI. ## Does this PR introduce any user-facing change? NA. ## How was this patch tested? Self test by UT.  See merge request: Ascend/MindSpeed-Ops!104 | 3 个月前 | |
test: provide dockerfile for CI Co-authored-by: Raining__<wangruining5@huawei.com> # message auto-generated for no-merge-commit merge: !104 merge test/docker-for-ci into master test: provide dockerfile for CI Created-by: Raining__ Commit-by: Raining__ Merged-by: ascend-robot Description: ## What this PR does / why we need it? Provide dockerfile for CI. ## Does this PR introduce any user-facing change? NA. ## How was this patch tested? Self test by UT.  See merge request: Ascend/MindSpeed-Ops!104 | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 2 个月前 | ||
| 1 个月前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 3 个月前 |