一键导入
external-cannbot-ops-ascendc-docs-search
Ascend C 开发资源检索技能。通过本地 API 文档索引、示例代码映射和在线文档兜底搜索定位开发资料,优先查本地、缺失时再查在线。当需要查询 API 用法、示例代码、兼容性信息、官方资料入口或定位文档来源时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Ascend C 开发资源检索技能。通过本地 API 文档索引、示例代码映射和在线文档兜底搜索定位开发资料,优先查本地、缺失时再查在线。当需要查询 API 用法、示例代码、兼容性信息、官方资料入口或定位文档来源时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | external-cannbot-ops-ascendc-docs-search |
| description | Ascend C 开发资源检索技能。通过本地 API 文档索引、示例代码映射和在线文档兜底搜索定位开发资料,优先查本地、缺失时再查在线。当需要查询 API 用法、示例代码、兼容性信息、官方资料入口或定位文档来源时使用。 |
| original-name | ascendc-docs-search |
| synced-from | https://gitcode.com/cann/cannbot-skills |
| synced-date | 2026-05-26 |
| synced-commit | ac5bbd2b4cf427d011874e11f8d1e8b1bef66eda |
| license | UNKNOWN |
本技能提供"本地优先,在线兜底"的文档搜索能力:
| 资源类型 | 路径 | 说明 |
|---|---|---|
| API 文档 | asc-devkit/docs/api/context/ | 1022 个 API 文档 |
| 高性能模板 | asc-devkit/examples/00_introduction/01_add/basic_api_memory_allocator_add/ | 双缓冲+流水线标准实现 |
| 各类示例 | asc-devkit/examples/00_introduction/ | 加法、减法、多输入等 |
| 完整文档 | asc-devkit/docs/ | 完整开发文档 |
| Tiling 实现 | asc-devkit/impl/adv_api/tiling/ | Tiling 参数配置参考 |
| 矢量计算 | asc-devkit/examples/00_introduction/11_vectoradd/ | 矢量 API 使用 |
| 调试示例 | asc-devkit/examples/01_utilities/00_printf/printf.asc | printf 调试方法 |
1. asc-devkit/docs/api/context/ (本地 API 文档 - 1022 个)
↓ 找不到
2. asc-devkit/examples/ (示例代码 - 587 个)
↓ 找不到
3. asc-devkit/impl/ (实现代码)
↓ 找不到
4. 在线搜索(华为昇腾社区)
使用 scripts/ 中的 Python 脚本
推荐版本:8.5.0(与当前环境一致)
问题:Ascend C 存在 240+ 个带数字后缀的 API 变体(如 Add-25.md),同名 API 的不同变体功能可能完全不同。
典型案例:
Add.md - 基础版本Add-25.md - 变体版本(支持更多功能)列出所有变体:
# 搜索某个 API 的所有变体(将 APIName 替换为实际 API 名称)
ls asc-devkit/docs/api/context/ | grep -iE "^APIName"
# 示例:
# APIName.md ← 基础版本
# APIName-25.md ← 变体版本
# APIName-91.md ← 变体版本
逐一确认功能:每个变体的函数签名、参数、功能可能完全不同
| 后缀 | 含义 | 示例 |
|---|---|---|
| 无后缀 | 基础版本 | Add.md |
-数字 | 变体版本(数字无语义,功能可能完全不同) | Add-25.md |
# 查找某个 API 的所有变体(强制,将 APIName 替换为实际名称)
ls asc-devkit/docs/api/context/ | grep -iE "^APIName"
# 在所有变体中搜索特定关键词
grep -l "关键词" asc-devkit/docs/api/context/APIName*.md
当前环境:A3 服务器,CANN 8.5.0
查阅资料时必须确认 API/方法适用于当前环境。
何时使用:
使用方式:
使用 Task 工具,subagent_type=Explore
提供明确的搜索目标和范围
示例提示词:
| 示例名称 | 路径 | 用途 |
|---|---|---|
| 高性能模板 | asc-devkit/examples/00_introduction/01_add/basic_api_memory_allocator_add/ | 双缓冲+流水线 |
| 多输入加法 | asc-devkit/examples/00_introduction/04_addn/addn.asc | 多输入处理 |
| 减法算子 | asc-devkit/examples/00_introduction/07_sub/sub_custom.asc | 减法实现 |
| 调试打印 | asc-devkit/examples/01_utilities/00_printf/printf.asc | printf 调试 |
| 断言使用 | asc-devkit/examples/01_utilities/01_assert/assert.asc | 断言示例 |
| 库函数 | asc-devkit/examples/03_libraries/00_addcdivcustom/addcdiv_custom.asc | 库函数使用 |
| 矢量计算 | asc-devkit/examples/00_introduction/11_vectoradd/vector_add_custom.asc | 矢量 API |
适用情况:
快速搜索:
# 基础搜索(推荐使用中文关键词)
python skills/ascendc-docs-search/scripts/ascend_search_client.py "Ascend C 临时内存申请" --max_results 5
# 搜索 API 文档
python skills/ascendc-docs-search/scripts/ascend_search_client.py "AscendC::Add 接口原型" --max_results 8
# 带版本过滤(推荐使用 8.5.0)
python skills/ascendc-docs-search/scripts/ascend_search_client.py "Ascend C API" --version "8.5.0"
获取详细内容:
python skills/ascendc-docs-search/scripts/ascend_content_fetcher.py <URL>
参数说明:
keyword:搜索关键词(必需),建议使用中文--max_results:返回结果数量(1-10,默认 10)--lang:语言设置(zh/en,默认 zh)--version:版本过滤字符串(如 "8.5.0")--doc_type:文档类型(DOC/API,默认 DOC)依赖安装:
pip install -r skills/ascendc-docs-search/requirements.txt
评估 CANN 算子仓的「进阶教程 / 开发指南」类文档质量——通读文档 + 对照算子代码**静态**查证(默认不跑),按五轴(找得到/信得过/学得会/可操作/读得懂)找出 漏讲/讲不清/过时/对不上代码/概念讲错,产出带证据与改进建议的体检报告(MD + HTML)。涉及「评进阶教程 / 开发指南文档质量 / 文档对不对得上代码 / 教程审稿 / tutorial 体检 / 文档信不信得过」等意图时使用。只评不改不跑,只对着文档与代码出诊断。
Run NPU inference/training tests on a remote SSH server with vllm-ascend Docker container. Use when the user asks to test models on NPU, run inference on Ascend devices, or deploy models to an SSH server.
Track daily PRs and Issues from vllm-project/vllm and vllm-project/vllm-ascend, filter by model (DeepSeek/Qwen/GLM/MiniMax/Kimi) and tech topics (PD disaggregation, MTP, quantization, graph mode, performance), analyze with LLM, and generate a Markdown report. Use when user wants vllm daily tracker, PR/Issue digest, or Ascend inference ecosystem monitoring.
Automatically fetch InferenceX benchmark data and generate daily performance reports for LLM inference on various hardware (NVIDIA, AMD, etc.). Supports email delivery, data change detection, and 8k1k sequence length performance analysis. Use when needing to track LLM inference performance trends, compare hardware configurations, or monitor benchmark updates.
通用 PyTorch 项目 Ascend NPU 迁移可行性分析。系统化扫描代码库中的 CUDA/GPU 依赖,按 7 大域分类评估(设备层、注意力机制、自定义算子、分布式通信、精度策略、第三方依赖、编译加速),并基于 Wan2.2 实际迁移经验提供逐项替代方案。适用于评估任何 DiT/Transformer 类模型(视频生成、LLM、多模态等)在昇腾 NPU 上的运行可行性与迁移工作量估算。
End-to-end AscendC custom operator development for Ascend NPU in an ascend-kernel (csrc/ops + build.sh + torch_npu PyTorch custom op) project. Use to design, generate, build, test, document, and tune a new AscendC operator from a name and a math/functional spec. Covers project init, two-level tiling design, op_host/op_kernel code generation, framework registration, compile/install/debug, PyTorch-style API docs, precision evaluation and root-cause debugging, torch_npu.profiler performance benchmarking, performance optimization, and security code review.