CATCCOS昇腾计算-通信融合算子模板库,是一个聚焦于提供高性能计算通信融合类算子基础模板的代码库。
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
docs: 修正样例文档与构建配置,并增强 setup.sh 传参 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> # message auto-generated for no-merge-commit merge: !81 merge docs/readme-setup-build-config into master docs: 修正样例文档与构建配置,并增强 setup.sh 传参 Created-by: dovahkiiin Commit-by: dovahkiiin Merged-by: cann-robot Description: ## 变更描述 / Description - 修改文档中对必选参数device_list的描述方式 - 在编译运行examples目录下算子时取消了对dynamic tiling相关内容的编译 - 增强了环境配置脚本setup.sh中对soc_type参数的校验(调用方式无变动,拦截了添加-soc_type参数时传递错误型号的场景) ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [x] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes [#4](https://gitcode.com/cann/catccos/issues/4) - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!81 | 13 天前 | |
更新3rdparty依赖到最新稳定版本 Co-authored-by: wuzhangda<wuzhangda@huawei.com> # message auto-generated for no-merge-commit merge: !82 merge update into master 更新3rdparty依赖到最新稳定版本 Created-by: wuzhangda Commit-by: wuzhangda Merged-by: cann-robot Description: ## 变更描述 / Description 1、更新catlass版本v1.5.0 -> v1.6.0 https://gitcode.com/cann/catlass/releases/v1.6.0 2、更新shmem版本v1.3.1 -> v1.5.0 https://gitcode.com/cann/shmem/releases/v1.5.0 <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ## 改动类型 / Change Type - [x] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes # - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [x] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [x] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!82 | 13 天前 | |
docs: 修正样例文档与构建配置,并增强 setup.sh 传参 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> # message auto-generated for no-merge-commit merge: !81 merge docs/readme-setup-build-config into master docs: 修正样例文档与构建配置,并增强 setup.sh 传参 Created-by: dovahkiiin Commit-by: dovahkiiin Merged-by: cann-robot Description: ## 变更描述 / Description - 修改文档中对必选参数device_list的描述方式 - 在编译运行examples目录下算子时取消了对dynamic tiling相关内容的编译 - 增强了环境配置脚本setup.sh中对soc_type参数的校验(调用方式无变动,拦截了添加-soc_type参数时传递错误型号的场景) ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [x] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes [#4](https://gitcode.com/cann/catccos/issues/4) - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!81 | 13 天前 | |
Add AllGather Matmul UDMA Co-authored-by: wuzhangda<wuzhangda@huawei.com> # message auto-generated for no-merge-commit merge: !87 merge allgather_matmul_udma into master Add AllGather Matmul UDMA Created-by: wuzhangda Commit-by: wuzhangda Merged-by: cann-robot Description: ## 变更描述 / Description <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> 新增了基于 UDMA(User Direct Memory Access)的 AllGather + MatMul 融合算子实现。 在 AIV 子核上使用 UDMA 直接跨节点传输矩阵数据,替代传统的 MTE 拷贝路径,减少数据搬运延迟。 当前通信策略是卡内搬运使用MTE从GM_A -> 本卡Shmem,卡间搬运使用UDMA从GM_A -> 远端Shmem ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [x] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes # - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [x] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [x] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!87 | 6 天前 | |
Add AllGather Matmul UDMA Co-authored-by: wuzhangda<wuzhangda@huawei.com> # message auto-generated for no-merge-commit merge: !87 merge allgather_matmul_udma into master Add AllGather Matmul UDMA Created-by: wuzhangda Commit-by: wuzhangda Merged-by: cann-robot Description: ## 变更描述 / Description <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> 新增了基于 UDMA(User Direct Memory Access)的 AllGather + MatMul 融合算子实现。 在 AIV 子核上使用 UDMA 直接跨节点传输矩阵数据,替代传统的 MTE 拷贝路径,减少数据搬运延迟。 当前通信策略是卡内搬运使用MTE从GM_A -> 本卡Shmem,卡间搬运使用UDMA从GM_A -> 远端Shmem ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [x] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes # - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [x] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [x] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!87 | 6 天前 | |
新增pre-commit开源代码检查工具 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> # message auto-generated for no-merge-commit merge: !25 merge task/add_pre-commit into master 新增pre-commit开源代码检查工具 Created-by: dovahkiiin Commit-by: dovahkiiin Merged-by: cann-robot Description: ## 变更描述 / Description ## 检查项 ### 1. 通用基础检查 ([pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)) | Hook | 功能 | |------|------| | trailing-whitespace | 删除行尾空格 | | end-of-file-fixer | 确保文件以空行结尾 | | check-yaml | 验证 YAML 语法 | | check-json | 验证 JSON 语法 | | check-added-large-files | 阻止提交大文件(默认 >500KB)| | check-merge-conflict | 检测合并冲突标记 | | detect-private-key | 检测私钥/敏感信息泄露 | ### 2. Python 代码检查 ([ruff](https://github.com/astral-sh/ruff)) - **ruff lint**: 代码规范检查(规则配置见 pre-commit/pyproject.toml) - 启用 D209(多行文档字符串格式) - 启用 SIM115(推荐 with 语句) - **ruff format**: 自动代码格式化 - **配置**: 使用 pre-commit/pyproject.toml,兼容 Python 3.10+ ### 3. Python 安全扫描 ([bandit](https://github.com/PyCQA/bandit)) - 扫描常见的 Python 安全漏洞(如硬编码密码、不安全的 eval、SQL 注入等) - **配置**: 中危及以上级别,配置见 pre-commit/pyproject.toml ### 4. 拼写检查 ([typos](https://github.com/crate-ci/typos)) - 检测代码和文档中的拼写错误 - **配置**: pre-commit/typos.toml,已添加昇腾生态相关词汇白名单 ### 5. C++ 代码格式化 ([clang-format](https://clang.llvm.org/docs/ClangFormat.html)) - 自动格式化 C/C++ 代码 - **风格**: Google Style,4 空格缩进,120 列限制,Allman 大括号风格 - **匹配文件**: *.c, *.h, *.cpp, *.hpp, *.cc, *.hh, *.cxx, *.hxx ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [x] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #123 可自动关闭 / Closes #123 to auto-close --> - Closes # - References # ## 测试信息 / Testing 功能测试   - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!25 | 2 个月前 | |
Add AllGather Matmul UDMA Co-authored-by: wuzhangda<wuzhangda@huawei.com> # message auto-generated for no-merge-commit merge: !87 merge allgather_matmul_udma into master Add AllGather Matmul UDMA Created-by: wuzhangda Commit-by: wuzhangda Merged-by: cann-robot Description: ## 变更描述 / Description <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> 新增了基于 UDMA(User Direct Memory Access)的 AllGather + MatMul 融合算子实现。 在 AIV 子核上使用 UDMA 直接跨节点传输矩阵数据,替代传统的 MTE 拷贝路径,减少数据搬运延迟。 当前通信策略是卡内搬运使用MTE从GM_A -> 本卡Shmem,卡间搬运使用UDMA从GM_A -> 远端Shmem ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [x] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes # - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [x] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [x] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!87 | 6 天前 | |
Add agmm remote-read operator Co-authored-by: xixing1<xixing1@huawei.com> # message auto-generated for no-merge-commit merge: !55 merge allgather_remote_read into master Add agmm remote-read operator Created-by: xixing1 Commit-by: xixing1 Merged-by: cann-robot Description: ## 变更描述 / Description 新增 allgather_matmul remote-read 变体,通过 shmem full-A stage 支持从远端 rank 读取 A,并补充 example、dynamic_tiling 入口和 timer 打点。 主要改动: - 新增基础 remote-read kernel 和 local-mm-opt remote-read kernel。 - 将 ptrSymmetric 划分为 full A stage 和 gathered A workspace。 - ptrA != nullptr 时在 kernel 内将完整 A 从 GM stage 到 shmem;ptrA == nullptr 时复用 caller 已放入 shmem A-stage 的 A。 - 在复用和发布 shmem A-stage 时增加跨 rank 同步,避免快卡覆盖 A stage 时慢卡仍 remote get 旧数据。 - 新增 allgather_matmul_remote_read example 和 agmmrr dynamic_tiling 映射。 - 新增 AIV_LOCAL_COPY timer event。 ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [x] 新功能 / New Feature - [x] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [x] 文档更新 / Documentation - [x] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues - N/A ## 测试信息 / Testing - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!55 | 29 天前 | |
Add AllGather Matmul UDMA Co-authored-by: wuzhangda<wuzhangda@huawei.com> # message auto-generated for no-merge-commit merge: !87 merge allgather_matmul_udma into master Add AllGather Matmul UDMA Created-by: wuzhangda Commit-by: wuzhangda Merged-by: cann-robot Description: ## 变更描述 / Description <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> 新增了基于 UDMA(User Direct Memory Access)的 AllGather + MatMul 融合算子实现。 在 AIV 子核上使用 UDMA 直接跨节点传输矩阵数据,替代传统的 MTE 拷贝路径,减少数据搬运延迟。 当前通信策略是卡内搬运使用MTE从GM_A -> 本卡Shmem,卡间搬运使用UDMA从GM_A -> 远端Shmem ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [x] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes # - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [x] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [x] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!87 | 6 天前 | |
add quant alltoall and quant allgather Co-authored-by: cly121884<chenluyao6@huawei.com> # message auto-generated for no-merge-commit merge: !27 merge master into master add quant alltoall and quant allgather Created-by: cly121884 Commit-by: cly121884 Merged-by: cann-robot Description: ## 变更描述 / Description <!-- 本 PR 做了什么,为什么需要 / What does this PR do and why --> ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [√] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #123 可自动关闭 / Closes #123 to auto-close --> - Closes # - References # ## 测试信息 / 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/catccos!27 | 1 个月前 | |
编译依赖配置整合 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> | 3 个月前 | |
新增pre-commit开源代码检查工具 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> # message auto-generated for no-merge-commit merge: !25 merge task/add_pre-commit into master 新增pre-commit开源代码检查工具 Created-by: dovahkiiin Commit-by: dovahkiiin Merged-by: cann-robot Description: ## 变更描述 / Description ## 检查项 ### 1. 通用基础检查 ([pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)) | Hook | 功能 | |------|------| | trailing-whitespace | 删除行尾空格 | | end-of-file-fixer | 确保文件以空行结尾 | | check-yaml | 验证 YAML 语法 | | check-json | 验证 JSON 语法 | | check-added-large-files | 阻止提交大文件(默认 >500KB)| | check-merge-conflict | 检测合并冲突标记 | | detect-private-key | 检测私钥/敏感信息泄露 | ### 2. Python 代码检查 ([ruff](https://github.com/astral-sh/ruff)) - **ruff lint**: 代码规范检查(规则配置见 pre-commit/pyproject.toml) - 启用 D209(多行文档字符串格式) - 启用 SIM115(推荐 with 语句) - **ruff format**: 自动代码格式化 - **配置**: 使用 pre-commit/pyproject.toml,兼容 Python 3.10+ ### 3. Python 安全扫描 ([bandit](https://github.com/PyCQA/bandit)) - 扫描常见的 Python 安全漏洞(如硬编码密码、不安全的 eval、SQL 注入等) - **配置**: 中危及以上级别,配置见 pre-commit/pyproject.toml ### 4. 拼写检查 ([typos](https://github.com/crate-ci/typos)) - 检测代码和文档中的拼写错误 - **配置**: pre-commit/typos.toml,已添加昇腾生态相关词汇白名单 ### 5. C++ 代码格式化 ([clang-format](https://clang.llvm.org/docs/ClangFormat.html)) - 自动格式化 C/C++ 代码 - **风格**: Google Style,4 空格缩进,120 列限制,Allman 大括号风格 - **匹配文件**: *.c, *.h, *.cpp, *.hpp, *.cc, *.hh, *.cxx, *.hxx ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [x] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #123 可自动关闭 / Closes #123 to auto-close --> - Closes # - References # ## 测试信息 / Testing 功能测试   - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [ ] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!25 | 2 个月前 | |
docs: 修正样例文档与构建配置,并增强 setup.sh 传参 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> # message auto-generated for no-merge-commit merge: !81 merge docs/readme-setup-build-config into master docs: 修正样例文档与构建配置,并增强 setup.sh 传参 Created-by: dovahkiiin Commit-by: dovahkiiin Merged-by: cann-robot Description: ## 变更描述 / Description - 修改文档中对必选参数device_list的描述方式 - 在编译运行examples目录下算子时取消了对dynamic tiling相关内容的编译 - 增强了环境配置脚本setup.sh中对soc_type参数的校验(调用方式无变动,拦截了添加-soc_type参数时传递错误型号的场景) ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [x] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes [#4](https://gitcode.com/cann/catccos/issues/4) - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [x] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [x] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [x] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!81 | 13 天前 | |
补充LICENSE信息 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> # message auto-generated for no-merge-commit merge: !35 merge task/add_LICENSE into master 补充LICENSE信息 Created-by: dovahkiiin Commit-by: dovahkiiin Merged-by: cann-robot Description: ## 变更描述 / Description 补充LICENSE信息 ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [ ] 文档更新 / Documentation - [ ] 测试相关 / Test - [x] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes # - References # ## 测试信息 / Testing 不涉及 - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [x] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [ ] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!35 | 2 个月前 | |
docs: 补充 README 硬件支持中的 Atlas 350/Ascend950 说明 Co-authored-by: dovahkiiin<haorunzhe@h-partners.com> # message auto-generated for no-merge-commit merge: !89 merge docs/readme-ascend950-hardware into master docs: 补充 README 硬件支持中的 Atlas 350/Ascend950 说明 Created-by: dovahkiiin Commit-by: dovahkiiin Merged-by: cann-robot Description: ## 变更描述 / Description - 在根目录 README「软硬件配套说明」中补充 Atlas 350 / Ascend950 硬件支持 - NPU 系列增加 Atlas 350 加速卡,产品列表增加 Ascend950PR/Ascend950DT 说明 - 命名与 [昇腾产品形态说明](https://www.hiascend.com/document/detail/zh/AscendFAQ/ProduTech/productform/hardwaredesc_0001.html) 及仓库内 Atlas 350 表述对齐 ## 改动类型 / Change Type - [ ] Bug 修复 / Bug Fix - [ ] 新功能 / New Feature - [ ] 性能优化 / Performance - [ ] 代码重构 / Refactoring - [x] 文档更新 / Documentation - [ ] 测试相关 / Test - [ ] 其它 / Other ## 关联 Issue / Related Issues <!-- Closes #000 可自动关闭 / Closes #000 to auto-close --> - Closes #8 - References # ## 测试信息 / Testing <!-- 简要测试说明或关键结果 / Brief test description or key results --> - [ ] 单元测试通过 / UT passed - [ ] 集成测试通过 / ST passed - [ ] 人工验证通过 / Manual verified ## 检查清单 / Checklist - [ ] 代码符合规范 / Code follows style guide - [ ] 测试添加并通过 / Tests added and passed - [x] 文档已更新 / Docs updated if needed - [ ] 无硬编码敏感信息 / No secrets hardcoded - [x] 提交信息符合规范 / Commit message follows convention See merge request: cann/catccos!89 | 7 天前 |
CATCCOS
📌 简介
CATCCOS(CANN Templates for Compute-Communication Overlap Subroutines),中文名为昇腾计算-通信融合算子模板库,是一个聚焦于提供高性能计算通信融合类算子基础模板的代码库。
通过抽象分层的方式将计算-通信算子代码模板化。简化通算融合算子开发,解决易用性问题。内存语义实现计算通信细粒度并行,最大化掩盖度;根据计算通信特征,结合硬件架构深度优化,提供极致性能。
本代码仓为CATCCOS代码仓。结合昇腾生态力量,共同设计研发算子模板,并提供典型通算融合算子的高性能实现代码样例。
🧩 模板分层设计

分层详细介绍和各层级 API,见 文档索引;API 分层说明见 api/api.md;当前支持算子见 operators.md。
📁 目录结构说明
catccos
├── 3rdparty # 依赖的catlass工程文件
├── docs # 文档(索引见 docs/README.md,算子见 docs/operators.md)
├── examples # kernel使用样例
└── include # 模板头文件
💻 软硬件配套说明
-
硬件平台:
- CPU:
aarch64/x86_64 - NPU:
Atlas A2 训练系列产品/Atlas 800I A2 推理产品/A200I A2 Box 异构组件/Atlas 350 加速卡Atlas 800T A2 训练服务器Atlas 900 A2 PoD 集群基础单元Atlas 200T A2 Box16 异构子框Atlas 800I A2 推理服务器A200I A2 Box 异构组件Atlas 350 加速卡(Ascend950PR/Ascend950DT)
- CPU:
-
软件版本:
gcc >= 7.5, < 13(已测试7.5,8.3,9.3,11.4,建议使用9.3以上版本。)cmake >= 3.15python >= 3.10
-
CANN版本:
| CANN包类别 | 版本要求 | 获取方式 |
|---|---|---|
| 社区版 | 8.5.0.alpha002 及之后版本 | 社区CANN包下载地址 |
| 商用版 | 8.5.0及之后版本 | 请咨询对应Support/SupportE获取 |
- 安装CANN开发套件包:
chmod +x Ascend-cann-toolkit_<version>_linux-<arch>.run
./Ascend-cann-toolkit_<version>_linux-<arch>.run --install
🚀 快速上手
以matmul_allreduce算子样例为例,快速上手CATCCOS算子开发:
- 配置环境变量(可选)
# 用于统一配置 CANN、SHMEM、CATLASS 相关环境变量(A2 默认)
source ./examples/utils/setup.sh
# Ascend950 算子需指定 soc 类型(首次编译 SHMEM 时生效)
source ./examples/utils/setup.sh -soc_type Ascend950
注意:
- 配置环境变量时,若 CANN 未安装到默认路径,需先配置
ASCEND_HOME_PATH环境变量。 - 若使用
examples下的编译脚本,可跳过此步骤(各算子build.sh会自动 source 并传入所需参数)。 setup.sh的编译选项仅在 首次 构建 SHMEM(3rdparty/shmem/install不存在)时生效;切换设备型号需删除该目录后重新执行,例如:rm -rf 3rdparty/shmem/install source ./examples/utils/setup.sh -soc_type Ascend950
- 编译算子样例 进入examples下对应的算子目录并执行编译脚本,即可编译examples中的kernel代码。
cd examples/matmul_allreduce
bash scripts/build.sh
- 执行算子样例 在示例目录下执行运行脚本,执行算子样例程序。
bash scripts/run.sh <device_list>
出现如下执行结果,说明算子运行成功,精度比较通过。
error num: 0
PASS
🛠 代码检查说明
代码检查请参考pre-commit-guide.md文档。