| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
数据类型和控制流相关API Co-authored-by: mayafei<mayafei4@huawei.com> # message auto-generated for no-merge-commit merge: !115 merge docs/types-and-control-flow into master 数据类型和控制流相关API Created-by: mayafei Commit-by: mayafei Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!115 | 1 个月前 | |
文档站点搭建 & api文档模板 Co-authored-by: taomengyuan-hw<taomengyuan3@huawei.com> # message auto-generated for no-merge-commit merge: !57 merge master into master 文档站点搭建 & api文档模板 Created-by: taomengyuan-hw Commit-by: taomengyuan-hw Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!57 | 1 个月前 | |
数据类型和控制流相关API Co-authored-by: mayafei<mayafei4@huawei.com> # message auto-generated for no-merge-commit merge: !115 merge docs/types-and-control-flow into master 数据类型和控制流相关API Created-by: mayafei Commit-by: mayafei Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!115 | 1 个月前 | |
文档站点搭建 & api文档模板 Co-authored-by: taomengyuan-hw<taomengyuan3@huawei.com> # message auto-generated for no-merge-commit merge: !57 merge master into master 文档站点搭建 & api文档模板 Created-by: taomengyuan-hw Commit-by: taomengyuan-hw Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!57 | 1 个月前 | |
文档站点搭建 & api文档模板 Co-authored-by: taomengyuan-hw<taomengyuan3@huawei.com> # message auto-generated for no-merge-commit merge: !57 merge master into master 文档站点搭建 & api文档模板 Created-by: taomengyuan-hw Commit-by: taomengyuan-hw Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!57 | 1 个月前 | |
docs: 仓群框图 cannbot-dsl 定位改为 Agent 亲和的编程范式 Co-authored-by: jon_jin<jinjiong@hisilicon.com> # message auto-generated for no-merge-commit merge: !75 merge docs/figure-dsl-paradigm into master docs: 仓群框图 cannbot-dsl 定位改为 Agent 亲和的编程范式 Created-by: jon_jin Commit-by: jon_jin Merged-by: cann-robot Description: cannbot-dsl 的定位修正为「Agent 亲和的编程范式」: - 概述角色句:「提供 agent 亲和语言」→「提供 Agent 亲和的编程范式」 - 框图同步更新 关联 issue:#8 See merge request: cann/cannbot-dsl!75 | 1 个月前 | |
add aclnn Co-authored-by: sky-zyh<zhangyuhan45@huawei.com> # message auto-generated for no-merge-commit merge: !67 merge aclnn into master add aclnn Created-by: sky-zyh Commit-by: sky-zyh Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!67 | 1 个月前 | |
文档站点搭建 & api文档模板 Co-authored-by: taomengyuan-hw<taomengyuan3@huawei.com> # message auto-generated for no-merge-commit merge: !57 merge master into master 文档站点搭建 & api文档模板 Created-by: taomengyuan-hw Commit-by: taomengyuan-hw Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!57 | 1 个月前 | |
docs(kernel): 计算类 API 调用示例迁 @host(160 页)+ 同步管理 API 文档(9 页) Co-authored-by: mayafei<mayafei4@huawei.com> # message auto-generated for no-merge-commit merge: !102 merge docs/kernel-compute-and-sync into master docs(kernel): 计算类 API 调用示例迁 @host(160 页)+ 同步管理 API 文档(9 页) Created-by: mayafei Commit-by: mayafei Merged-by: cann-robot Description: # 概述 本 MR 为 docs/api/kernel/ 下的 **168 页** Kernel API 文档补充与修正,含三部分: 1. **计算类 API 调用示例迁移(159 页)**:调用示例的 Python 入口由 @jit 改为 @host。 @jit 是 DSL 内部的行内辅助函数、不能作为 Python 入口,按原写法这些示例无法运行。 同时把正文中对 cb.vf 的引用统一为 ASC 术语「VF作用域」。 2. **同步管理 API 文档(9 页,新增)**:核间同步(同步管理)文档,覆盖四种模式 0/1/2/4。 3. **删除 1 页**:cube_compute/enable-hf32-trans.md。 ## 一、计算类 API 调用示例迁移(159 页) | 目录 | 页数 | |---|---| | reg_compute/ | 115 | | scalar_compute/ | 13 | | atomic/ | 11 | | system/ | 9 | | cube_compute/ | 7 | | synchronization-cache/ | 4 | | **合计** | **159** | 改动范围限于各页 ## 调用示例 段;print(...) 语句与 ### 预期结果 段均未改动。 ## 二、同步管理 API 文档(9 页,新增) docs/api/kernel/resource-management/: - **接口页 9 个**:global_sync_all、cube_sync_block_{arrive,wait}、vec_sync_block_{arrive,wait}、 cube_sync_intra_{arrive,wait}、vec_sync_intra_{arrive,wait} - **能力/导读页 4 个**:系统同步能力概述、核间同步能力概述、关键特性说明、分类索引 - **配图 7 张**(docs/public/figures/,按 DSL 接口名绘制) ## 三、删除 enable-hf32-trans 页 docs/api/kernel/cube_compute/enable-hf32-trans.md:该接口已在 cannbotdsl 0.7.0 中移除; ASC 侧的 asc_enable_hf32_trans 亦已标记废弃、替代接口为 set_hf32_round_mode (该页已存在)。故删除本页,并在 cube_compute/key-features-hf32.md 补一句迁移说明。 ## 上板验证 从每页 ## 调用示例 抽取代码运行,按 ### 预期结果 逐字比对 stdout。 | 类别 | 目录 | 页数 | cannbotdsl 0.6.0 | cannbotdsl 0.7.0 | |---|---|---|---|---| | 计算类 | reg_compute/ | 115 | 112 PASS / 3 FAIL | 115 PASS | | 计算类 | scalar_compute/ | 13 | 13 PASS | 13 PASS | | 计算类 | atomic/ | 11 | 11 PASS | 11 PASS | | 计算类 | cube_compute/ | 7 | 7 PASS | 7 PASS | | 计算类 | synchronization-cache/ | 4 | 4 PASS | 4 PASS | | 系统类 | system/ | 9 | 4 PASS / 5 OUTPUT | 4 PASS / 5 OUTPUT | | 同步类 | resource-management/ | 9 | 9 PASS | 9 PASS | | **合计** | | **168** | **160 PASS / 5 OUTPUT / 3 FAIL** | **163 PASS / 5 OUTPUT / 0 FAIL** | - OUTPUT:system/* 返回的是运行时动态量,文档按模板要求写占位符;实测值均落在给定范围内,实为通过。 - 3 条 FAIL 为库缺陷(vceil/vfloor/vtrunc),与本次文档改动无关,文档按应然写法保留; 该问题在 0.7.0 上已修复。 cd docs && npm run build 通过,无死链。 🤖 Generated with [Claude Code](https://claude.com/claude-code) See merge request: cann/cannbot-dsl!102 | 1 个月前 | |
文档站点搭建 & api文档模板 Co-authored-by: taomengyuan-hw<taomengyuan3@huawei.com> # message auto-generated for no-merge-commit merge: !57 merge master into master 文档站点搭建 & api文档模板 Created-by: taomengyuan-hw Commit-by: taomengyuan-hw Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!57 | 1 个月前 | |
文档站点搭建 & api文档模板 Co-authored-by: taomengyuan-hw<taomengyuan3@huawei.com> # message auto-generated for no-merge-commit merge: !57 merge master into master 文档站点搭建 & api文档模板 Created-by: taomengyuan-hw Commit-by: taomengyuan-hw Merged-by: cann-robot Description: <!-- 感谢您的合入申请! --> ### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ### 该PR关联的issue *(格式为fixes #<issue号>, 或者resolves #<issue号>)*: fixes # ### 希望检视人员了解: ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/cannbot-dsl!57 | 1 个月前 | |
docs(kernel): 新增计算类 Kernel API 文档(reg_compute / cube_compute / scalar_compute / atomic) Co-authored-by: mayafei<mayafei4@huawei.com> # message auto-generated for no-merge-commit merge: !89 merge docs/compute-apis-revised into master docs(kernel): 新增计算类 Kernel API 文档(reg_compute / cube_compute / scalar_compute / atomic) Created-by: mayafei Commit-by: mayafei Merged-by: cann-robot Description: ## 背景 本 MR 提供计算类 Kernel API 的文档,覆盖范围与 !72 相同,但按以下口径重做: - 接口的表述与术语统一到仓内既有 Kernel API 文档的口径,不新造说法、不额外加限制; - 每个接口补齐 dtype、取值范围、约束与返回值说明; - 所有调用示例改为可直接运行的形式,示例中的数值均为实跑结果,未做估算。 ## 内容 **提交 ①:新增页面**(204 个文件,+18219) docs/api/kernel/ 下 reg_compute、cube_compute、scalar_compute、atomic 四个族的接口页面、30 张配图与导航入口(docs/.vitepress/config.mts)。 **提交 ②:系统类页面修正**(8 个文件,+59/−35) - system/:get-status、get-vf-len、get-squeeze-status、get-subblock-dim、get-subblock-id 的状态位定义、取值范围与约束说明按当前实现修正。 - system/get-block-idx、get-block-num:调用示例改为不经 DCache 的标量点写,并补齐体例。 - kernel/index.md:接口分类描述与子页对齐。 **提交 ③:与上游 ASC 逐页对齐**(172 个文件,+860/−365) - 章节对齐:31 页补 ## 流水类型、8 页补 ## 关键特性,取值与 ASC 对应页一致。 - 列表页去掉 API 名后的描述,与 ASC 家族落地页的样式一致。 - VF 模式值 raw → simd:现库 vf.py 只接受 simd/simt,传 raw 直接 ValueError。 - 删除 ASC 没有、又不含 DSL 专属信息的自造句。 **提交 ④:新增概述层页面与配图**(55 个文件,+1265) - reg_compute(含 load/store 概述)、atomic、cube_compute、synchronization-cache 的「概述 / 关键特性说明」。 - 矩阵计算背景页:计算单元、计算流程、分形格式、GEMV / HF32 / K 方向对齐 / UnitFlag。 - 38 张配图,图内文字已按 DSL 用语重绘(vload/vstore/vcast/mem_copy/matmul 等)。 - 侧边栏与各家族落地页同步加上「概述 / 关键特性说明」入口。 **提交 ⑤:修正概述页调用示例**(1 个文件) - reg_compute/store/overview.md:原示例用掩码 pattern="m3" 后按「压缩」语义断言,但 vstore 是**带掩码的搬出**(掩码位对应目的位置,不做压缩),实测 21/22 个元素不符。改为直接演示该页「关键特性」里的地址维护方式(立即数偏移搬出 / Post Update 搬出),两种方式实测均得到 dst[i] = src0[i] + src1[i]。 **提交 ⑥:数据搬运页面回退**(2 个文件) 本 MR 只覆盖计算类 API:data-movement/ 的 mem-copy.md 与 index.md 回退到基线版本(即提交 ③ 之前的形态)。提交 ③ 里对 mem-copy 的重写(按现库补全真实签名、engine 配置项、修掉裸 Channel 示例)已随该提交一并撤出,该目录相对 master 不再有改动——这部分另行提交。 **提交 ⑦:删除仅 A2/A3 支持的内容**(10 个文件,+12/−77) - cube_compute/fractal-formats.md:删除 Zz 格式整节及其配图;Zn 节的「分形大小约束同 Zz」改为内联列表;Nz 节去掉 Zz 相关表述;全页图号重排为 图1~图8。 - 删除 cube_compute/key-features-k-align.md 整页:该特性(k_direction_align 参数、K 方向 16/8 对齐、转置场景)在上游 ASC 中整体标注为 npu="910b,A3",950 明确无需该特性,本库也未提供对应的 K 方向对齐配置参数。 - 同步移除侧边栏条目与 cube_compute/index.md、key-features.md 两处链接,并删除 5 张仅被上述内容引用的配图。 ## 验证 - vitepress build 通过,无失效链接、无导航告警;侧边栏 227 条链接条目(其中 226 条内部链接)0 断链,figures/ 下 63 张配图 0 死图 0 孤儿。 - 页内锚点按 VitePress 自身的 slug 规则逐条核对:0 死锚点。 - 页面与概念页里的函数原型、参数表逐行对照安装的现库 inspect.signature:一致。 - 调用示例共 **161 个**,在 Ascend 950(dav-3510)上按 lane 串行实跑:**PASS 151**,FAIL 5 条,另 5 条 stdout 含随环境变化的值(页内断言通过)。预期结果按实跑输出写。 ## 实跑中发现的问题 **库侧缺陷(本 MR 不含库代码改动)** - vceil / vfloor / vtrunc:同 dtype cast 无 lowering,翻译期发射不存在的 asc_cast_unknown 导致编译失败(issue #73,新包 0.6.0+gff410b6 上仍复现)。 - cube_compute/enable-hf32-trans:cube.py:297 用 DSL == 比较 MLIR 操作数,抛 TypeError,接口当前不可用(issue #74)。 **文档侧问题** - data-movement/mem-copy:调用示例把裸 Channel 直接传给 cb.mem_copy,现库抛 TypeError: select a Tensor with Channel.produce()/consume() before passing it to a data operation。该页相对 master 无改动,是 master 既有问题,不在本 MR 范围内(提交 ③ 里曾修好,已随提交 ⑥ 撤出,需要时可单独提)。 - reg_compute/store/overview:示例的掩码语义断言写错(把带掩码搬出当成压缩搬出);已重写(见提交 ⑤)。 ## 说明 - 只改文档,不动任何代码;samples/ 未改动。 - 仅 A2/A3 支持的内容(Zz 分形格式、K 方向对齐约束)已按 950 的口径删除;产品支持情况表未动。 - 与 !72 的关系:同一批接口的修订版,页面表述、配图与示例均已重做,建议以本 MR 为准。 - data-movement/、defs/tensor-ptr.md 不在本 MR 范围内,另行提交。 🤖 Generated with [Claude Code](https://claude.com/claude-code) See merge request: cann/cannbot-dsl!89 | 1 个月前 | |
docs(kernel): 新增计算类 Kernel API 文档(reg_compute / cube_compute / scalar_compute / atomic) Co-authored-by: mayafei<mayafei4@huawei.com> # message auto-generated for no-merge-commit merge: !89 merge docs/compute-apis-revised into master docs(kernel): 新增计算类 Kernel API 文档(reg_compute / cube_compute / scalar_compute / atomic) Created-by: mayafei Commit-by: mayafei Merged-by: cann-robot Description: ## 背景 本 MR 提供计算类 Kernel API 的文档,覆盖范围与 !72 相同,但按以下口径重做: - 接口的表述与术语统一到仓内既有 Kernel API 文档的口径,不新造说法、不额外加限制; - 每个接口补齐 dtype、取值范围、约束与返回值说明; - 所有调用示例改为可直接运行的形式,示例中的数值均为实跑结果,未做估算。 ## 内容 **提交 ①:新增页面**(204 个文件,+18219) docs/api/kernel/ 下 reg_compute、cube_compute、scalar_compute、atomic 四个族的接口页面、30 张配图与导航入口(docs/.vitepress/config.mts)。 **提交 ②:系统类页面修正**(8 个文件,+59/−35) - system/:get-status、get-vf-len、get-squeeze-status、get-subblock-dim、get-subblock-id 的状态位定义、取值范围与约束说明按当前实现修正。 - system/get-block-idx、get-block-num:调用示例改为不经 DCache 的标量点写,并补齐体例。 - kernel/index.md:接口分类描述与子页对齐。 **提交 ③:与上游 ASC 逐页对齐**(172 个文件,+860/−365) - 章节对齐:31 页补 ## 流水类型、8 页补 ## 关键特性,取值与 ASC 对应页一致。 - 列表页去掉 API 名后的描述,与 ASC 家族落地页的样式一致。 - VF 模式值 raw → simd:现库 vf.py 只接受 simd/simt,传 raw 直接 ValueError。 - 删除 ASC 没有、又不含 DSL 专属信息的自造句。 **提交 ④:新增概述层页面与配图**(55 个文件,+1265) - reg_compute(含 load/store 概述)、atomic、cube_compute、synchronization-cache 的「概述 / 关键特性说明」。 - 矩阵计算背景页:计算单元、计算流程、分形格式、GEMV / HF32 / K 方向对齐 / UnitFlag。 - 38 张配图,图内文字已按 DSL 用语重绘(vload/vstore/vcast/mem_copy/matmul 等)。 - 侧边栏与各家族落地页同步加上「概述 / 关键特性说明」入口。 **提交 ⑤:修正概述页调用示例**(1 个文件) - reg_compute/store/overview.md:原示例用掩码 pattern="m3" 后按「压缩」语义断言,但 vstore 是**带掩码的搬出**(掩码位对应目的位置,不做压缩),实测 21/22 个元素不符。改为直接演示该页「关键特性」里的地址维护方式(立即数偏移搬出 / Post Update 搬出),两种方式实测均得到 dst[i] = src0[i] + src1[i]。 **提交 ⑥:数据搬运页面回退**(2 个文件) 本 MR 只覆盖计算类 API:data-movement/ 的 mem-copy.md 与 index.md 回退到基线版本(即提交 ③ 之前的形态)。提交 ③ 里对 mem-copy 的重写(按现库补全真实签名、engine 配置项、修掉裸 Channel 示例)已随该提交一并撤出,该目录相对 master 不再有改动——这部分另行提交。 **提交 ⑦:删除仅 A2/A3 支持的内容**(10 个文件,+12/−77) - cube_compute/fractal-formats.md:删除 Zz 格式整节及其配图;Zn 节的「分形大小约束同 Zz」改为内联列表;Nz 节去掉 Zz 相关表述;全页图号重排为 图1~图8。 - 删除 cube_compute/key-features-k-align.md 整页:该特性(k_direction_align 参数、K 方向 16/8 对齐、转置场景)在上游 ASC 中整体标注为 npu="910b,A3",950 明确无需该特性,本库也未提供对应的 K 方向对齐配置参数。 - 同步移除侧边栏条目与 cube_compute/index.md、key-features.md 两处链接,并删除 5 张仅被上述内容引用的配图。 ## 验证 - vitepress build 通过,无失效链接、无导航告警;侧边栏 227 条链接条目(其中 226 条内部链接)0 断链,figures/ 下 63 张配图 0 死图 0 孤儿。 - 页内锚点按 VitePress 自身的 slug 规则逐条核对:0 死锚点。 - 页面与概念页里的函数原型、参数表逐行对照安装的现库 inspect.signature:一致。 - 调用示例共 **161 个**,在 Ascend 950(dav-3510)上按 lane 串行实跑:**PASS 151**,FAIL 5 条,另 5 条 stdout 含随环境变化的值(页内断言通过)。预期结果按实跑输出写。 ## 实跑中发现的问题 **库侧缺陷(本 MR 不含库代码改动)** - vceil / vfloor / vtrunc:同 dtype cast 无 lowering,翻译期发射不存在的 asc_cast_unknown 导致编译失败(issue #73,新包 0.6.0+gff410b6 上仍复现)。 - cube_compute/enable-hf32-trans:cube.py:297 用 DSL == 比较 MLIR 操作数,抛 TypeError,接口当前不可用(issue #74)。 **文档侧问题** - data-movement/mem-copy:调用示例把裸 Channel 直接传给 cb.mem_copy,现库抛 TypeError: select a Tensor with Channel.produce()/consume() before passing it to a data operation。该页相对 master 无改动,是 master 既有问题,不在本 MR 范围内(提交 ③ 里曾修好,已随提交 ⑥ 撤出,需要时可单独提)。 - reg_compute/store/overview:示例的掩码语义断言写错(把带掩码搬出当成压缩搬出);已重写(见提交 ⑤)。 ## 说明 - 只改文档,不动任何代码;samples/ 未改动。 - 仅 A2/A3 支持的内容(Zz 分形格式、K 方向对齐约束)已按 950 的口径删除;产品支持情况表未动。 - 与 !72 的关系:同一批接口的修订版,页面表述、配图与示例均已重做,建议以本 MR 为准。 - data-movement/、defs/tensor-ptr.md 不在本 MR 范围内,另行提交。 🤖 Generated with [Claude Code](https://claude.com/claude-code) See merge request: cann/cannbot-dsl!89 | 1 个月前 |
CANNBot-DSL 文档站
这是 cannbot-dsl.gitcode.com 的文档站源码。当前阶段包含站点框架、项目级内容和首批 API 文档,其余 API 将在核对实现后逐步补充。
本地开发
cd docs
npm install
npm run dev
开发服务器监听 127.0.0.1:5173。
构建与预览
npm run build
npm run preview
生产预览监听 127.0.0.1:4174,构建产物位于 .vitepress/dist/。
目录
docs/
├── .vitepress/ # 站点配置与主题
├── public/ # 静态资源
├── getting-started/ # 开始使用
├── guide/ # 项目指南
├── examples/ # 样例导航
├── api/ # 公共 API 文档
├── community/ # 参与贡献
└── about/ # 版本与发布信息