From 4eef72ee00e8d1f7792c79d79519da60705608bd Mon Sep 17 00:00:00 2001 From: jiangkuaixue123 Date: Wed, 18 Nov 2026 14:14:05 +0800 Subject: [PATCH 1/2] knowledge: retire the CannBot stage-evidence extension from #114 Signed-off-by: jiangkuaixue123 --- docs/reference-matrix.md | 1 - docs/reviews/issue91-cannbot.md | 81 ------------- docs/searchspace-matrix.md | 1 - .../data/skill_library/hardware/README.md | 2 +- .../ascend-performance-analysis/SKILL.md | 17 +-- .../ascend-performance-analysis/metadata.json | 46 ++----- .../references/cannbot-CANN-2.0-LICENSE.md | 38 ------ .../references/cannbot-stage-evidence.md | 112 ------------------ .../hardware/source-inventory.json | 14 +-- 9 files changed, 10 insertions(+), 302 deletions(-) delete mode 100644 docs/reviews/issue91-cannbot.md delete mode 100644 src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-CANN-2.0-LICENSE.md delete mode 100644 src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md diff --git a/docs/reference-matrix.md b/docs/reference-matrix.md index fcca4bc13..b289750b7 100644 --- a/docs/reference-matrix.md +++ b/docs/reference-matrix.md @@ -63,7 +63,6 @@ Reading rules: | NVIDIA/TensorRT-LLM @ f33e0e5fd | skill-doc-only (`.claude/skills/`) | mined — evidence taxonomy, kernel writing, casebook, roofline refs → `dense-performance-evidence`, `kernel-writing-guide`, `inference-optimization-casebook`, `performance-ceiling-analysis` | mined — host overhead verdict + line-profiling loop → `host-overhead-profiling`, `host-overhead-optimization` | mined — weight-movement/overlap + KV host-cache patterns → `weight-loading-optimization`; disk-level: negative (see below) | out-of-scope — host/device weight-movement overlap remains in RAM/Storage, not network coverage | mined — CPU affinity rule + env preflight → `os-process-placement` | | Ascend/MindIE-SD @ 8481d39 | skill-doc-only (`.agents/skills/`) | mined — 5-layer analysis, bottleneck casebook → `ascend-performance-analysis`, `ascend-optimization-casebook` | mined — host-opt async/pattern sections → `weight-loading-optimization` | mined — load-path judgment, fixed-overhead accounting, offload tiers, weights-prep → `weight-loading-optimization` | mined — USP strategy, masking formula, topology rules → `ascend-distributed-parallel` | mined — device health, card-group contracts, measurement discipline → `ascend-device-health` | | ascend-ai-coding/awesome-ascend-skills @ 75ec89c | Historical skill/document import (`skills/`, `external/cannbot/`), not whole native repository mining; separate communication-wrapper source slice pinned to `75ec89ce9d401be8ac95980e1c3f42f8d4315057` | mined — graph mode, operator profiling/tuning, tiling design → `ascend-graph-mode`, `ascend-operator-profiling`, `ascend-operator-tuning`, `ascendc-tiling-design` | assessed/deferred — KV overview and async-stream recipe lack a complete transfer/completion implementation and retain cannbot license UNKNOWN; [boundary/readset](reviews/issue91-awesome-ascend.md#host-kv-boundary); no new RAM capability | mined — device-side prefetch + diffusers CPU-offload playbook → `weight-loading-optimization`; disk-level: negative | mined (wrapper-source only) — native/PyTorch test selection, tensor-byte meaning, timing/oracle coverage and rank-map counterexamples → `ascend-distributed-parallel`; [full-pin readset](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-distributed-parallel/references/awesome-ascend-communication-tests.md); no native-collective or transport audit | mined — env checks, device-busy preflight, thread/env tables → `os-process-placement` | -| cann/cannbot @ `c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110` (selected official plugin: CANN-2.0) | Direct canonical Git source inspection, 2026-10-23; fixed-stage model-inference workflow, three role instructions, registered callbacks and archive helper; [readset/trace/license](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md); dependent skills/recipes and host execution unread/unrun | mined (one source-derived rule) — current-stage execution, actual quality result and comparable baseline versus lexical callback completion → [ascend-performance-analysis](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md); no numerical/backend/performance qualification | out-of-scope — no host-memory mechanism extracted | out-of-scope — progress-file I/O is not storage optimization | out-of-scope — workflow instructions do not establish collective/transport implementation | out-of-scope — agent workflow is not OS scheduling | | vllm-project/vllm-ascend @ bc8115ed | skill-doc-only (`.agents/`); [version/responsibility routing](../src/inferrsi/knowledge/data/skill_library/README.md#vllm-ascend-version-and-responsibility-routing) | mined — FP8/KV-replication/multimodal adaptation → `ascend-model-adaptation` | unknown — runtime host logic not in sparse checkout | mined — FP8 paired-tensor loading pattern → `ascend-model-adaptation` (Configure cell); runtime loader not in checkout | unknown | mined — Dockerfile thread/env ship defaults → `os-process-placement` (historical defaults only) | | vllm-project/vllm @ `7f730b4cea9a66520a9200265928ebe016b48a39` (Apache-2.0) | Dot bundle-mediated; `scheduler.py` admission/budgets/preemption/deferred frees and connector `v1/base.py` contracts/consumers; concrete connector, worker, cache-manager internals, config schema and tests unread | mined — independent admission budgets and async-KV readiness → `diagnose-vllm-admission-pressure`; completion/retention/failure ownership → `audit-vllm-kv-lifetimes`; conditional proposals and unrun verification only | out-of-scope — device KV is not host RAM | out-of-scope — external-hit API establishes no physical tier | out-of-scope — connector contract is not transport implementation | out-of-scope — engine scheduling is not OS priority control | | vllm-project/vllm-ascend @ `8a8e1e05ecb64a30804c99c8f362909f9a0cb5bf` (Apache-2.0; separate runtime pin) | Dot bundle-mediated; `compilation/acl_graph.py`, pinned graph-mode guide and selected `test_acl_graph.py` cases; tests inspected by supplier, not run; caller/ENPU ordering and helpers untraced; native single-tier spec/worker, registration and DMA binding read directly ([seven-file ledger](../src/inferrsi/knowledge/data/skill_library/hardware/host/host-memory-management/references/vllm-ascend-native-offload-readset.json)); external vLLM dependencies unpinned; [separate model-adapter routing](../src/inferrsi/knowledge/data/skill_library/README.md#vllm-ascend-version-and-responsibility-routing) | mined — effective dispatch, caller-owned stable inputs, branch-specific replay/update order and capture-resource failures → `ascend-aclgraph-capture-replay`; separate from the older skill-doc pin | mined — normal event-query-gated CPU descriptor-pool ownership and wait/recycle distinction → [host-memory-management](../src/inferrsi/knowledge/data/skill_library/hardware/host/host-memory-management/SKILL.md); source candidate, native tests not run; shared/tiering and allocator behavior excluded | out-of-scope | out-of-scope — offloader synchronization is not network evidence | out-of-scope — ACLGraph runtime supplies no new OS-control evidence; older Dockerfile/thread-env defaults remain scoped to bc8115ed | diff --git a/docs/reviews/issue91-cannbot.md b/docs/reviews/issue91-cannbot.md deleted file mode 100644 index 235270f0a..000000000 --- a/docs/reviews/issue91-cannbot.md +++ /dev/null @@ -1,81 +0,0 @@ -# Canonical CannBot stage-evidence extension - -Refs [issue #91](https://github.com/InferMatrixLab/InferRSI/issues/91). - -## Construction and ownership - -- Source anchor `z`: canonical `cann/cannbot` at - `c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110`, tree - `a381cd1241541bde9f881bbe12f5b97caa671b7c`, independently retrieved from - its anonymous public Git endpoint on 2026-10-23. No mirror substitutes for it. -- Capability `Q`: one decision rule for accepting a fixed-stage PyTorch/Ascend - optimization report: current execution identity, quality result and comparable - measurements must agree; callback completion has a narrower meaning. -- Evidence `X`: the bounded [source ledger and trace](../../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md). - Exact Git objects establish identity; source reading establishes instructions - and callback predicates. No upstream code, installer, agent host, model, API, - device or paid evaluation was executed. -- Strategy: `reuse-existing`, AREX `distill-ml-knowledge` + `extend-repo-skill` - with bounded `verify-repo-skill` checks, at AREX revision - `ac3fe1afa80fb9a09775ecfb2b6cc3ba850a2db6`. Scope → ground → construct → - verify uses InferRSI's existing registry/readers. Its candidate-case report - and typed source contracts replace the external managed-import layout; no - DisCo deployment, license-field migration or additional registry is added. -- Material author: Codex / `gpt-6.1-sol`, effort `xhigh`. - -| Existing responsibility | Decision | -|---|---| -| `ascend-performance-analysis`: NPU profile diagnosis and shared-machine measurement discipline | Sole extended owner; preserve stable ID, candidate maturity and prior five-layer procedure | -| `inference-benchmark-design`: controlled comparison; `dense-performance-evidence`: claim/evidence levels | Refer to their responsibilities without duplicating their procedures | -| `ascend-operator-tuning` / `ascend-operator-profiling`: single-operator tuning and metrics | Preserve; this extension concerns model-stage report acceptance | -| Historical awesome-ascend-skills / `cannbot-skills` material | Preserve pins and UNKNOWN license boundaries; the canonical app is a separate source | - -The fixed flow has an actual source-level chain: baseline metadata production -and consumption → stage-2 KV/attention analysis → confirmed implementation → -reviewer validation → primary-agent repair/diagnosis/advance decisions. These -are workflow instructions. The registered hooks check selected writes, -progress-read markers, self-check words and retry counts; their exit codes -require host integration to affect execution. The reference states each -producer, consumer, condition and boundary. It does not import KV implementation, -default accuracy thresholds, or an execution authority from the source. - -The selected source license is **CANN Open Software License Agreement Version -2.0** (`CANN-2.0` in both plugin manifests). The complete agreement and Huawei -copyright attribution accompany the new reference. Its stated Huawei-system -purpose and notice/distribution conditions remain explicit. No generic license -or compatibility conclusion is made, and no implementation is copied. - -```mermaid -flowchart LR - S["Canonical CannBot pin
workflow + roles + callback predicates"] --> R["Stage-evidence reference
selected CANN-2.0 agreement + notices"] - R --> K["Existing Ascend performance-analysis owner
candidate; prior procedure preserved"] - K --> A["Existing metadata catalog
selected instruction/resource readers"] - R --> M["Two matrices
source-derived accelerator procedure only"] - S --> C["Proposed cases below
agent efficacy not evaluated"] -``` - -## Proposed old/new regression cases - -These are independently specified review cases, not agent outputs or executed -tests. Apply identical prompts and rubrics to exact pre-extension and extended -bundles in a future separately authorized evaluation. Record independent -answers, source support and missing coverage. No unmerged comparison runner -is used. Agent efficacy is **not evaluated**; model/backend/serving coverage -is **uncovered** by these proposed cases. - -| Case / copyable request | Expected observations | Reject | -|---|---|---| -| New positive: “Our stage-2 report links the current model/stage/candidate revision, logs showing the changed attention module ran, matched baseline inputs/configuration, the frozen validator's successful result and comparable prefill/decode measurements. What conclusion can we accept?” | Check actual artifact identities and boundaries; allow only the demonstrated stage conclusion, then use the existing profile pipeline for attribution; retain separate whole-model/serving scope | Hook success substitutes for inspecting artifacts; stage success becomes L4/whole-model qualification | -| New negative: “The stop callback returned zero. The self-check has all required headings but says compilation failed and output was abnormal; it links no validator output. Can we mark accuracy PASS?” | Keyword presence is the inspected predicate, with no value/numerical check; zero may also occur without readable progress. A recorded failed frozen gate is FAIL; otherwise absent numerical evidence is INCONCLUSIVE. Request the current stage's loaded-code and actual validator artifacts | Reported exit zero or a keyword-complete section proves numerical success; claim a reproduced host defect | -| New identity variant: “Two model directories contain progress.md. The newer file has a successful report for another model/stage. Our changed module has no execution log. Which report can support our timing claim?” | Stop helper selects newest-by-mtime, while the acceptance rule requires current model/stage/revision and actual execution; withhold this claim and identify the missing binding | Newest file or marker existence proves the requested model was tested; treat the hypothetical as an observed run | -| New baseline variant: “The model could not run until multi-card stage 1. May we attribute later KV-stage gains to the earlier parallel-validation timing?” | Source instructs collecting the runnable deployment baseline after parallel verification and ignoring the earlier timing for later comparisons; inspect current inputs/configuration, oracle and measurement boundaries | File presence proves comparability; a configuration/card-count change is silently counted as the KV-stage gain | -| Existing regression: “A hypothetical step trace has Computing=40, Communication=20, Overlapped=15 and Free=10 in one consistent unit. The summed communication-stream durations are larger. How should we classify the step before proposing a fix?” | Preserve the existing four-tuple method: exposed communication is 5, utilization denominator is 40+5+10; do not substitute summed overlapping durations. Check capture/column quality and continue the five-layer diagnosis without inventing a performance gain | Remove or bypass the old pipeline; sum overlapping streams; call a source-only deduction a device measurement | - -## Verification boundary - -Deterministic schema, catalog/reader, resource/link and source-identity results, -the tested snapshot and the generated-index source revision belong in the PR's -checked-content evidence. They establish discoverability and packaging, not -accuracy, gain or agent efficacy. Source hook evaluation, host blocking behavior, -NPU/model execution and per-case agent comparison remain not_run/not evaluated. -Independent review and publication do not close all of issue #91. diff --git a/docs/searchspace-matrix.md b/docs/searchspace-matrix.md index 916c92920..e475b053e 100644 --- a/docs/searchspace-matrix.md +++ b/docs/searchspace-matrix.md @@ -49,7 +49,6 @@ The primary compute and HBM resource. Most current work lives here. | **Optimize** | Bounded experiment selection, distinct mechanism hypotheses, incumbent preservation and final-artifact integrity | `optimization-search-policy` | [Sarathi chunk-budget case](../src/inferrsi/knowledge/data/skill_library/methods/optimization-search-policy/cases/sarathi-chunk-budget.md): decode-first accounting, prefill overhead and TTFT/TBT tradeoffs; no universal budget. [Infera provenance](../src/inferrsi/knowledge/data/skill_library/methods/calibrate-serving-simulation/references/infera-serving-search/README.md) adds a seed-only comparator and evaluated-trial ledger example; its trace-ranking check is proposed. Methodology provenance stays in Reference Matrix §2; no hardware coverage from agent-paper scores | vllm-evolve @ 43cc82c; scoped A/F paper amendments; separate Sarathi case and bounded Infera Git readset in Reference Matrix | 🟢 (source-derived candidate procedure; empirical not_run) | | **Optimize** | Bounded multistream overlap: dependency-DAG constrained (data/state/event/collective_order edges; shared input ≠ dependency), minimal-first, execution-mode sync contract (eager streams vs TorchAir) | `cann-attribution-overlap` | Metric separation (wall / union-of-busy / summed durations / summed duration+wait; repeated-instance product = estimate); device-memory domain qualification; formula conflicts carried unresolved | cann/oam-tools @ 8440935f (pack-mediated, wave 6) | 🟢 | | **Verify** | Evidence taxonomy (L0 correctness → L5 production), claim-evidence matching | `dense-performance-evidence`, `rsi-evidence`, `claim-contract` | InferRSI PASS/FAIL/INCONCLUSIVE protocol | InferRSI @ 4c8e1285 | 🟢 | -| **Diagnose / Verify** | Fixed-stage PyTorch/Ascend model report: bind current stage and actually loaded candidate to quality-validator output and comparable baseline | [ascend-performance-analysis](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md) | [Stage-evidence rule](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md): workflow instructions versus registered marker/keyword checks; completion is not numerical validation | canonical cann/cannbot @ c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110; selected CANN-2.0 scope | Candidate procedure only; host/model/backend not_run, agent efficacy not evaluated; no new measured coverage | | **Verify** | Same-window A/B protocol, noise floor, acceptance-state discipline; correctness-first overlap acceptance (fallback works, no KV/state reorder, actual overlap, no outside-module regression) | `ascend-optimization-casebook` (evidence-required section per case), `dense-performance-evidence`, `rsi-evidence`, `cann-attribution-overlap` | MindIE-SD perf-gate protocol: exploration vs acceptance state, three-proof requirement | MindIE-SD perf-gate @ 8481d39b; cann/oam-tools @ 8440935f | 🟢 | | **Observe / Configure / Optimize** | DALI CPU/GPU queue overlap and operator buffer sizing under explicit executor-mode gates | `training-input-pipeline` | Separated queues require async+pipelined and non-dynamic mode; output synchronization retained | Reference B1, DALI @ 6fe47c48d3b0 | 🟢 (Python API evidence, not C++/device validation) | | **Diagnose / Configure / Optimize** | Training capacity versus throughput, parameter/optimizer tier budgets, recomputation/offload choices; DCP exposed staging pause | `training-resource-budget`, `dcp-async-save-performance` | DeepSpeed stage gates; expert MFU/HFU denominator discipline; historical MindSpeed selection/allocator/rescue source boundaries | Reference CR1, CR6, CR5, C1 async-only | 🟢 (MindSpeed historical source candidate; current support unqualified) | diff --git a/src/inferrsi/knowledge/data/skill_library/hardware/README.md b/src/inferrsi/knowledge/data/skill_library/hardware/README.md index 54ed1b7e2..ce3a3550d 100644 --- a/src/inferrsi/knowledge/data/skill_library/hardware/README.md +++ b/src/inferrsi/knowledge/data/skill_library/hardware/README.md @@ -43,7 +43,7 @@ measured gain, compatible combined stack or new empirical coverage. | [Operator profiling](ascend/ascend-operator-profiling/SKILL.md) | Imported mirrored profiling procedure; named summary helper is not bundled | | [Operator tuning](ascend/ascend-operator-tuning/SKILL.md) | Mirrored PyPTO skill/playbook distillation; reported analyzer behavior and cases are not native validation | | [Optimization casebook](ascend/ascend-optimization-casebook/SKILL.md) | Upstream skill-derived cases and inferences; no independent local reruns | -| [Performance analysis](ascend/ascend-performance-analysis/SKILL.md) | MindIE-SD guidance plus direct CannBot workflow/callback/helper reads; callback completion is not numerical evidence | +| [Performance analysis](ascend/ascend-performance-analysis/SKILL.md) | MindIE-SD profiling and shared-machine measurement guidance | | [Video diffusion](ascend/ascend-video-diffusion-optimization/SKILL.md) | First-hand workflow/field notes, explicitly non-reproducible as published | | [AscendC tiling](ascend/ascendc-tiling-design/SKILL.md) | Mirrored skill/reference distillation; chip-specific formulas and unwritten operator classes retain their limits | | [CANN attribution and overlap](ascend/cann-attribution-overlap/SKILL.md) | Supplied skill/reference/script pack; import and later revisions remain separate, original lineage equivalence unknown | diff --git a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md b/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md index 51e6096b5..1b44edd99 100644 --- a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md +++ b/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md @@ -1,6 +1,6 @@ --- name: ascend-performance-analysis -description: 'Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys, ncu, SOL%, roofline) to their NPU equivalents (msprof, torch_npu.profiler, CSV/JSON outputs, AI Core utilization, HCCL communication analysis). Covers measurement discipline on shared NPU machines and evidence acceptance for automated NPU optimization stages. Use when profiling data is available or a stage report needs its execution and validation evidence checked. +description: 'Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys, ncu, SOL%, roofline) to their NPU equivalents (msprof, torch_npu.profiler, CSV/JSON outputs, AI Core utilization, HCCL communication analysis). Covers measurement discipline on shared NPU machines. Use when profiling data is available and you need to find the bottleneck and its cause. ' --- @@ -11,21 +11,6 @@ Status: candidate. Source-grounded from MindIE-SD @ 8481d39b. Device-specific claims are unverified locally (no NPU on this machine). Verify against CANN docs and actual profiler outputs before using. -## Accepting an automated optimization stage - -For a CannBot fixed-stage model-inference report, first use the -[stage-evidence reference](references/cannbot-stage-evidence.md). Bind the model, -current stage and loaded candidate code to the baseline, actual quality-validator -output and comparable measurement artifacts before accepting a stage conclusion. -Progress-file markers and self-check keywords establish only the conditions -their callbacks inspect; they do not establish numerical accuracy or a speedup. -Missing execution or validator evidence leaves the conclusion `INCONCLUSIVE`; -an observed validator failure remains `FAIL` under the frozen campaign gate. - -This source-derived candidate rule adds no device result or new numeric bar. -The existing five-layer analysis and shared-machine measurement procedure below -remain the path for interpreting valid profiling evidence. - ## GPU→NPU concept mapping | GPU concept | Ascend equivalent | Notes | diff --git a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/metadata.json b/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/metadata.json index 13ba90189..57d743ba1 100644 --- a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/metadata.json +++ b/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/metadata.json @@ -13,56 +13,24 @@ "origin": [ "external" ], - "sources": [ - { - "type": "git", - "url": "https://gitcode.com/cann/cannbot", - "commit": "c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110", - "paths": [ - "LICENSE", - "README.md", - ".gitmodules", - "plugins-official/LICENSE", - "plugins-official/README.md", - "plugins-official/model-infer-optimize/.claude-plugin/plugin.json", - "plugins-official/model-infer-optimize/.codex-plugin/plugin.json", - "plugins-official/model-infer-optimize/AGENTS.md", - "plugins-official/model-infer-optimize/plugin-sources.json", - "plugins-official/model-infer-optimize/plugin-install.json", - "plugins-official/model-infer-optimize/workflows/optimize-workflow.md", - "plugins-official/model-infer-optimize/agents/model-infer-analyzer.md", - "plugins-official/model-infer-optimize/agents/model-infer-implementer.md", - "plugins-official/model-infer-optimize/agents/model-infer-reviewer.md", - "plugins-official/model-infer-optimize/hooks/hooks.json", - "plugins-official/model-infer-optimize/hooks/pre_tool_use.py", - "plugins-official/model-infer-optimize/hooks/post_tool_use.py", - "plugins-official/model-infer-optimize/hooks/subagent_stop.py", - "plugins-official/model-infer-optimize/workflows/scripts/archive_progress.py" - ], - "readset": "references/cannbot-stage-evidence.md" - } - ], + "sources": [], "empirical_validation": "not_run", "limitations": [ "Source-derived candidate; no local efficacy validation.", - "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", - "Only the incremental canonical CannBot fixed-stage evidence boundary is normalized; inherited MindIE-SD guidance remains unchanged.", - "CannBot callback predicates do not establish numerical accuracy or performance; dependent skills, agent-host integration and NPU execution are unverified." - ], - "provenance_readsets": [ - "references/cannbot-stage-evidence.md" + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets." ], + "provenance_readsets": [], "consumption_mode": "packaged", "applicability": { - "scope": "Interpret Ascend CANN profiling evidence from step breakdown through kernel/utilization/communication analysis, and assess execution/validator evidence in automated optimization-stage reports.", + "scope": "Interpret Ascend CANN profiling evidence from step breakdown through kernel/utilization/communication analysis.", "prerequisites": "Usable warm-state captures with representative steps, required files and non-null utilization columns; healthy cards and a consistent valid topology for multi-card comparisons.", - "input_contract": "CANN step/kernel/utilization/communication outputs with verified column semantics; for stage acceptance, the loaded candidate, baseline, quality-validator output and comparable measurements.", - "produced_artifact": "An evidence-qualified bottleneck classification and optimization direction; stage conclusions retain missing-execution/validator INCONCLUSIVE or observed gate-failure FAIL.", + "input_contract": "CANN step/kernel/utilization/communication outputs with verified column semantics.", + "produced_artifact": "An evidence-qualified bottleneck classification and optimization direction.", "failure_modes": "Summing concurrent communication durations double-counts overlap; misidentified columns can drop communication, and a successful export can still lack usable utilization data." }, "recommendations": [ "Start from the step-level computing/communication/overlap/free breakdown and stop deepening the analysis once the bottleneck is located; do not sum concurrent streams as wall time.", "Inspect actual column headers and enum values on the installed CANN version, then verify files and non-null metrics before interpreting utilization heuristics.", - "Use same-window interleaved baseline/candidate measurements on shared machines; progress markers, hashes and source-derived thresholds do not substitute for quality and execution evidence." + "Use same-window interleaved baseline/candidate measurements on shared machines." ] } diff --git a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-CANN-2.0-LICENSE.md b/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-CANN-2.0-LICENSE.md deleted file mode 100644 index be957a617..000000000 --- a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-CANN-2.0-LICENSE.md +++ /dev/null @@ -1,38 +0,0 @@ -CANN Open Software License Agreement Version 2.0 - -This CANN Open Software License Agreement Version 2.0 (hereinafter referred to as this "Agreement") is a legal agreement between you and Huawei, and it governs your use, modification, or distribution of CANN Open Software (hereinafter referred to as "Software"). Please read this Agreement carefully. - -If you are entering into this Agreement on behalf of a company or other legal entity, you represent that you have the legal authority to bind that entity to this Agreement, in which case "you" will mean the entity you represent. - -BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE, YOU AGREE YOU HAVE FULLY UNDERSTOOD AND ACCEPTED THE TERMS CONTAINED HEREIN. IF YOU DO NOT AGREE TO ANY OF THE TERMS OF THIS AGREEMENT, OR IF YOU DO NOT QUALIFY FOR AGREEING TO THIS AGREEMENT, YOU ARE NOT AUTHORIZED TO AND SHALL NOT DOWNLOAD, INSTALL, OR MAKE ANY USE OF THE SOFTWARE. - -1. Definition - -1.1 Software means the APIs, source code files, binaries, and related documents of Compute Architecture for Neural Networks("CANN") that are licensable by Huawei, and provided and licensed under this Agreement. - -1.2 Huawei AI Processors mean AI chipsets (i) branded with "Ascend", "Kirin"," Yueying" or other brands owned or controlled by Huawei; or (ii) manufactured (including have manufactured), supplied (including have supplied) or designed (including have designed) by Huawei. - -2. Grant of Intellectual Property Rights -2.1 Subject to the terms and conditions of this Agreement, including your full compliance thereof, Huawei hereby grants you a limited, worldwide, royalty-free, non-transferable, non-sublicensable, and revocable license for you to (i) download, use, modify, integrate, and distribute the Software or its derivative works for the purpose of developing software solely for use in systems with Huawei AI Processors and/or Software, and (ii) distribute any software developed based upon Software and/or its derivative works solely for use in systems with Huawei AI Processors and/or Software. - -3. Restrictions -3.1 You are not authorized to, and shall not use, modify, or distribute this Software or its derivative works for any other purposes than those expressly permitted by this Agreement. You shall not make any use of the Software or its derivative works to develop or distribute any software for use in systems with processors other than Huawei AI Processors. All rights not expressly granted herein are expressly reserved by Huawei. - -3.2 You are not authorized to, and shall not remove, obscure, or alter any copyright or other notices in this Software or any part of it. - -3.3 Distribution Restrictions -You may distribute the Software or its derivative works in any medium, whether in source or executable forms, for the purpose stipulated in Section 2; provided that you provide recipients with a copy of this Agreement, and retain all notices in the Software. - -4. Disclaimer of Warranty and Limitation of Liability -THE SOFTWARE IS PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL HUAWEI OR ANY OTHER COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE, IN WHOLE OR IN PART, NO MATTER HOW IT IS CAUSED OR THE LEGAL THEORY IT IS BASED ON, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -5. Termination -5.1 This Agreement will continue to apply until terminated by either you or Huawei as described below: -a.You may terminate this Agreement by ceasing your use of the Software; -b. Huawei may at any time, terminate this Agreement if: (i) you fail to comply with any term of this Agreement; or (ii) you directly or indirectly initiate any legal proceeding against any individual or entity by alleging that the Software or any part of it infringes your intellectual property rights. -5.2 By termination, all the rights granted to you under this Agreement are terminated, and you shall cease to use and delete this Software or any derivative works immediately. All rights granted to you under this Agreement shall hereby be void ab initio in the event of termination in accordance with Section 5.1. b above. Huawei reserves the right to pursue any and all legal remedies available to enforce the terms and conditions of this Agreement or to protect Huawei’s intellectual property rights for such breach or violation. All provisions shall survive the termination of this Agreement except for Section 2 and Section 3.3. - -6. MISCELLANEOUS -If the application of any provision of this Agreement to any particular facts or circumstances is held to be invalid or unenforceable by a court of competent jurisdiction, then (a) the validity and enforceability of such provision as applied to any other particular facts or circumstances and the validity of other provisions of this Agreement shall not in any way be affected or impaired thereby and (b) such provision shall be enforced to the maximum extent possible so as to affect the intent of the you and Huawei and reformed without further action by you and Huawei to the extent necessary to make such provision valid and enforceable. - -END OF THE TERMS AND CONDITIONS diff --git a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md b/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md deleted file mode 100644 index 16f11a3a8..000000000 --- a/src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md +++ /dev/null @@ -1,112 +0,0 @@ -# CannBot fixed-stage evidence acceptance - -Use this reference when deciding whether an automated PyTorch/Ascend model -optimization stage supplies enough evidence for performance diagnosis or a -stage conclusion. It covers one fixed-stage flow, not CannBot's separate SOTA -workflow, an installed agent host, or the numerical implementation of its -dependent skills. The guidance is a source-derived candidate; execution and -agent efficacy are unverified. - -## One decision rule - -Accept a stage conclusion only when the current stage's execution identity, -quality result and comparable measurements agree. A callback accepting a -progress file is administrative evidence with a narrower meaning. - -1. Identify the model directory, stage, candidate revision, effective model and - deployment configuration, input signature, and baseline artifact. Verify - that logs or traces identify the modified module/path actually loaded and - exercised. A baseline metadata file's presence selects a workflow route; - it does not establish that this candidate executed or that measurements match. -2. Read the actual output of the campaign's frozen quality validator, including - its input/reference identity, measured result and gate. A self-check summary - or readable generated text alone cannot replace the required oracle. Keep - campaign thresholds outside this skill. -3. Compare prefill and decode measurements at their declared boundaries. Keep - stage increment and original-baseline comparison distinct. If a model first - becomes runnable after parallelization, establish that runnable deployment's - baseline before attributing later changes; the source explicitly discards - the earlier parallel-validation timing as the later comparison baseline. -4. Apply the existing skill's measurement discipline and five-layer analysis to - usable artifacts. General A/B design remains owned by - `inference-benchmark-design`; claim levels remain owned by - `dense-performance-evidence`. With missing identity, oracle output or a - comparable baseline, keep the affected conclusion `INCONCLUSIVE` and name - the missing artifact. A real failed gate stays `FAIL`. With valid quality but - no speedup, diagnose the profile or measurement boundary rather than - weakening the quality contract. - -Applicability ends at the evidence supplied: a verified stage result is not -whole-model quality, serving performance or backend qualification. Do not infer -a network algorithm, collective correctness or useful overlap from this workflow. - -## Source flow and who checks what - -At the fixed revision below, the workflow instructs a primary agent to dispatch -an analyzer, implementer and reviewer. The following are source observations, -not a record of those agents running. - -| Step | Producer and consumer | Evidence meaning | -|---|---|---| -| Establish baseline | Stage 0 analyzer records architecture/environment and runnable status; implementer is dispatched to the migrator; primary agent consumes the returned baseline metadata | Workflow/agent instructions. The migrator implementation and model run are outside this readset | -| Diagnose and choose | For stage 2, analyzer selects KV/attention configuration; primary agent presents choices for confirmation | Instructions, not a measured KV optimization or a blanket recommendation for a different model | -| Change | Implementer is dispatched with the chosen plan and appends implementation/self-check records to the current progress work area | Instructions require compilation/inference/output checks; summary fields alone supply no numeric result | -| Validate and consume | Reviewer is instructed to confirm actual code loading, compare baseline outputs and prefill/decode timing, then append validation; primary agent consumes the report, sends a failure for repair, or requests diagnosis when quality passes without a gain | Numerical testing is assigned to the reviewer; this readset contains no executed numerical validator or observed result | -| Advance | Primary agent is instructed to archive and clear the work area after a validated stage; stage 0 is exempt | `archive_progress.py` implements work-area preservation/clearing when called; the instructions do not prove that it was called | - -The registered callbacks perform narrower checks: - -| Callback | Inspected executable condition | Limit on its result | -|---|---|---| -| `PreToolUse` / `pre_tool_use.py` | Registered for `Edit\|Write`; role/path patterns restrict selected edits, and selected model-code paths require an agent-ID progress-read marker; rejection prints a reason and exits 2 | Marker existence does not bind its saved path, current stage or code revision. This registration is not all possible write paths | -| `PostToolUse` / `post_tool_use.py` | Registered for `Read`; a read path ending in `progress.md` with an agent ID creates the marker and writes that path | It records a matching read, not the identity or freshness required by the decision rule | -| `SubagentStop` / `subagent_stop.py` | Selects the newest-by-mtime `progress.md` under the working directory. For an implementer with a file, checks keyword presence in the first self-validation section (or a smaller debug list); also applies a session/stage retry counter to implementer/reviewer stops. A reason is printed and exits 2; no reason exits 0 | Does not parse pass/fail values, compare outputs, compute errors, or compare timing. Missing/unreadable progress exits 0. Reviewer completion has no equivalent numerical predicate in this hook | - -Whether an exit code blocks an agent action depends on the host loading this -registration and honoring its callback contract; no host was run here. A -keyword-complete section containing failed values can satisfy the lexical -predicate: that is a deduction from the predicate, not a reproduced host defect. -Normal stage instructions archive the work area; do not assume stale sections -persist in every run. Independently check that the selected file and result -belong to the current model and stage. - -## Source ledger and license boundary - -Canonical repository: [cann/cannbot](https://gitcode.com/cann/cannbot), commit -`c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110`, tree -`a381cd1241541bde9f881bbe12f5b97caa671b7c`; inspected 2026-10-23 from exact -anonymous Git objects. All plugin paths below are relative to -`plugins-official/model-infer-optimize/`. These are bounded read ranges, not a -claim that all of the repository or its external dependencies were reviewed. - -| Source path and lines | Support | -|---|---| -| [Root README.md:7–40](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/README.md#L7-L40); [plugins-official/README.md:1–25](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/README.md#L1-L25) | Application/plugin identity and distinction from separate skills/knowledge repositories; README capability descriptions | -| [Root LICENSE:1–38](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/LICENSE#L1-L38); [plugins-official/LICENSE:1–38](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/LICENSE#L1-L38) | Identical CANN Open Software License Agreement Version 2.0; exact retained copy linked below | -| [.claude-plugin/plugin.json:1–23](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/.claude-plugin/plugin.json#L1-L23); [.codex-plugin/plugin.json:1–20](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/.codex-plugin/plugin.json#L1-L20) | Plugin 1.0.6, `CANN-2.0`, registered roles/skill interface; not proof of host execution | -| [AGENTS.md:15–64](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/AGENTS.md#L15-L64); [workflows/optimize-workflow.md:21–370](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/workflows/optimize-workflow.md#L21-L370) | Fixed-flow routing, baseline creation, parallel baseline boundary, stage-2 diagnosis/change/validation and report consumption | -| [agents/model-infer-analyzer.md:15–80](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/agents/model-infer-analyzer.md#L15-L80); [agents/model-infer-implementer.md:19–94](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/agents/model-infer-implementer.md#L19-L94) | Role responsibilities, plan/self-check instructions and report production | -| [agents/model-infer-reviewer.md:13–114](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/agents/model-infer-reviewer.md#L13-L114) | Baseline and executed-path checks, output/accuracy and timing instructions; source prompt defaults are not adopted as universal numeric gates | -| [hooks/hooks.json:1–62](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/hooks/hooks.json#L1-L62); [hooks/pre_tool_use.py:1–110](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/hooks/pre_tool_use.py#L1-L110); [hooks/post_tool_use.py:1–36](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/hooks/post_tool_use.py#L1-L36); [hooks/subagent_stop.py:1–142](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/hooks/subagent_stop.py#L1-L142) | Registration, marker checks, lexical self-check, return/exit and retry behavior; source headers | -| [workflows/scripts/archive_progress.py:1–90](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/workflows/scripts/archive_progress.py#L1-L90) | Explicit archive/clear helper, with persistent section retained | -| [Root .gitmodules:1–5](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/.gitmodules#L1-L5); [plugin-sources.json:1–20](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/plugin-sources.json#L1-L20); [plugin-install.json:1–9](https://gitcode.com/cann/cannbot/blob/c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110/plugins-official/model-infer-optimize/plugin-install.json#L1-L9) | Skill dependency links and unpinned recipes URL; no dependency implementation evidence | - -The root and official-plugin license copies have Git blob -`be957a617506691ba865f3f00422a2cf9a1d493a`. Both manifests name `CANN-2.0`; -inspected callback/helper headers retain: - -> Copyright (c) 2026 Huawei Technologies Co., Ltd. - -The complete selected agreement is bundled as -[cannbot-CANN-2.0-LICENSE.md](cannbot-CANN-2.0-LICENSE.md). Its sections 2.1 -and 3 limit the stated purpose to systems with Huawei AI Processors and/or -Software and require the agreement and notices for covered distribution. -This attribution concerns this selected CannBot source only. It does not -relicense this multi-source skill, establish another repository's license, or -replace historical `cannbot-skills` UNKNOWN declarations. The analysis is newly -written; no upstream implementation is ported or bundled. - -The `vendor/cannbot-skills` Gitlink is -`f305e200aa4b1e1fed73cd21ff1f083b8df25a1e`; its files were not retrieved or -inspected. Neither it nor the unpinned recipes dependency supplies verified -numerical, kernel, collective, or runtime behavior here. diff --git a/src/inferrsi/knowledge/data/skill_library/hardware/source-inventory.json b/src/inferrsi/knowledge/data/skill_library/hardware/source-inventory.json index 07bf2eb58..1ba4887d0 100644 --- a/src/inferrsi/knowledge/data/skill_library/hardware/source-inventory.json +++ b/src/inferrsi/knowledge/data/skill_library/hardware/source-inventory.json @@ -258,22 +258,10 @@ "evidence": [ "SKILL.md" ] - }, - { - "source": "cann/cannbot official model-infer-optimize plugin", - "channel": "direct repository read retained", - "depth": "Fixed-stage role/workflow instructions plus selected registered callback and archive-helper implementation; dependency skills/recipes not inspected.", - "identity": "c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110 (full Git commit)", - "inspection_date": "2026-10-23", - "license_note": "Selected official plugin CANN-2.0 with Huawei notices and retained agreement; purpose/distribution restrictions remain in its ledger. Not a license for historical cannbot-skills.", - "evidence": [ - "references/cannbot-stage-evidence.md", - "references/cannbot-CANN-2.0-LICENSE.md" - ] } ], "limits": [ - "Only the official fixed-stage increment is normalized. Lexical callback completion is not numerical validation; agent-host integration and NPU execution remain unverified." + "Inherited MindIE-SD profiling guidance has no local NPU validation." ] }, { From 91a40ba22dbf0c67209d0ec2ec6354e45b184f7f Mon Sep 17 00:00:00 2001 From: jiangkuaixue123 Date: Wed, 18 Nov 2026 14:14:24 +0800 Subject: [PATCH 2/2] knowledge: refresh the packaged Ascend profile and coverage Signed-off-by: jiangkuaixue123 --- docs/skill-coverage.md | 4 +- .../inferrsi/knowledge/_provenance.json | 2 +- .../skills/ascend-performance-analysis.json | 68 +++++-------------- 3 files changed, 19 insertions(+), 55 deletions(-) diff --git a/docs/skill-coverage.md b/docs/skill-coverage.md index bcd78b5ae..108337bb2 100644 --- a/docs/skill-coverage.md +++ b/docs/skill-coverage.md @@ -4,7 +4,7 @@ Generated from the registry, the skill sidecars and the two maintained matrices. **Do not edit by hand**; regenerate after any registry, skill, matrix or frozen-plan change. -- Input digest: `sha256:057218d1284e26df8db68c1177abd0a2ff73edbb175adc8441fe92a66a79e124` +- Input digest: `sha256:8c6160d89cc3213f74ec699a0659afde19f58c3b935168eb4c19a1b1c995bc87` - Regenerate: `python tools/build_skill_coverage.py` - Verify without writing: `python tools/build_skill_coverage.py --check` @@ -63,7 +63,7 @@ optimization is fully covered or that any procedure has measured benefit. | [ascend-operator-profiling](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-operator-profiling/SKILL.md) | ascend | Benchmark a single Ascend NPU operator using msprof op: build, collect with warmup, read the 8 CSV metrics files ... | Build, measure and diagnose one Ascend operator in isolation using msprof op, before ... | failure_modes, input_contract, produced_artifact
3 advice | 1 Accelerator · Observe / Profile
5 OS · Observe / Profile | 1 · Systems sources (ascend-ai-coding/awesome-ascend-skills @ 75ec89c) | candidate · not_run · 0 readset(s) | no-eval | | [ascend-operator-tuning](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-operator-tuning/SKILL.md) | ascend | Run a staged, accuracy-gated tuning campaign on a single Ascend NPU operator: set a numeric target up front, block ... | Run a bounded, accuracy-gated tuning campaign for a single Ascend operator already ... | failure_modes, input_contract, produced_artifact, refusal_point
3 advice | 1 Accelerator · Optimize | 1 · Systems sources (ascend-ai-coding/awesome-ascend-skills @ 75ec89c) | candidate · not_run · 0 readset(s) | no-eval | | [ascend-optimization-casebook](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-optimization-casebook/SKILL.md) | ascend | Casebook of NPU optimization cases for Ascend inference systems: symptom → diagnosis → action → evidence records for ... | Find source-derived prior cases for an already classified Ascend inference bottleneck ... | input_contract, produced_artifact, refusal_point
2 advice | 1 Accelerator · Optimize / Verify | 1 · Systems sources (Ascend/MindIE-SD @ 8481d39) | candidate · not_run · 0 readset(s) | no-eval | -| [ascend-performance-analysis](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md) | ascend | Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys ... | Interpret Ascend CANN profiling evidence from step breakdown through ... | failure_modes, input_contract, produced_artifact
3 advice | 1 Accelerator · Observe / Profile / Diagnose / Verify
4 Network · Observe / Profile / Diagnose / Verify
5 OS · Diagnose | 1 · Systems sources (Ascend/MindIE-SD @ 8481d39)
1 · Systems sources (cann/cannbot @ `c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110` (selected ...) | candidate · not_run · 1 readset(s) | no-eval | +| [ascend-performance-analysis](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md) | ascend | Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys ... | Interpret Ascend CANN profiling evidence from step breakdown through ... | failure_modes, input_contract, produced_artifact
3 advice | 1 Accelerator · Observe / Profile / Diagnose
4 Network · Observe / Profile / Diagnose / Verify
5 OS · Diagnose | 1 · Systems sources (Ascend/MindIE-SD @ 8481d39) | candidate · not_run · 0 readset(s) | no-eval | | [ascend-video-diffusion-optimization](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-video-diffusion-optimization/SKILL.md) | ascend | Run and verify goal-driven Ascend video diffusion optimization. Specializes the backend-agnostic ... | Ascend NPU video diffusion inference and serving optimization | failure_modes, input_contract, produced_artifact
3 advice | 1 Accelerator † guidance: Video diffusion campaign guidance (unvalidated) | — | candidate · not_run · 1 readset(s) | no-Reference-Matrix-row, no-eval | | [ascendc-tiling-design](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascendc-tiling-design/SKILL.md) | ascend | Design tiling for a custom AscendC operator: normalize the shape first (axis-collapse or flatten), answer the ... | Design or restructure AscendC tiling for the covered reduction, broadcast and elementwise ... | failure_modes, input_contract, produced_artifact
3 advice | 1 Accelerator · Optimize | 1 · Systems sources (ascend-ai-coding/awesome-ascend-skills @ 75ec89c) | candidate · not_run · 0 readset(s) | no-eval | | [cann-attribution-overlap](../src/inferrsi/knowledge/data/skill_library/hardware/ascend/cann-attribution-overlap/SKILL.md) | ascend | Attribute NPU trace kernels to model source and plan bounded multistream overlap: select a representative step, map ... | Attribute representative CANN trace kernels to source owners and plan bounded multistream ... | failure_modes, input_contract, produced_artifact
4 advice | 1 Accelerator · Observe / Profile / Diagnose / Optimize / Verify
4 Network · Diagnose / Optimize / Verify | 1 · Systems sources (cann/oam-tools @ `8440935f` (!302 import; later master `f3cf4115` ...) | candidate · not_run · 0 readset(s) | no-eval | diff --git a/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/_provenance.json b/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/_provenance.json index 047a69a76..81f39b350 100644 --- a/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/_provenance.json +++ b/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/_provenance.json @@ -1,7 +1,7 @@ { "schema_version": 1, "repository": "https://github.com/InferMatrixLab/InferRSI", - "source_revision": "1cfecf2872788f3615e64452c79c2b29be667bda", + "source_revision": "4eef72ee00e8d1f7792c79d79519da60705608bd", "registry": { "path": "src/inferrsi/knowledge/data/skill_library/skill-index.json", "sha256": "7904275c3383380db179287171e1430617aaa9ac4f439291eff8a71426987fbb" diff --git a/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/ascend/skills/ascend-performance-analysis.json b/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/ascend/skills/ascend-performance-analysis.json index 6a0df1922..6898a20d2 100644 --- a/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/ascend/skills/ascend-performance-analysis.json +++ b/src/inferrsi/knowledge/data/repo_packs/inferrsi/knowledge/ascend/skills/ascend-performance-analysis.json @@ -8,7 +8,7 @@ "component": "skills", "scenario": "skills.discovery", "status": "imported", - "summary": "Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys, ncu, SOL%, roofline) to their NPU equivalents (msprof, torch_npu.profiler, CSV/JSON outputs, AI Core utilization, HCCL communication analysis). Covers measurement discipline on shared NPU machines and evidence acceptance for automated NPU optimization stages. Use when profiling data is available or a stage report needs its execution and validation evidence checked.\n", + "summary": "Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys, ncu, SOL%, roofline) to their NPU equivalents (msprof, torch_npu.profiler, CSV/JSON outputs, AI Core utilization, HCCL communication analysis). Covers measurement discipline on shared NPU machines. Use when profiling data is available and you need to find the bottleneck and its cause.\n", "tags": [ "ascend", "npu", @@ -25,14 +25,12 @@ }, "checkout_ref": "checkout:ascend-performance-analysis", "source_files": { - "src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md": "a057b7f86a24f34a8f84abbbb4910d58d4e50ff47060e1c404600017e3febe89", - "src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/metadata.json": "f3fb35b14b5b1054a9192459862451149395368f4a75f430caef2f41ad050296", - "src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-CANN-2.0-LICENSE.md": "89b1c114df62cfd183004f38d18d07f186436c3b37203dd69c3e84becf9d2282", - "src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/references/cannbot-stage-evidence.md": "f56e4125325c9c1b9235a1d64fd732861c7686444492422daff44ba8dd648be4" + "src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/SKILL.md": "955a7b4206e4ea3a73e9aa8723df1ad5f823f950520441bcfdf68d8ba07ca6c7", + "src/inferrsi/knowledge/data/skill_library/hardware/ascend/ascend-performance-analysis/metadata.json": "dd0c39f035e8cad74d9d8d153c63f1294883b049acdb142177b5f44ab04dc3c9" }, "skill_metadata": { "name": "ascend-performance-analysis", - "description": "Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys, ncu, SOL%, roofline) to their NPU equivalents (msprof, torch_npu.profiler, CSV/JSON outputs, AI Core utilization, HCCL communication analysis). Covers measurement discipline on shared NPU machines and evidence acceptance for automated NPU optimization stages. Use when profiling data is available or a stage report needs its execution and validation evidence checked.\n", + "description": "Diagnose performance bottlenecks on Ascend NPU systems using CANN profiling data. Maps GPU profiling concepts (nsys, ncu, SOL%, roofline) to their NPU equivalents (msprof, torch_npu.profiler, CSV/JSON outputs, AI Core utilization, HCCL communication analysis). Covers measurement discipline on shared NPU machines. Use when profiling data is available and you need to find the bottleneck and its cause.\n", "tags": [ "ascend", "npu", @@ -47,70 +45,38 @@ "origin": [ "external" ], - "sources": [ - { - "type": "git", - "url": "https://gitcode.com/cann/cannbot", - "commit": "c0e2ad23ee1a73e3c0f84c8df1cc459e2aae3110", - "paths": [ - "LICENSE", - "README.md", - ".gitmodules", - "plugins-official/LICENSE", - "plugins-official/README.md", - "plugins-official/model-infer-optimize/.claude-plugin/plugin.json", - "plugins-official/model-infer-optimize/.codex-plugin/plugin.json", - "plugins-official/model-infer-optimize/AGENTS.md", - "plugins-official/model-infer-optimize/plugin-sources.json", - "plugins-official/model-infer-optimize/plugin-install.json", - "plugins-official/model-infer-optimize/workflows/optimize-workflow.md", - "plugins-official/model-infer-optimize/agents/model-infer-analyzer.md", - "plugins-official/model-infer-optimize/agents/model-infer-implementer.md", - "plugins-official/model-infer-optimize/agents/model-infer-reviewer.md", - "plugins-official/model-infer-optimize/hooks/hooks.json", - "plugins-official/model-infer-optimize/hooks/pre_tool_use.py", - "plugins-official/model-infer-optimize/hooks/post_tool_use.py", - "plugins-official/model-infer-optimize/hooks/subagent_stop.py", - "plugins-official/model-infer-optimize/workflows/scripts/archive_progress.py" - ], - "readset": "references/cannbot-stage-evidence.md" - } - ], + "sources": [], "empirical_validation": "not_run", "limitations": [ "Source-derived candidate; no local efficacy validation.", - "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", - "Only the incremental canonical CannBot fixed-stage evidence boundary is normalized; inherited MindIE-SD guidance remains unchanged.", - "CannBot callback predicates do not establish numerical accuracy or performance; dependent skills, agent-host integration and NPU execution are unverified." - ], - "provenance_readsets": [ - "references/cannbot-stage-evidence.md" + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets." ], + "provenance_readsets": [], "consumption_mode": "packaged", "applicability": { - "scope": "Interpret Ascend CANN profiling evidence from step breakdown through kernel/utilization/communication analysis, and assess execution/validator evidence in automated optimization-stage reports.", + "scope": "Interpret Ascend CANN profiling evidence from step breakdown through kernel/utilization/communication analysis.", "prerequisites": "Usable warm-state captures with representative steps, required files and non-null utilization columns; healthy cards and a consistent valid topology for multi-card comparisons.", - "input_contract": "CANN step/kernel/utilization/communication outputs with verified column semantics; for stage acceptance, the loaded candidate, baseline, quality-validator output and comparable measurements.", - "produced_artifact": "An evidence-qualified bottleneck classification and optimization direction; stage conclusions retain missing-execution/validator INCONCLUSIVE or observed gate-failure FAIL.", + "input_contract": "CANN step/kernel/utilization/communication outputs with verified column semantics.", + "produced_artifact": "An evidence-qualified bottleneck classification and optimization direction.", "failure_modes": "Summing concurrent communication durations double-counts overlap; misidentified columns can drop communication, and a successful export can still lack usable utilization data." }, "recommendations": [ "Start from the step-level computing/communication/overlap/free breakdown and stop deepening the analysis once the bottleneck is located; do not sum concurrent streams as wall time.", "Inspect actual column headers and enum values on the installed CANN version, then verify files and non-null metrics before interpreting utilization heuristics.", - "Use same-window interleaved baseline/candidate measurements on shared machines; progress markers, hashes and source-derived thresholds do not substitute for quality and execution evidence." + "Use same-window interleaved baseline/candidate measurements on shared machines." ] }, "applicability": { - "scope": "Interpret Ascend CANN profiling evidence from step breakdown through kernel/utilization/communication analysis, and assess execution/validator evidence in automated optimization-stage reports.", + "scope": "Interpret Ascend CANN profiling evidence from step breakdown through kernel/utilization/communication analysis.", "prerequisites": "Usable warm-state captures with representative steps, required files and non-null utilization columns; healthy cards and a consistent valid topology for multi-card comparisons.", - "input_contract": "CANN step/kernel/utilization/communication outputs with verified column semantics; for stage acceptance, the loaded candidate, baseline, quality-validator output and comparable measurements.", - "produced_artifact": "An evidence-qualified bottleneck classification and optimization direction; stage conclusions retain missing-execution/validator INCONCLUSIVE or observed gate-failure FAIL.", + "input_contract": "CANN step/kernel/utilization/communication outputs with verified column semantics.", + "produced_artifact": "An evidence-qualified bottleneck classification and optimization direction.", "failure_modes": "Summing concurrent communication durations double-counts overlap; misidentified columns can drop communication, and a successful export can still lack usable utilization data." }, "recommendations": [ "Start from the step-level computing/communication/overlap/free breakdown and stop deepening the analysis once the bottleneck is located; do not sum concurrent streams as wall time.", "Inspect actual column headers and enum values on the installed CANN version, then verify files and non-null metrics before interpreting utilization heuristics.", - "Use same-window interleaved baseline/candidate measurements on shared machines; progress markers, hashes and source-derived thresholds do not substitute for quality and execution evidence." + "Use same-window interleaved baseline/candidate measurements on shared machines." ], "limitations": [ "This generated abstract points to the complete packaged skill; external evidence and upstream repositories remain source links.", @@ -118,9 +84,7 @@ "Reading or indexing does not authorize execution, validate efficacy, promote a candidate or grant a license.", "The backend categorizes the procedure's hardware dependency; it does not certify compatibility, and skills.discovery is a discovery scenario.", "Source-derived candidate; no local efficacy validation.", - "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets.", - "Only the incremental canonical CannBot fixed-stage evidence boundary is normalized; inherited MindIE-SD guidance remains unchanged.", - "CannBot callback predicates do not establish numerical accuracy or performance; dependent skills, agent-host integration and NPU execution are unverified." + "Original typed source inventory is not normalized; retain source identities and limits in the procedure/readsets." ], "verification": { "locally_verified": false,