一键导入
ascendc-docs-search
Ascend C 开发资源索引(本地+在线)。提供:(1) 本地 API 文档索引、示例代码映射,(2) 在线文档搜索功能,(3) 资源查找优先级,(4) Explore Agent 使用指南。优先使用本地资源,仅在本地检索不到时使用在线搜索。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Ascend C 开发资源索引(本地+在线)。提供:(1) 本地 API 文档索引、示例代码映射,(2) 在线文档搜索功能,(3) 资源查找优先级,(4) Explore Agent 使用指南。优先使用本地资源,仅在本地检索不到时使用在线搜索。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Profile PyPTO kernels in-core with the Ascend msprof op-simulator — cycle-accurate per-kernel traces. Use when the user wants to profile a built case, inspect kernel timing or instruction streams, or generate MindStudio Insight traces.
Tune cube/matmul tile sizes (row tile, N fragment, K fragment) for a PyPTO kernel — analytic hints, an on-chip buffer constraint model, and an empirical device sweep. Use when optimizing a matmul/cube's throughput, sizing the row / N / K tiles, resolving Mat (L1) / L0C / UB buffer overflows, or trading one tile dim for another.
Locate which pypto commit introduced a precision regression. Only pypto and its corresponding simpler (submodule) are tracked — ptoas and pto-isa versions are not part of the bisect. If the culprit is a simpler submodule bump, performs a second-level bisect within simpler.
Reproduce a reported problem, collect dependency versions, and create a GitHub issue. Use when the user wants to file a bug, request a feature, or create any GitHub issue.
Complete git commit workflow including pre-commit checks, staging, message generation, and verification. Use when creating commits or preparing changes for commit.
Create or update a GitHub pull request after committing and pushing changes. Use when the user asks to create a PR, submit changes for review, or open a pull request.
| name | ascendc-docs-search |
| description | Ascend C 开发资源索引(本地+在线)。提供:(1) 本地 API 文档索引、示例代码映射,(2) 在线文档搜索功能,(3) 资源查找优先级,(4) Explore Agent 使用指南。优先使用本地资源,仅在本地检索不到时使用在线搜索。 |
本技能提供"本地优先,在线兜底"的文档搜索能力:
| 资源类型 | 路径 | 说明 |
|---|---|---|
| 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 脚本
推荐版本:9.0.0(与当前环境一致)
当前环境:A3 服务器,CANN 9.0.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
# 带版本过滤(推荐使用 9.0.0)
python skills/ascendc-docs-search/scripts/ascend_search_client.py "Ascend C API" --version "9.0.0"
获取详细内容:
python skills/ascendc-docs-search/scripts/ascend_content_fetcher.py <URL>
参数说明:
keyword:搜索关键词(必需),建议使用中文--max_results:返回结果数量(1-10,默认 10)--lang:语言设置(zh/en,默认 zh)--version:版本过滤字符串(如 "9.0.0")--doc_type:文档类型(DOC/API,默认 DOC)依赖安装:
pip install -r skills/ascendc-docs-search/requirements.txt