| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
docs: add performance database collection tooling RFC Co-authored-by: Horacehxw<horacehxw@gmail.com> # message auto-generated for no-merge-commit merge: !182 merge perf-db-collection-tooling-rfc into develop docs: add performance database collection tooling RFC Created-by: Horacehxw Commit-by: Horacehxw Merged-by: ascend-robot Description: **PR Type / PR类型** - [ ] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [x] Docs(文档更新) - [ ] Refactor(代码重构) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 Add a standalone RFC for the performance database collection tooling so the database generation workflow is specified independently from runtime consumption. The RFC assumes the generation capability is introduced by this proposal and documents the file-based pipeline, data contracts, replay-script authoring workflow, validation, and human review requirements. ------ ## 📝 Modification / 修改内容 - Add the Chinese RFC docs/RFC/rfc_performance_database_collection_tooling_zh.md. - Add the English RFC docs/RFC/rfc_performance_database_collection_tooling_en.md. - Define the offline collection pipeline under tools/perf_data_collection/: profiling parsing, FIA metadata enrichment, theory shape-grid generation, per-kernel replay, msprof writeback, HCCL benchmark collection, validation reports, and data lifecycle. - Include the Microbench Run Script Generator workflow from docs/perf_database/skills/microbench/SKILL.md as the contributor process for creating or updating op_replay/<KernelType>_run.py scripts. ------ ## 📐 Associated Test Results / 关联测试结果 - [x] Ran RFC consistency checks for both zh/en files: balanced code fences, no v1.6/original-design references, standalone generation framing, required microbench skill references present. - [x] Ran git diff --cached --check before commit. ------ ## ✅ Checklist / 检查列表 - [ ] Linting tools used / 使用 lintrunner 工具 - [ ] Bug fixes covered by unit tests / 修复的 Bug 已由单元测试覆盖 - [ ] Modification covered by unit tests / 修改已由单元测试覆盖 - [x] Documentation updated / 文档已更新 - [x] No Chinese comments in code files / 代码文件中不含中文注释 See merge request: Ascend/msmodeling!182 | 15 天前 | |
【REFACTOR】CI Gate 联合执行与 Nightly 流水线加固 Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !342 merge fix into develop 【REFACTOR】CI Gate 联合执行与 Nightly 流水线加固 Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: ## 修改原因 CI Gate / Nightly helpers 在 union 重构后存在多处逻辑与体验问题: - 全豁免测试仍跑 Phase 2(#112) - Nightly audit 使用过期 test_map(#113) - coverage fallback 在 union 重构后断裂(#119) - PRODUCT_SOURCE_PREFIXES 与 gate_policy.yaml 双源 roots - 重复 collect/git diff、日志含内部术语、nightly 缺终端摘要 本 PR 统一执行模型并补齐回归测试与文档。 --- ## 修改内容 **CI Gate (scripts/helpers/ci_gate/)** - 预跑硬阻断仅保留删除测试/删除源码;覆盖率映射改为跑后软策略 - compute_execution_plan 联合去重 pytest waves;产品/测试变更时附加 --cov - fetch_diff() 单次 git diff;load_gate_policy 按 yaml mtime 缓存 - roots 单一来源:tests/.ci/gate_policy.yaml - 用户向英文日志与成功摘要 print **Nightly (scripts/helpers/nightly/)** - 过期/冗余审计使用新鲜 test_map(#113) - 终端摘要、英文 phase 标签;移除 drift TODO - allowed_node_ids 复用、弱覆盖符号检测传 mapping **Common / Policy** - coverage_config.py 懒加载 product_roots() - gate_policy.yaml:tests/helpers/** exclude - 文档同步:tests/README.md、docs/design/ut_refactor.md、tests/SKILL.md 关联 issue:#112 #113 #114 #115 #116 #117 #119 #120 #121 #122 #123 #124 --- ## 优化特性对比(Before / After) ### 特性 1:联合去重 pytest 执行(核心优化) **场景**:同一 PR 同时改了产品代码 tensor_cast/foo.py 和测试文件 tests/regression/cli/test_shared.py,且 test_shared.py::test_x 恰好也是 foo.py 在 test_map 里的回归用例。 #### Before(分阶段、可能重复跑) text # 1) 预跑:新源码无 test_map 映射 → 直接硬阻断,pytest 还没跑 BLOCK: tensor_cast/foo.py has no test_map entry for symbol Foo.bar # 2) Phase 0:单独跑一轮带 --cov 的 pytest 做 coverage fallback pytest tests/regression/cli/test_shared.py -m not npu --cov ... # 3) Phase 1:跑变更测试 pytest tests/regression/cli/test_shared.py::test_x -m not npu # 4) Phase 2:再跑映射回归(与 Phase 1 重叠) pytest tests/regression/cli/test_shared.py::test_x \ tests/regression/cli/test_other.py::test_y \ -m "not npu and not nightly and not network" → test_shared.py::test_x 被执行 2~3 次;git diff 可能重复 fetch;coverage 与映射校验割裂 #### After(先跑、后验、去重) text # 1) 预跑硬阻断:仅删测试 / 删源码 Validating hard-blocking policy ... (no block — foo.py 是修改不是删除) # 2) 计划:联合调度,node id 去重(changed-test 优先) Scheduling 2 test node(s): new or changed test file Scheduling 1 test node(s): changed product file mapped regression Sample node(s): tests/regression/cli/test_shared.py::test_x, ... Execution uses 2 pytest wave(s) after deduplication # 3) 单次 union pytest(附带 --cov --cov-context=test) Wave 1 (-m not npu): tests/regression/cli/test_shared.py::test_x # changed-test,只跑一次 Wave 2 (-m not npu and not nightly and not network): tests/regression/cli/test_other.py::test_y # 纯回归,test_x 不再重复 # 4) 跑后软策略:用同一次 .coverage 做 mapping fallback Checking new/modified source coverage mapping against collected data ... CI gate passed: 2 test node(s) (new or changed test file; changed product file mapped regression) → 同一 node 只执行 1 次;coverage fallback 与 pytest 同轮完成;CI 耗时更短、行为更可预期 ### 特性 2:配置变更触发全量,跳过无效 collect **场景**:PR 只改了 pyproject.toml(依赖/测试配置变更)。 #### Before text config change detected → full suite still collect changed test files in Phase 1 ... # 多余 collect pytest tests/ -m not npu #### After text Config path(s): pyproject.toml Selected full test suite: dependency or test configuration changed pytest tests/ -m not npu # changed_test_nodes 为空,跳过 gate_new_tests collect CI gate passed: full test suite (pyproject.toml) ### 特性 3:Nightly 终端摘要(用户可读) #### Before text Phase 2a done. elapsed=1832.4s # 流水线结束,无一行总览;内部 phase 编号 #### After text Nightly pipeline finished. test_map: written (line 74.1%, branch 61.8%) nightly-marked: 142 passed in 1832s benchmark: 38 passed in 412s network: 12 passed in 89s weak coverage symbols: 3 report: /path/to/nightly_report.json --- ## 自验证 ### Helpers 回归测试 目的:确认 CI Gate / Nightly / Common helpers 全量回归通过 步骤: 1. 进入仓库根目录 2. 执行: bash uv run python -m pytest tests/regression/scripts/helpers/ -q 结果: 341 passed, 5 warnings in 1.02s ### gate_policy 缓存失效 目的:确认 yaml mtime 变化后 load_gate_policy 缓存失效 步骤: 1. 运行单测: bash uv run python -m pytest tests/regression/scripts/helpers/ci_gate/test_gate_policy.py::test_load_gate_policy_cached_until_yaml_mtime_changes -v 结果:PASSED(修复同秒写入 mtime 未变导致的 flaky) ### pre-commit 目的:提交前 hook 全绿 步骤: 1. git commit 触发 pre-commit(ruff、pylint、bandit、typos 等) 结果:全部 Passed See merge request: Ascend/msmodeling!342 | 14 天前 | |
refactor(tensor_cast): unify word embedding tp config Co-authored-by: Kudo__shinichi<liuning119@huawei.com> # message auto-generated for no-merge-commit merge: !344 merge codex/word-embedding-tp-normalize into develop refactor(tensor_cast): unify word embedding tp config Created-by: Kudo__shinichi Commit-by: Kudo__shinichi Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [x] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [x] Refactor(代码重构) - [ ] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 word_embedding_tp and word_embedding_tp_mode represented the same configuration concept in two fields: one field toggled word embedding TP, and the other selected the TP mode. This PR reduces the public and internal configuration shape to a single parameter so users only need to configure word_embedding_tp as disabled, col, or row. ------ ## 📝 Modification / 修改内容 - Make UserInputConfig.word_embedding_tp the single nullable word embedding TP mode field. - Remove word_embedding_tp_mode and embedding_parallel_mode from the config model. - Pass the normalized word_embedding_tp mode directly into ParallelConfig.embedding_parallel and the embedding transformation. - Keep legacy bool input normalization for compatibility: True -> col, False/None -> disabled. - Remove redundant CLI-side bool/mode conversion and update related benchmark cases and user guide docs. - Add regression coverage for single-field config, legacy bool normalization, and invalid word_embedding_tp values. ------ ## 📐 Associated Test Results / 关联测试结果 - python -m pytest tests/regression/tensor_cast/test_user_config.py -q: 6 passed - python -m pytest tests/regression/tensor_cast/test_user_config.py tests/regression/web_ui/test_command_builder.py tests/regression/tensor_cast/test_adapter_automation.py -q: 98 passed - python -m pytest tests/regression/tensor_cast/test_text_generate.py -k word_embedding_parallel -q: 2 passed, 113 deselected - python -m pytest tests/regression/tensor_cast/test_sequence_parallel_pass.py -o addopts= -m "nightly and not npu and not network" -q: 2 passed - python -m pytest tests/benchmark/models/test_model_regression.py --collect-only -q: 15 tests collected - python -m ruff check <changed python files>: All checks passed - python -m pre_commit run --from-ref origin/develop --to-ref HEAD: passed - git diff --check HEAD~1 HEAD: passed ------ ## 🌟 Use cases (Optional) / 使用案例(可选) - Disable word embedding TP: word_embedding_tp=None - Enable column mode: word_embedding_tp="col" - Enable row mode: word_embedding_tp="row" - CLI usage: --word-embedding-tp col or --word-embedding-tp row ------ ## ✅ Checklist / 检查列表 **Before PR**: - [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [x] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [x] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!344 | 14 天前 | |
【FIX】【TEST】修复 README/文档失效链接并默认运行完整 benchmark 套件 Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !331 merge fix into develop 【FIX】【TEST】修复 README/文档失效链接并默认运行完整 benchmark 套件 Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: ## 修改原因 1. README.md 社区区公众号二维码指向 msinsight 仓库旧路径,资源已 404,用户扫码/预览失败。 2. OP_PLUGIN_MAPPING_TUTORIAL.md 中 Op Mapping skill 相对路径错误,文档内链接跳转失败。 3. benchmark 入口默认只跑 tests/benchmark/ops/,tests/benchmark/models/ 模型回归被静默跳过,CI/nightly 覆盖不足。 4. 全量 benchmark 启用后,qwen3-30b-a3b decode/prefill baseline 与当前 compile 输出不一致,需刷新。 --- ## 修改内容 | 类别 | 文件 | 变更 | |------|------|------| | 文档链接 | README.md | 公众号图片 URL 换为可用 user-images 资源;TOC 补全 Contributions / Community 等章节锚点 | | 文档链接 | docs/perf_database/tutorial/OP_PLUGIN_MAPPING_TUTORIAL.md | skill 路径 ../skills/... → ../../../.agents/skills/op-mapping/SKILL.md | | benchmark 默认行为 | scripts/run_benchmark.sh、scripts/helpers/nightly/main.py | 移除 MSMODELING_BENCHMARK_MODELS 开关,固定跑 tests/benchmark/ 全目录 | | 设计文档 | docs/design/ut_refactor.md | 同步 benchmark phase 描述 | | baseline | tests/benchmark/models/cases/qwen3-30b-a3b-{decode,prefill}.json | 刷新 baseline_time_s 与 operator top-N | | lint | experimental/optix/、scripts/、tensor_cast/、tests/ 等 | 为 inspect.* 误报补 pylint: disable 注释 | --- ## 自验证 ### README 公众号图片链接 目的:确认旧链接 404、新链接可访问。 步骤: 1. 检查旧 URL HTTP 状态 2. 检查新 URL HTTP 状态 bash curl -sI "https://raw.gitcode.com/Ascend/msinsight/raw/master/docs/zh/user_guide/figures/readme/officialAccount.jpg" | head -1 curl -sI "https://raw.gitcode.com/user-images/assets/8428112/2a22a707-de26-4bb3-b312-4952035e021b/30be980e7fd65b2486d251b48a7999f3.jpg" | head -1 结果: text HTTP/1.1 404 Not Found HTTP/1.1 200 OK ### Op Mapping skill 文档路径 目的:确认教程内链接指向真实文件。 步骤: 1. 在仓库根目录检查 skill 文件是否存在 bash test -f .agents/skills/op-mapping/SKILL.md && echo OK 结果: text OK ### Benchmark 入口默认全量 目的:确认 run_benchmark.sh 不再依赖 MSMODELING_BENCHMARK_MODELS,默认覆盖 models 子目录。 步骤: 1. 查看脚本 benchmark target 配置 bash grep -n "TESTS_BENCHMARK" scripts/run_benchmark.sh 结果: text run_pytest "${TESTS_BENCHMARK}/" \ ### CI 流水线 目的:确认改动未破坏现有 CI/docs CI。 步骤: 1. 查看 PR #331 CI label 状态 结果:PR 已打标 ci-pipeline-passed、docs-ci-pipeline-success。 See merge request: Ascend/msmodeling!331 | 15 天前 | |
refactor(tensor_cast): unify word embedding tp config Co-authored-by: Kudo__shinichi<liuning119@huawei.com> # message auto-generated for no-merge-commit merge: !344 merge codex/word-embedding-tp-normalize into develop refactor(tensor_cast): unify word embedding tp config Created-by: Kudo__shinichi Commit-by: Kudo__shinichi Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [x] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [x] Refactor(代码重构) - [ ] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 word_embedding_tp and word_embedding_tp_mode represented the same configuration concept in two fields: one field toggled word embedding TP, and the other selected the TP mode. This PR reduces the public and internal configuration shape to a single parameter so users only need to configure word_embedding_tp as disabled, col, or row. ------ ## 📝 Modification / 修改内容 - Make UserInputConfig.word_embedding_tp the single nullable word embedding TP mode field. - Remove word_embedding_tp_mode and embedding_parallel_mode from the config model. - Pass the normalized word_embedding_tp mode directly into ParallelConfig.embedding_parallel and the embedding transformation. - Keep legacy bool input normalization for compatibility: True -> col, False/None -> disabled. - Remove redundant CLI-side bool/mode conversion and update related benchmark cases and user guide docs. - Add regression coverage for single-field config, legacy bool normalization, and invalid word_embedding_tp values. ------ ## 📐 Associated Test Results / 关联测试结果 - python -m pytest tests/regression/tensor_cast/test_user_config.py -q: 6 passed - python -m pytest tests/regression/tensor_cast/test_user_config.py tests/regression/web_ui/test_command_builder.py tests/regression/tensor_cast/test_adapter_automation.py -q: 98 passed - python -m pytest tests/regression/tensor_cast/test_text_generate.py -k word_embedding_parallel -q: 2 passed, 113 deselected - python -m pytest tests/regression/tensor_cast/test_sequence_parallel_pass.py -o addopts= -m "nightly and not npu and not network" -q: 2 passed - python -m pytest tests/benchmark/models/test_model_regression.py --collect-only -q: 15 tests collected - python -m ruff check <changed python files>: All checks passed - python -m pre_commit run --from-ref origin/develop --to-ref HEAD: passed - git diff --check HEAD~1 HEAD: passed ------ ## 🌟 Use cases (Optional) / 使用案例(可选) - Disable word embedding TP: word_embedding_tp=None - Enable column mode: word_embedding_tp="col" - Enable row mode: word_embedding_tp="row" - CLI usage: --word-embedding-tp col or --word-embedding-tp row ------ ## ✅ Checklist / 检查列表 **Before PR**: - [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [x] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [x] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!344 | 14 天前 |