news 2026/5/9 12:38:42

CANN/cannbot-skills工具目录

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/cannbot-skills工具目录

Tool Catalog

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

Use this file to choose a repository tool before opening or modifying the script itself. This is a selection index, not an implementation reference.

Index schema

This file is also the machine-readable metadata source foragent/index/tools.json. The index builder reads:

  • each###entry heading as one tool record
  • the surrounding##section as the tool category
  • top-level entry bullets such aspurpose,use_for,not_for,important_outputs, andpair_with
  • nested bullet items under those fields as ordered list values

If you edit this catalog, keep that field structure stable.

Current tools

agent/scripts/estimate_matmul_datamove.py

  • purpose:
    • estimate matmul data movement for candidate tile/core-split strategies
    • reject illegal tile-space combinations before kernel authoring goes too far
  • use_for:
    • choosingTILE_M,TILE_N,TILE_K
    • comparingsplit_m,split_n, andmix
    • checkingdbuf_left,dbuf_right, and fixeddbuf_l0ccapacity assumptions
    • resolving large-matmul strategy questions before touching kernel code
  • not_for:
    • launching kernels
    • validating numerical correctness
    • replacing simulator-based output checks
  • important outputs:
    • per-core datamove estimate
    • best strategy candidate set
    • PrettyTable strategy report
    • expansion ratio and DBUF-aware capacity decisions
  • pair_with:
    • agent/references/constraints/tiling.md
    • agent/scripts/tools_summary.md
    • large tiled examples such asagent/example/kernels/a5/matmul_mknk_2dgrid_splitn.py,agent/example/kernels/a5/matmul_mknk_2dgrid_splitk.py, andagent/example/kernels/a5/matmul_mknk_2dgrid_splitk_add1.py

agent/scripts/select_kernel_example.py

  • purpose:
    • rank existing kernel examples for a new task using the generated kernel index
    • reduce manual catalog and source-file scanning before kernel authoring
  • use_for:
    • selecting a first kernel to study by topology, query text, tags, or lightweight features
    • narrowing candidate examples before openingagent/example/kernels/source files
    • surfacingstudy_foranddo_not_copy_whenguidance together with the example path
  • not_for:
    • generating kernel logic
    • proving that one example is the uniquely correct template
    • replacing constraint/reference reading for tiling, autosync, counters, or precision
  • important outputs:
    • ranked kernel paths
    • short match reasons
    • study_foranddo_not_copy_whensummaries
    • optional JSON output for tool chaining
  • pair_with:
    • agent/references/examples/kernel-catalog.md
    • agent/index/kernels.json
    • agent/playbooks/kernel-authoring.md
    • agent/references/constraints/

agent/scripts/check_counter_lifetimes.py

  • purpose:
    • flag suspicious counter sharing and stage-lifetime mixing with static AST checks
    • give a fast pre-review pass before deeper manual reasoning or simulator work
  • use_for:
    • spotting counters incremented at multiple loop-owned stages
    • spotting suspicious delayed-stage sharing across sibling conditional branches
    • summarizing which buffers and positions each counter indexes
    • adding a lightweight CI gate with--fail-on-warning
  • not_for:
    • proving full kernel correctness
    • replacing autosync reasoning or simulator validation
    • deciding automatically whether every multi-buffer counter is semantically wrong
  • important_outputs:
    • warning codes with line numbers
    • per-counter buffer and position summary
    • optional JSON output for tool chaining or CI
  • pair_with:
    • agent/references/constraints/counters.md
    • agent/example/kernels/a5/matmul_mknk_2dgrid_splitn.py
    • agent/example/kernels/a5/matmul_mknk_2dgrid_splitk_add1.py
    • agent/example/kernels/a5/test_mla_entire.py

agent/scripts/check_kernel_catalog.py

  • purpose:
    • verify that the human-readable kernel catalog, generated kernel index, and actualagent/example/kernels/*.pyfiles stay consistent
    • catch source-of-truth drift before selectors or routing layers start returning stale metadata
  • use_for:
    • checking that every catalog entry points to a real kernel file
    • checking that required metadata fields are present and non-empty
    • checking that newly added kernel files are not missing from the catalog
    • checking whetheragent/index/kernels.jsonis stale relative to the current catalog
  • not_for:
    • rewriting catalog entries automatically
    • ranking or selecting kernels for study
    • validating kernel numerical correctness
  • important_outputs:
    • consistency warning codes such as missing file, missing field, uncataloged kernel, or stale index
    • optional JSON output for CI or tool chaining
  • pair_with:
    • agent/references/examples/kernel-catalog.md
    • agent/index/kernels.json
    • agent/scripts/build_agent_index.py
    • agent/scripts/select_kernel_example.py

agent/scripts/gen_kernel_skeleton.py

  • purpose:
    • generate repository-style kernel scaffolds so new kernel work can start from a controlled skeleton instead of peeling an old file by hand
    • encode the current pure-cube, cube->vec, vec->cube, vec->cube->vec, cube->vec->cube->vec, and vec->cube->vec->cube template structure directly into a reusable CLI tool
  • use_for:
    • creating a newcube-only,cube->vec,vec->cube,vec->cube->vec,cube->vec->cube->vec, orvec->cube->vec->cubekernel scaffold underagent/example/kernels/
    • previewing grid-aware cube skeletons withtile-m,tile-n, ormix
    • choosing whether the scaffold should include a tiledKloop or a one-shot cube call
    • selecting a topology-specific profile such ascube-only --profile splitk,cube-only --profile kmkn,cube->vec --profile dual-output,cube->vec --profile normalize-two-pass,cube->vec --profile half-row-post,vec->cube --profile nz-publish,vec->cube --profile half-row-pre,cube->vec->cube->vec --profile lookahead-basic, orvec->cube->vec->cube --profile lookahead-basic
    • getting explicit counter ownership and tiled loop structure before filling real matmul logic
  • not_for:
    • generating a semantically complete kernel body
    • deciding exact tile/core split values automatically
    • replacing the need to choose the correct topology first
  • important_outputs:
    • generated kernel file or printed scaffold text
    • tiled pure-cube, cube->vec, vec->cube, vec->cube->vec, cube->vec->cube->vec, or vec->cube->vec->cube loop skeletons
    • CvMutexhandoff skeleton and vec postprocess placeholder forcube->vec, includingsimple-post, explicit split-Mhalf-row-post,normalize-simple,normalize-two-pass, anddual-outputvariants
    • VcMutexpublish skeleton and vec preprocess placeholder forvec->cube, includingnd-publish,nz-publish, and explicit split-Mhalf-row-prevariants
    • overlapped stage1/stage2 delayed-drain skeleton withVcMutex+CvMutexforvec->cube->vec, including explicitoverlap-basic,half-row-post, and deeper-queuedelayed-postvariants
    • lookahead-stylecube->vec->cube->vecstreaming skeleton withCvMutex+VcMutex+CvMutex, separate delayed-stage counters, and a loop-external finalize stage
    • mirroredvec->cube->vec->cubestreaming skeleton withVcMutex+CvMutex+VcMutex, streamed vec preprocess, delayed second-stage cube consume, and direct final cube writeback
    • __main__validation stub unless disabled
  • pair_with:
    • agent/playbooks/kernel-authoring.md
    • agent/references/patterns/cube-only.md
    • agent/scripts/select_kernel_example.py
    • agent/scripts/estimate_matmul_datamove.py

Fast selection hint

If the question is "which tile/core split should I use before writing the kernel body?", start here:

  • agent/scripts/estimate_matmul_datamove.py

If the question is "which existing kernel should I study before opening source files?", start here:

  • agent/scripts/select_kernel_example.py

If the question is "does this kernel have obvious counter-lifetime smells before I go deeper?", start here:

  • agent/scripts/check_counter_lifetimes.py

If the question is "did the kernel catalog or generated kernel index drift out of sync?", start here:

  • agent/scripts/check_kernel_catalog.py

If the question is "give me a new pure-cube or mixed-pipeline kernel scaffold that follows the repository's tiled template", start here:

  • agent/scripts/gen_kernel_skeleton.py

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/9 12:31:33

CANN ops-math clamp算子

aclnnClamp 【免费下载链接】ops-math 本项目是CANN提供的数学类基础计算算子库,实现网络在NPU上加速计算。 项目地址: https://gitcode.com/cann/ops-math 📄 查看源码 产品支持情况 产品是否支持Ascend 950PR/Ascend 950DT√Atlas A3 训练系列…

作者头像 李华
网站建设 2026/5/9 12:31:33

CANN/GE添加控制输入API

AddControlInput 【免费下载链接】ge GE(Graph Engine)是面向昇腾的图编译器和执行器,提供了计算图优化、多流并行、内存复用和模型下沉等技术手段,加速模型执行效率,减少模型内存占用。 GE 提供对 PyTorch、TensorFlo…

作者头像 李华
网站建设 2026/5/9 12:30:54

边缘设备LLM量化实战:从7B模型到500MB内存的极限压缩指南

摘要:本文揭秘2026年最前沿的LLM边缘部署技术,通过12种量化策略组合,将Llama-3-8B模型压缩至500MB内存限制下运行。包含TensorRT-LLM配置秘籍、内存泄漏修复方案及3个工业级案例,实测推理速度提升4.2倍,内存占用降低83…

作者头像 李华
网站建设 2026/5/9 12:28:33

CANN/pypto 填充操作

pypto.pad 【免费下载链接】pypto PyPTO(发音: pai p-t-o):Parallel Tensor/Tile Operation编程范式。 项目地址: https://gitcode.com/cann/pypto 产品支持情况 产品是否支持Ascend 950PR/Ascend 950DT√Atlas A3 训练系列产品/Atla…

作者头像 李华
网站建设 2026/5/9 12:27:50

6G时代零接触式普适AI即服务架构:融合区块链与DRL的自动化AI交付

1. 项目概述:当6G遇见普适AI,一场“零接触”的服务革命如果你关注过5G,就会知道它带来的不仅是更快的网速,更是万物互联的基石。但当我们把目光投向更远的6G,会发现它的野心远不止于此。6G的核心愿景之一,是…

作者头像 李华
网站建设 2026/5/9 12:26:42

Hololens2通过APPx来发布

1 生成vs工程 unity 2021.3.352 生成appx3 网页端连接hololens安装appx即可

作者头像 李华