Merged
chore: replace gitcode.com links with atomgit.com #12664
qzzzy1Add on Sep 22
chore: replace gitcode.com links with atomgit.com #12664
Merged
Merged fromqzzzy1/ops-transformer_1773masterintocann/ops-transformermaster
Total: 220 files changed+366-366
| @@ -14,7 +14,7 @@ set -e | |||
| 14 | echo "#########################打印SN号#########################" | 14 | echo "#########################打印SN号#########################" |
| 15 | hdc list targets | 15 | hdc list targets |
| 16 | echo "#########################下载kirin_cann_test代码仓#########################" | 16 | echo "#########################下载kirin_cann_test代码仓#########################" |
| 17 | -git clone https://gitcode.com/funna2000/kirin_cann_test.git | 17 | +git clone https://atomgit.com/funna2000/kirin_cann_test.git |
| 18 | cd kirin_cann_test/harmony-infer-chs | 18 | cd kirin_cann_test/harmony-infer-chs |
| 19 | cp ../entry-default-signed.hap ./ | 19 | cp ../entry-default-signed.hap ./ |
| 20 | bash rdv_kirin9030_gitcode.sh $(hdc list targets) transformer.json Kirin9030 ${repo_name} ${MERGE_ID} ${obs_path} | 20 | bash rdv_kirin9030_gitcode.sh $(hdc list targets) transformer.json Kirin9030 ${repo_name} ${MERGE_ID} ${obs_path} |
| @@ -14,7 +14,7 @@ set -e | |||
| 14 | echo "#########################打印SN号#########################" | 14 | echo "#########################打印SN号#########################" |
| 15 | hdc list targets | 15 | hdc list targets |
| 16 | echo "#########################下载kirin_cann_test代码仓#########################" | 16 | echo "#########################下载kirin_cann_test代码仓#########################" |
| 17 | -git clone https://gitcode.com/funna2000/kirin_cann_test.git | 17 | +git clone https://atomgit.com/funna2000/kirin_cann_test.git |
| 18 | cd kirin_cann_test/harmony-infer-chs | 18 | cd kirin_cann_test/harmony-infer-chs |
| 19 | cp ../entry-default-signed.hap ./ | 19 | cp ../entry-default-signed.hap ./ |
| 20 | bash rdv_kirinx90_gitcode.sh $(hdc list targets) transformer.json KirinX90 ${repo_name} ${MERGE_ID} ${obs_path} | 20 | bash rdv_kirinx90_gitcode.sh $(hdc list targets) transformer.json KirinX90 ${repo_name} ${MERGE_ID} ${obs_path} |
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | ops-transformer算子首个Beta版本8.5.0-beta.1 现已发布。本版本引入了多项新增特性、问题修复及性能改进,目前仍处于测试阶段。 | 9 | ops-transformer算子首个Beta版本8.5.0-beta.1 现已发布。本版本引入了多项新增特性、问题修复及性能改进,目前仍处于测试阶段。 |
| 10 | 我们诚挚欢迎社区反馈,以进一步提升ops-transformer的稳定性和功能完备性。 | 10 | 我们诚挚欢迎社区反馈,以进一步提升ops-transformer的稳定性和功能完备性。 |
| 11 | -使用方式请参阅[官方文档](https://gitcode.com/cann/ops-transformer/blob/master/README.md)。 | 11 | +使用方式请参阅[官方文档](https://atomgit.com/cann/ops-transformer/blob/master/README.md)。 |
| 12 | 12 | ||
| 13 | ### 🔗 版本地址 | 13 | ### 🔗 版本地址 |
| 14 | 14 | ||
| @@ -39,13 +39,13 @@ ops-transformer算子首个Beta版本8.5.0-beta.1 现已发布。本版本引入 | |||
| 39 | 39 | ||
| 40 | ### 🚀 关键特性 | 40 | ### 🚀 关键特性 |
| 41 | 41 | ||
| 42 | -- 【工程能力】transformer类onnx算子插件支持。([#539](https://gitcode.com/cann/ops-transformer/pull/539)) | 42 | +- 【工程能力】transformer类onnx算子插件支持。([#539](https://atomgit.com/cann/ops-transformer/pull/539)) |
| 43 | -- 【算子实现】部分推理算子新增对KirinX90支持。([#609](https://gitcode.com/cann/ops-transformer/pull/609)) | 43 | +- 【算子实现】部分推理算子新增对KirinX90支持。([#609](https://atomgit.com/cann/ops-transformer/pull/609)) |
| 44 | -- 【资料优化】增加QUICK_START,离线编译模式,aicore/graph模式下开发指南完善。([#612](https://gitcode.com/cann/ops-transformer/pull/612)、[#629](https://gitcode.com/cann/ops-transformer/pull/629)、[#342](https://gitcode.com/cann/ops-transformer/pull/342)) | 44 | +- 【资料优化】增加QUICK_START,离线编译模式,aicore/graph模式下开发指南完善。([#612](https://atomgit.com/cann/ops-transformer/pull/612)、[#629](https://atomgit.com/cann/ops-transformer/pull/629)、[#342](https://atomgit.com/cann/ops-transformer/pull/342)) |
| 45 | -- 【资料优化】优化贡献指南中新算子贡献流程。([#384](https://gitcode.com/cann/ops-transformer/pull/384)) | 45 | +- 【资料优化】优化贡献指南中新算子贡献流程。([#384](https://atomgit.com/cann/ops-transformer/pull/384)) |
| 46 | 46 | ||
| 47 | ### 🐛 问题修复 | 47 | ### 🐛 问题修复 |
| 48 | 48 | ||
| 49 | -- mc2通信域支持统一的torch.dist.group问题。([Issue47](https://gitcode.com/cann/ops-transformer/issues/47)) | 49 | +- mc2通信域支持统一的torch.dist.group问题。([Issue47](https://atomgit.com/cann/ops-transformer/issues/47)) |
| 50 | -- add_example样例算子执行调用问题修复。([Issue174](https://gitcode.com/cann/ops-transformer/issues/174)) | 50 | +- add_example样例算子执行调用问题修复。([Issue174](https://atomgit.com/cann/ops-transformer/issues/174)) |
| 51 | -- 修复install_deps.sh脚本不支持openEuler系统的问题。([Issue255](https://gitcode.com/cann/ops-transformer/issues/255)) | 51 | +- 修复install_deps.sh脚本不支持openEuler系统的问题。([Issue255](https://atomgit.com/cann/ops-transformer/issues/255)) |
| @@ -1,6 +1,6 @@ | |||
| 1 | # 贡献指南 | 1 | # 贡献指南 |
| 2 | 2 | ||
| 3 | -本项目欢迎广大开发者体验并参与贡献。在参与社区贡献之前,请参见 [cann-community](https://gitcode.com/cann/community) 了解行为准则,完成 CLA 协议签署,并熟悉源码仓的贡献流程。 | 3 | +本项目欢迎广大开发者体验并参与贡献。在参与社区贡献之前,请参见 [cann-community](https://atomgit.com/cann/community) 了解行为准则,完成 CLA 协议签署,并熟悉源码仓的贡献流程。 |
| 4 | 4 | ||
| 5 | ## 准备工作 | 5 | ## 准备工作 |
| 6 | 6 | ||
| @@ -37,7 +37,7 @@ | |||
| 37 | - **价值/作用** | 37 | - **价值/作用** |
| 38 | - **设计方案** | 38 | - **设计方案** |
| 39 | 39 | ||
| 40 | -具体操作步骤请参阅:[Issue 操作指南](https://gitcode.com/cann/community/blob/master/contributor/issue-operation.md)。 | 40 | +具体操作步骤请参阅:[Issue 操作指南](https://atomgit.com/cann/community/blob/master/contributor/issue-operation.md)。 |
| 41 | 41 | ||
| 42 | ### 2. 需求评审 | 42 | ### 2. 需求评审 |
| 43 | 43 | ||
| @@ -51,11 +51,11 @@ | |||
| 51 | 若需求紧急,可申请临时 SIG 会议: | 51 | 若需求紧急,可申请临时 SIG 会议: |
| 52 | 52 | ||
| 53 | 1. 填写议题申请:[议题申请](https://etherpad-cann.meeting.osinfra.cn/p/sig-ops-transformer) | 53 | 1. 填写议题申请:[议题申请](https://etherpad-cann.meeting.osinfra.cn/p/sig-ops-transformer) |
| 54 | -2. 发送邮件给 [maintainer](https://gitcode.com/cann/community/blob/master/CANN/sigs/ops-transformer/README.md),建议邮件主题注明:申请临时 SIG 议题及议题内容 | 54 | +2. 发送邮件给 [maintainer](https://atomgit.com/cann/community/blob/master/CANN/sigs/ops-transformer/README.md),建议邮件主题注明:申请临时 SIG 议题及议题内容 |
| 55 | 55 | ||
| 56 | **需求接纳:** | 56 | **需求接纳:** |
| 57 | 57 | ||
| 58 | -若需求被接纳,[SIG 成员](https://gitcode.com/cann/community/blob/master/CANN/sigs/ops-transformer/README.md)将为您分配合适的算子分类路径(如:`experimental/attention`),请将贡献算子提交至 `experimental` 对应算子分类目录。 | 58 | +若需求被接纳,[SIG 成员](https://atomgit.com/cann/community/blob/master/CANN/sigs/ops-transformer/README.md)将为您分配合适的算子分类路径(如:`experimental/attention`),请将贡献算子提交至 `experimental` 对应算子分类目录。 |
| 59 | 59 | ||
| 60 | ### 3. PR 提交 | 60 | ### 3. PR 提交 |
| 61 | 61 | ||
| @@ -76,7 +76,7 @@ ${op_class} # 算子分类 | |||
| 76 | **提交前准备:** | 76 | **提交前准备:** |
| 77 | 77 | ||
| 78 | - 建议在需求评审通过后,再提交 PR。 | 78 | - 建议在需求评审通过后,再提交 PR。 |
| 79 | -- 提交 PR 前需完成开发环境准备,并仔细了解项目特定的开发规范和版权声明要求(如涉及开源代码片段引用,请参考片段引用指导),确保您的贡献符合项目标准,签署 CLA。具体操作步骤请参阅:[PR 操作指南](https://gitcode.com/cann/community/blob/master/contributor/pull_request_operation.md)。 | 79 | +- 提交 PR 前需完成开发环境准备,并仔细了解项目特定的开发规范和版权声明要求(如涉及开源代码片段引用,请参考片段引用指导),确保您的贡献符合项目标准,签署 CLA。具体操作步骤请参阅:[PR 操作指南](https://atomgit.com/cann/community/blob/master/contributor/pull_request_operation.md)。 |
| 80 | 80 | ||
| 81 | **交付件要求:** | 81 | **交付件要求:** |
| 82 | 82 | ||
| @@ -84,11 +84,11 @@ ${op_class} # 算子分类 | |||
| 84 | |------|------|---------| | 84 | |------|------|---------| |
| 85 | | 代码交付件 | 需提供算子 Kernel 实现、算子测试文件 | [fast_kernel_launch_example](examples/fast_kernel_launch_example/README.md) | | 85 | | 代码交付件 | 需提供算子 Kernel 实现、算子测试文件 | [fast_kernel_launch_example](examples/fast_kernel_launch_example/README.md) | |
| 86 | | 文档交付件 | 算子 README 文档为必选,其余文档可视情况提供 | [文档贡献指南](docs/CONTRIBUTING_DOCS.md) | | 86 | | 文档交付件 | 算子 README 文档为必选,其余文档可视情况提供 | [文档贡献指南](docs/CONTRIBUTING_DOCS.md) | |
| 87 | -| 精度要求 | 新贡献算子需满足精度标准 | [生态算子开源精度标准](https://gitcode.com/cann/opbase/blob/master/docs/zh/ops_precision_standard/experimental_standard.md) | | 87 | +| 精度要求 | 新贡献算子需满足精度标准 | [生态算子开源精度标准](https://atomgit.com/cann/opbase/blob/master/docs/zh/ops_precision_standard/mixed_tolerance_standard.md) | |
| 88 | 88 | ||
| 89 | **合规检查:** | 89 | **合规检查:** |
| 90 | 90 | ||
| 91 | -- [ ] 代码是否符合《[C++ 编程规范](https://gitcode.com/cann/community/blob/master/contributor/coding-standards/C++%20Coding%20standards.md)》 | 91 | +- [ ] 代码是否符合《[C++ 编程规范](https://atomgit.com/cann/community/blob/master/contributor/coding-standards/C++%20Coding%20standards.md)》 |
| 92 | - [ ] 代码是否编译通过 | 92 | - [ ] 代码是否编译通过 |
| 93 | - [ ] Markdown 文档语法是否符合规范 | 93 | - [ ] Markdown 文档语法是否符合规范 |
| 94 | - [ ] 使用 git 进行代码提交前,可以参考 [pre-commit 工具使用说明](docs/zh/develop/pre-commit_guide.md)来使您的代码提交更合规高效 | 94 | - [ ] 使用 git 进行代码提交前,可以参考 [pre-commit 工具使用说明](docs/zh/develop/pre-commit_guide.md)来使您的代码提交更合规高效 |
| @@ -125,7 +125,7 @@ Committer 检视通过后,将标注 `/lgtm` 标签。Maintainer 最终审核 | |||
| 125 | 125 | ||
| 126 | 如果您在本项目中发现了某些算子 Bug,希望对其进行修复,欢迎您新建 Issue 进行反馈和跟踪处理。 | 126 | 如果您在本项目中发现了某些算子 Bug,希望对其进行修复,欢迎您新建 Issue 进行反馈和跟踪处理。 |
| 127 | 127 | ||
| 128 | -您可以按照 [提交 Issue/处理 Issue 任务](https://gitcode.com/cann/community#提交Issue处理Issue任务) 指引新建 `Bug-Report|缺陷反馈` 类 Issue 对 Bug 进行描述。 | 128 | +您可以按照 [提交 Issue/处理 Issue 任务](https://atomgit.com/cann/community#提交Issue处理Issue任务) 指引新建 `Bug-Report|缺陷反馈` 类 Issue 对 Bug 进行描述。 |
| 129 | 129 | ||
| 130 | --- | 130 | --- |
| 131 | 131 | ||
| @@ -133,7 +133,7 @@ Committer 检视通过后,将标注 `/lgtm` 标签。Maintainer 最终审核 | |||
| 133 | 133 | ||
| 134 | 如果您对本项目中某些算子实现有泛化性增强或性能优化思路,希望着手实现这些优化点,欢迎您对算子进行优化贡献。 | 134 | 如果您对本项目中某些算子实现有泛化性增强或性能优化思路,希望着手实现这些优化点,欢迎您对算子进行优化贡献。 |
| 135 | 135 | ||
| 136 | -您可以按照 [提交 Issue/处理 Issue 任务](https://gitcode.com/cann/community#提交Issue处理Issue任务) 指引新建 `Requirement|需求建议` 类 Issue 对优化点进行说明,并提供您的设计方案。 | 136 | +您可以按照 [提交 Issue/处理 Issue 任务](https://atomgit.com/cann/community#提交Issue处理Issue任务) 指引新建 `Requirement|需求建议` 类 Issue 对优化点进行说明,并提供您的设计方案。 |
| 137 | 137 | ||
| 138 | --- | 138 | --- |
| 139 | 139 | ||
| @@ -141,7 +141,7 @@ Committer 检视通过后,将标注 `/lgtm` 标签。Maintainer 最终审核 | |||
| 141 | 141 | ||
| 142 | 如果您在本项目中发现某些算子文档描述错误,欢迎您新建 Issue 进行反馈和修复,文档规范参考 [文档贡献指南](docs/CONTRIBUTING_DOCS.md)。 | 142 | 如果您在本项目中发现某些算子文档描述错误,欢迎您新建 Issue 进行反馈和修复,文档规范参考 [文档贡献指南](docs/CONTRIBUTING_DOCS.md)。 |
| 143 | 143 | ||
| 144 | -您可以按照 [提交 Issue/处理 Issue 任务](https://gitcode.com/cann/community#提交Issue处理Issue任务) 指引新建 `Documentation|文档反馈` 类 Issue 指出对应文档的问题。 | 144 | +您可以按照 [提交 Issue/处理 Issue 任务](https://atomgit.com/cann/community#提交Issue处理Issue任务) 指引新建 `Documentation|文档反馈` 类 Issue 指出对应文档的问题。 |
| 145 | 145 | ||
| 146 | --- | 146 | --- |
| 147 | 147 | ||
| @@ -192,7 +192,7 @@ ${op_class} # 算子分类 | |||
| 192 | 192 | ||
| 193 | **合规检查:** | 193 | **合规检查:** |
| 194 | 194 | ||
| 195 | -- [ ] 代码是否符合《[C++ 编程规范](https://gitcode.com/cann/community/blob/master/contributor/coding-standards/C++%20Coding%20standards.md)》 | 195 | +- [ ] 代码是否符合《[C++ 编程规范](https://atomgit.com/cann/community/blob/master/contributor/coding-standards/C++%20Coding%20standards.md)》 |
| 196 | - [ ] 是否符合标准算子基础编程规范 | 196 | - [ ] 是否符合标准算子基础编程规范 |
| 197 | - [ ] 代码是否编译通过 | 197 | - [ ] 代码是否编译通过 |
| 198 | - [ ] Markdown 文档语法是否符合规范 | 198 | - [ ] Markdown 文档语法是否符合规范 |
| @@ -6,7 +6,7 @@ | |||
| 6 | [](docs) | 6 | [](docs) |
| 7 | [](LICENSE) | 7 | [](LICENSE) |
| 8 | [](CONTRIBUTING.md) | 8 | [](CONTRIBUTING.md) |
| 9 | -[](https://gitcode.com/cann/community/blob/master/CANN/sigs/ops-transformer/README.md) | 9 | +[](https://atomgit.com/cann/community/blob/master/CANN/sigs/ops-transformer/README.md) |
| 10 | [](https://zread.ai/hicann/ops-transformer) | 10 | [](https://zread.ai/hicann/ops-transformer) |
| 11 | 11 | ||
| 12 | </div> | 12 | </div> |
| @@ -44,7 +44,7 @@ ops-transformer是[CANN](https://hiascend.com/software/cann)(Compute Architect | |||
| 44 | 44 | ||
| 45 | ## 📌版本配套 | 45 | ## 📌版本配套 |
| 46 | 46 | ||
| 47 | -本项目源码会跟随CANN软件版本发布,关于CANN软件版本与本项目标签的对应关系请参阅[release仓库](https://gitcode.com/cann/release-management)中的相应版本说明。 | 47 | +本项目源码会跟随CANN软件版本发布,关于CANN软件版本与本项目标签的对应关系请参阅[release仓库](https://atomgit.com/cann/release-management)中的相应版本说明。 |
| 48 | 请注意,为确保您的源码定制开发顺利进行,请选择配套的CANN版本与Gitcode标签源码,使用master分支可能存在版本不匹配的风险。 | 48 | 请注意,为确保您的源码定制开发顺利进行,请选择配套的CANN版本与Gitcode标签源码,使用master分支可能存在版本不匹配的风险。 |
| 49 | 49 | ||
| 50 | ## 🛠️环境准备 | 50 | ## 🛠️环境准备 |
| @@ -56,8 +56,8 @@ ops-transformer是[CANN](https://hiascend.com/software/cann)(Compute Architect | |||
| 56 | 环境准备好后,下载与CANN版本配套的分支源码,通用命令如下,\$\{tag\_version\}替换为分支标签名。以9.0.0分支源码下载为例: | 56 | 环境准备好后,下载与CANN版本配套的分支源码,通用命令如下,\$\{tag\_version\}替换为分支标签名。以9.0.0分支源码下载为例: |
| 57 | 57 | ||
| 58 | ```bash | 58 | ```bash |
| 59 | -# 通用命令:git clone -b ${tag_version} https://gitcode.com/cann/ops-transformer.git | 59 | +# 通用命令:git clone -b ${tag_version} https://atomgit.com/cann/ops-transformer.git |
| 60 | -git clone -b 9.0.0 https://gitcode.com/cann/ops-transformer.git | 60 | +git clone -b 9.0.0 https://atomgit.com/cann/ops-transformer.git |
| 61 | ``` | 61 | ``` |
| 62 | 62 | ||
| 63 | > 说明:若环境中已存在配套分支源码,**可跳过本步骤**,例如CANNLab默认已提供最新版本CANN对应的源码。 | 63 | > 说明:若环境中已存在配套分支源码,**可跳过本步骤**,例如CANNLab默认已提供最新版本CANN对应的源码。 |
| @@ -76,15 +76,15 @@ git clone -b 9.0.0 https://gitcode.com/cann/ops-transformer.git | |||
| 76 | - [贡献指南](CONTRIBUTING.md) | 76 | - [贡献指南](CONTRIBUTING.md) |
| 77 | - [安全声明](SECURITY.md) | 77 | - [安全声明](SECURITY.md) |
| 78 | - [许可证](LICENSE) | 78 | - [许可证](LICENSE) |
| 79 | -- [所属SIG](https://gitcode.com/cann/community/tree/master/CANN/sigs/ops-transformer) | 79 | +- [所属SIG](https://atomgit.com/cann/community/tree/master/CANN/sigs/ops-transformer) |
| 80 | - [联系我们] 微信名:Clark_Dan | 80 | - [联系我们] 微信名:Clark_Dan |
| 81 | 81 | ||
| 82 | ----- | 82 | ----- |
| 83 | PS:本项目功能和文档正在持续更新和完善中,欢迎您关注最新版本。 | 83 | PS:本项目功能和文档正在持续更新和完善中,欢迎您关注最新版本。 |
| 84 | 84 | ||
| 85 | -- **问题反馈**:通过GitCode[【Issues】](https://gitcode.com/cann/ops-transformer/issues)提交问题。 | 85 | +- **问题反馈**:通过GitCode[【Issues】](https://atomgit.com/cann/ops-transformer/issues)提交问题。 |
| 86 | -- **社区互动**:通过GitCode[【讨论】](https://gitcode.com/cann/ops-transformer/discussions)参与交流。 | 86 | +- **社区互动**:通过GitCode[【讨论】](https://atomgit.com/cann/ops-transformer/discussions)参与交流。 |
| 87 | -- **技术专栏**:通过GitCode[【Wiki】](https://gitcode.com/cann/ops-transformer/wiki)获取技术文章,如系列化教程、优秀实践等。 | 87 | +- **技术专栏**:通过GitCode[【Wiki】](https://atomgit.com/cann/ops-transformer/wiki)获取技术文章,如系列化教程、优秀实践等。 |
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | | 90 | |
| @@ -27,9 +27,9 @@ | |||
| 27 | 27 | ||
| 28 | | 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址/压缩文件地址 | 用途说明 | | 28 | | 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址/压缩文件地址 | 用途说明 | |
| 29 | | :------------: |:------------------------------------------------------------------------------------------:|:----------------------------------------------------------| :---------------------------------------------------------- |:-----------------------------------------| | 29 | | :------------: |:------------------------------------------------------------------------------------------:|:----------------------------------------------------------| :---------------------------------------------------------- |:-----------------------------------------| |
| 30 | -| 依赖 | 不涉及 | cmake/third_party/makeself-fetch.cmake | https://gitcode.com/cann-src-third-party/makeself/releases/download/release-2.5.0-patch1.0/makeself-release-2.5.0-patch1.tar.gz | 从gitcode下载makeself源码,作用编译依赖 | | 30 | +| 依赖 | 不涉及 | cmake/third_party/makeself-fetch.cmake | https://atomgit.com/cann-src-third-party/makeself/releases/download/release-2.5.0-patch1.0/makeself-release-2.5.0-patch1.tar.gz | 从gitcode下载makeself源码,作用编译依赖 | |
| 31 | | 依赖 | 不涉及 | cmake/third_party/protobuf.cmake | https://github.com/protocolbuffers/protobuf/archive/v25.1.tar.gz | 从github下载protobuf源码,作用编译依赖 | | 31 | | 依赖 | 不涉及 | cmake/third_party/protobuf.cmake | https://github.com/protocolbuffers/protobuf/archive/v25.1.tar.gz | 从github下载protobuf源码,作用编译依赖 | |
| 32 | -| 依赖 | 不涉及 | cmake/third_party/json.cmake | https://gitcode.com/cann-src-third-party/json/releases/download/v3.11.3/include.zip | 从gitcode下载JSON源码,作用编译依赖 | | 32 | +| 依赖 | 不涉及 | cmake/third_party/json.cmake | https://atomgit.com/cann-src-third-party/json/releases/download/v3.11.3/include.zip | 从gitcode下载JSON源码,作用编译依赖 | |
| 33 | | 依赖 | 不涉及 | cmake/third_party/gtest.cmake | https://github.com/google/googletest/archive/release-1.8.0.tar.gz | 从github下载googletest源码,作用编译依赖 | | 33 | | 依赖 | 不涉及 | cmake/third_party/gtest.cmake | https://github.com/google/googletest/archive/release-1.8.0.tar.gz | 从github下载googletest源码,作用编译依赖 | |
| 34 | | 依赖 | 不涉及 | cmake/third_party/secure_c.cmake | https://gitee.com/openeuler/libboundscheck/repository/archive/v1.1.10.tar.gz | 从gitee下载libboundscheck源码,作用编译依赖 | | 34 | | 依赖 | 不涉及 | cmake/third_party/secure_c.cmake | https://gitee.com/openeuler/libboundscheck/repository/archive/v1.1.10.tar.gz | 从gitee下载libboundscheck源码,作用编译依赖 | |
| 35 | 35 | ||
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | ## 漏洞机制说明 | 38 | ## 漏洞机制说明 |
| 39 | 39 | ||
| 40 | -[漏洞管理](https://gitcode.com/cann/community/blob/master/security/security.md) | 40 | +[漏洞管理](https://atomgit.com/cann/community/blob/master/security/security.md) |
| 41 | 41 | ||
| 42 | ## 附录 | 42 | ## 附录 |
| 43 | 43 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnAttentionWorkerCombine | 1 | # aclnnAttentionWorkerCombine |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/attention_worker_combine) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/attention_worker_combine) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnBlockAttnResPrepare | 1 | # aclnnBlockAttnResPrepare |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/block_attn_res_prepare) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/block_attn_res_prepare) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnBlockAttnResUpdate | 1 | # aclnnBlockAttnResUpdate |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/block_attn_res_update) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/block_attn_res_update) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -80,7 +80,7 @@ | |||
| 80 | 80 | ||
| 81 | ## 函数原型 | 81 | ## 函数原型 |
| 82 | 82 | ||
| 83 | -每个算子分为[两段式接口](https://gitcode.com/cann/ops-transformer/blob/master/docs/zh/context/two_phase_api.md),必须先调用"aclnnBlockSparseAttentionV3GetWorkspaceSize"接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用"aclnnBlockSparseAttentionV3"接口执行计算。 | 83 | +每个算子分为[两段式接口](https://atomgit.com/cann/ops-transformer/blob/master/docs/zh/context/two_phase_api.md),必须先调用"aclnnBlockSparseAttentionV3GetWorkspaceSize"接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用"aclnnBlockSparseAttentionV3"接口执行计算。 |
| 84 | 84 | ||
| 85 | ```c++ | 85 | ```c++ |
| 86 | aclnnStatus aclnnBlockSparseAttentionV3GetWorkspaceSize( | 86 | aclnnStatus aclnnBlockSparseAttentionV3GetWorkspaceSize( |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnChunkGatedDeltaRule | 1 | # aclnnChunkGatedDeltaRule |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/chunk_gated_delta_rule) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/chunk_gated_delta_rule) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -29,9 +29,9 @@ | |||
| 29 | 29 | ||
| 30 | #### 前置要求 | 30 | #### 前置要求 |
| 31 | 31 | ||
| 32 | -1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 32 | +1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 33 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) | 33 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) |
| 34 | -3. ops-test-kit测试框架(TTK):[ops-test-kit](https://gitcode.com/cann/ops-test-kit) | 34 | +3. ops-test-kit测试框架(TTK):[ops-test-kit](https://atomgit.com/cann/ops-test-kit) |
| 35 | 35 | ||
| 36 | ## 文件结构 | 36 | ## 文件结构 |
| 37 | 37 | ||
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | #### 前置要求 | 23 | #### 前置要求 |
| 24 | 24 | ||
| 25 | -1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 25 | +1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 26 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) | 26 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) |
| 27 | 27 | ||
| 28 | #### custom包调用 | 28 | #### custom包调用 |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnCompressor | 1 | # aclnnCompressor |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/compressor) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/compressor) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnFusedCausalConv1d | 1 | # aclnnFusedCausalConv1d |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/fused_causal_conv1d) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/fused_causal_conv1d) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnFusedCausalConv1dV2 | 1 | # aclnnFusedCausalConv1dV2 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/fused_causal_conv1d) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/fused_causal_conv1d) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,7 +1,7 @@ | |||
| 1 | 1 | ||
| 2 | # aclnnFusedInferAttentionScoreV4 | 2 | # aclnnFusedInferAttentionScoreV4 |
| 3 | 3 | ||
| 4 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/fused_infer_attention_score) | 4 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/fused_infer_attention_score) |
| 5 | 5 | ||
| 6 | ## 产品支持情况 | 6 | ## 产品支持情况 |
| 7 | 7 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnFusedInferAttentionScoreV5 | 1 | # aclnnFusedInferAttentionScoreV5 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/fused_infer_attention_score) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/fused_infer_attention_score) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -50,7 +50,7 @@ pytest框架作为一个轻量化精度对比的测试框架,提供了简单 | |||
| 50 | 50 | ||
| 51 | ### 前置要求 | 51 | ### 前置要求 |
| 52 | 52 | ||
| 53 | -1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 53 | +1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 54 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) | 54 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) |
| 55 | 55 | ||
| 56 | ### Custom包调用 | 56 | ### Custom包调用 |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnGatherPaKvCache | 1 | # aclnnGatherPaKvCache |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/gather_pa_kv_cache) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/gather_pa_kv_cache) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnIncreFlashAttentionV4 | 1 | # aclnnIncreFlashAttentionV4 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/incre_flash_attention) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/incre_flash_attention) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnIndexerQuantCache | 1 | # aclnnIndexerQuantCache |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/indexer_quant_cache) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/indexer_quant_cache) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnInplaceFusedCausalConv1d | 1 | # aclnnInplaceFusedCausalConv1d |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/inplace_fused_causal_conv1d) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/inplace_fused_causal_conv1d) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnInplaceFusedCausalConv1dV2 | 1 | # aclnnInplaceFusedCausalConv1dV2 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/inplace_fused_causal_conv1d) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/inplace_fused_causal_conv1d) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnKdaInputProj | 1 | # aclnnKdaInputProj |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/kda_input_proj) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/kda_input_proj) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnKeyPool | 1 | # aclnnKeyPool |
| 2 | 2 | ||
| 3 | -[📄查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/key_pool) | 3 | +[📄查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/key_pool) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnKvCompressEpilog | 1 | # aclnnKvCompressEpilog |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/kv_compress_epilog) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/kv_compress_epilog) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnLightningIndexer | 1 | # aclnnLightningIndexer |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/lightning_indexer) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/lightning_indexer) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnLightningIndexerGrad | 1 | # aclnnLightningIndexerGrad |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/lightning_indexer_grad) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/lightning_indexer_grad) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnLightningIndexerV2Metadata | 1 | # aclnnLightningIndexerV2Metadata |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/lightning_indexer_v2_metadata) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/lightning_indexer_v2_metadata) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnMaskedCausalConv1d | 1 | # aclnnMaskedCausalConv1d |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/masked_causal_conv1d) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/masked_causal_conv1d) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnMaskedCausalConv1dBackward | 1 | # aclnnMaskedCausalConv1dBackward |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/masked_causal_conv1d_backward) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/masked_causal_conv1d_backward) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnMixedQuantSparseFlashMlaMetadata | 1 | # aclnnMixedQuantSparseFlashMlaMetadata |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/mixed_quant_sparse_flash_mla_metadata) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/mixed_quant_sparse_flash_mla_metadata) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnMlaPrologV3WeightNz | 1 | # aclnnMlaPrologV3WeightNz |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/mla_prolog_v3) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/mla_prolog_v3) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnMlaPrologV4WeightNz | 1 | # aclnnMlaPrologV4WeightNz |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/mla_prolog_v4) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/mla_prolog_v4) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnMsaIndexScore | 1 | # aclnnMsaIndexScore |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/msa_index_score) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/msa_index_score) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -51,7 +51,7 @@ | |||
| 51 | 51 | ||
| 52 | ## 函数原型 | 52 | ## 函数原型 |
| 53 | 53 | ||
| 54 | -每个算子分为[两段式接口](https://gitcode.com/cann/ops-transformer/blob/master/docs/zh/context/two_phase_api.md),必须先调用 `aclnnMsaIndexScoreGetWorkspaceSize` 接口获取入参并计算所需 workspace 大小,再调用 `aclnnMsaIndexScore` 接口执行计算。 | 54 | +每个算子分为[两段式接口](https://atomgit.com/cann/ops-transformer/blob/master/docs/zh/context/two_phase_api.md),必须先调用 `aclnnMsaIndexScoreGetWorkspaceSize` 接口获取入参并计算所需 workspace 大小,再调用 `aclnnMsaIndexScore` 接口执行计算。 |
| 55 | 55 | ||
| 56 | ```cpp | 56 | ```cpp |
| 57 | aclnnStatus aclnnMsaIndexScoreGetWorkspaceSize( | 57 | aclnnStatus aclnnMsaIndexScoreGetWorkspaceSize( |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnPoolKeyIndexer | 1 | # aclnnPoolKeyIndexer |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/pool_key_indexer) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/pool_key_indexer) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnPromptFlashAttentionV3 | 1 | # aclnnPromptFlashAttentionV3 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/prompt_flash_attention) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/prompt_flash_attention) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnQuantCompressor | 1 | # aclnnQuantCompressor |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/quant_compressor) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/quant_compressor) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnQuantLightningIndexer | 1 | # aclnnQuantLightningIndexer |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/quant_lightning_indexer) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/quant_lightning_indexer) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnQuantLightningIndexerV2 | 1 | # aclnnQuantLightningIndexerV2 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/quant_lightning_indexer_v2) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/quant_lightning_indexer_v2) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnQuantLightningIndexerV2Metadata | 1 | # aclnnQuantLightningIndexerV2Metadata |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/quant_lightning_indexer_v2_metadata) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/quant_lightning_indexer_v2_metadata) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnQuantSparseFlashMlaMetadata | 1 | # aclnnQuantSparseFlashMlaMetadata |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/quant_sparse_flash_mla_metadata) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/quant_sparse_flash_mla_metadata) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnRecurrentGatedDeltaRule | 1 | # aclnnRecurrentGatedDeltaRule |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/recurrent_gated_delta_rule) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/recurrent_gated_delta_rule) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -27,9 +27,9 @@ | |||
| 27 | 27 | ||
| 28 | #### 前置要求 | 28 | #### 前置要求 |
| 29 | 29 | ||
| 30 | -1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 30 | +1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 31 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) | 31 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) |
| 32 | -3. ops-test-kit测试框架(TTK):[ops-test-kit](https://gitcode.com/cann/ops-test-kit) | 32 | +3. ops-test-kit测试框架(TTK):[ops-test-kit](https://atomgit.com/cann/ops-test-kit) |
| 33 | 33 | ||
| 34 | ## 文件结构 | 34 | ## 文件结构 |
| 35 | 35 | ||
| @@ -35,7 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | #### 前置要求 | 36 | #### 前置要求 |
| 37 | 37 | ||
| 38 | -1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 38 | +1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 39 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) | 39 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../README.md) |
| 40 | 40 | ||
| 41 | #### custom包调用 | 41 | #### custom包调用 |
| @@ -150,7 +150,7 @@ bash test_run.sh mss 10 | |||
| 150 | - 未自带时源码编译安装: | 150 | - 未自带时源码编译安装: |
| 151 | 151 | ||
| 152 | ``` bash | 152 | ``` bash |
| 153 | -git clone https://gitcode.com/Ascend/mssanitizer.git | 153 | +git clone https://atomgit.com/Ascend/mssanitizer.git |
| 154 | cd mssanitizer | 154 | cd mssanitizer |
| 155 | python3 build.py | 155 | python3 build.py |
| 156 | # 编译完成后安装 run 包 | 156 | # 编译完成后安装 run 包 |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnRecurrentKda | 1 | # aclnnRecurrentKda |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/recurrent_kda) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/recurrent_kda) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnScatterPaCache | 1 | # aclnnScatterPaCache |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/scatter_pa_cache) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/scatter_pa_cache) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnScatterPaKvCache | 1 | # aclnnScatterPaKvCache |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/scatter_pa_kv_cache) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/scatter_pa_kv_cache) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnScatterPaKvCacheWithKScale | 1 | # aclnnScatterPaKvCacheWithKScale |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/scatter_pa_kv_cache_with_k_scale) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/scatter_pa_kv_cache_with_k_scale) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnSparseFlashAttention | 1 | # aclnnSparseFlashAttention |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/sparse_flash_attention) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/sparse_flash_attention) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnSparseFlashAttentionV2 | 1 | # aclnnSparseFlashAttentionV2 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/sparse_flash_attention) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/sparse_flash_attention) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnSparseFlashMlaGradMetadata | 1 | # aclnnSparseFlashMlaGradMetadata |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/sparse_flash_mla_grad_metadata) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/sparse_flash_mla_grad_metadata) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnSparseLightningIndexerKLLossGradMetadata | 1 | # aclnnSparseLightningIndexerKLLossGradMetadata |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/sparse_lightning_indexer_kl_loss_grad_metadata) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/sparse_lightning_indexer_kl_loss_grad_metadata) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnStemOamPrepPagedKv | 1 | # aclnnStemOamPrepPagedKv |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/stem_oam_prep_paged_kv) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/stem_oam_prep_paged_kv) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | <!-- npu="950" id1 --> | 6 | <!-- npu="950" id1 --> |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnSwinAttentionScoreQuant | 1 | # aclnnSwinAttentionScoreQuant |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/attention/swin_attention_score_quant) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/attention/swin_attention_score_quant) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -24,7 +24,7 @@ if(NOT PROJECT_SOURCE_DIR) | |||
| 24 | else() | 24 | else() |
| 25 | FetchContent_Declare( | 25 | FetchContent_Declare( |
| 26 | cann-cmake | 26 | cann-cmake |
| 27 | - GIT_REPOSITORY https://gitcode.com/cann/cmake.git | 27 | + GIT_REPOSITORY https://atomgit.com/cann/cmake.git |
| 28 | GIT_TAG ${CANN_CMAKE_TAG} | 28 | GIT_TAG ${CANN_CMAKE_TAG} |
| 29 | GIT_SHALLOW TRUE | 29 | GIT_SHALLOW TRUE |
| 30 | ) | 30 | ) |
| @@ -25,7 +25,7 @@ else() | |||
| 25 | 25 | ||
| 26 | FetchContent_Declare( | 26 | FetchContent_Declare( |
| 27 | catlass | 27 | catlass |
| 28 | - GIT_REPOSITORY https://gitcode.com/cann/catlass.git | 28 | + GIT_REPOSITORY https://atomgit.com/cann/catlass.git |
| 29 | GIT_TAG ${CATLASS_TAG_ID} | 29 | GIT_TAG ${CATLASS_TAG_ID} |
| 30 | GIT_PROGRESS TRUE | 30 | GIT_PROGRESS TRUE |
| 31 | GIT_SUBMODULES "" | 31 | GIT_SUBMODULES "" |
| @@ -29,7 +29,7 @@ else() | |||
| 29 | 29 | ||
| 30 | FetchContent_Declare( | 30 | FetchContent_Declare( |
| 31 | opbase | 31 | opbase |
| 32 | - GIT_REPOSITORY https://gitcode.com/cann/opbase.git | 32 | + GIT_REPOSITORY https://atomgit.com/cann/opbase.git |
| 33 | GIT_TAG ${OPBASE_TAG_ID} | 33 | GIT_TAG ${OPBASE_TAG_ID} |
| 34 | GIT_PROGRESS TRUE | 34 | GIT_PROGRESS TRUE |
| 35 | SOURCE_DIR ${CANN_3RD_LIB_PATH}/opbase) | 35 | SOURCE_DIR ${CANN_3RD_LIB_PATH}/opbase) |
| @@ -74,8 +74,8 @@ elseif(EXISTS "${CANN_3RD_LIB_PATH}/ops-tensor") | |||
| 74 | get_filename_component(TENSOR_API | 74 | get_filename_component(TENSOR_API |
| 75 | ${OPTENSOR_SOURCE_PATH}/include/tensor_api REALPATH) | 75 | ${OPTENSOR_SOURCE_PATH}/include/tensor_api REALPATH) |
| 76 | else() | 76 | else() |
| 77 | - set(OPTENSOR_GIT_URL "git@gitcode.com:cann/ops-tensor.git") | 77 | + set(OPTENSOR_GIT_URL "git@atomgit.com:cann/ops-tensor.git") |
| 78 | - set(OPTENSOR_FALLBACK_GIT_URL "https://gitcode.com/cann/ops-tensor.git") | 78 | + set(OPTENSOR_FALLBACK_GIT_URL "https://atomgit.com/cann/ops-tensor.git") |
| 79 | 79 | ||
| 80 | execute_process( | 80 | execute_process( |
| 81 | COMMAND git ls-remote ${OPTENSOR_GIT_URL} HEAD | 81 | COMMAND git ls-remote ${OPTENSOR_GIT_URL} HEAD |
| @@ -37,10 +37,10 @@ else() | |||
| 37 | ERROR_QUIET | 37 | ERROR_QUIET |
| 38 | ) | 38 | ) |
| 39 | if(GIT_REMOTE_URL MATCHES "^git@|^ssh://") | 39 | if(GIT_REMOTE_URL MATCHES "^git@|^ssh://") |
| 40 | - set(OPS_TEST_KIT_GIT_URL "git@gitcode.com:cann/ops-test-kit.git") | 40 | + set(OPS_TEST_KIT_GIT_URL "git@atomgit.com:cann/ops-test-kit.git") |
| 41 | message(STATUS "[ThirdPartyLib][ops-test-kit] using SSH protocol: ${OPS_TEST_KIT_GIT_URL}") | 41 | message(STATUS "[ThirdPartyLib][ops-test-kit] using SSH protocol: ${OPS_TEST_KIT_GIT_URL}") |
| 42 | else() | 42 | else() |
| 43 | - set(OPS_TEST_KIT_GIT_URL "https://gitcode.com/cann/ops-test-kit.git") | 43 | + set(OPS_TEST_KIT_GIT_URL "https://atomgit.com/cann/ops-test-kit.git") |
| 44 | message(STATUS "[ThirdPartyLib][ops-test-kit] using HTTPS protocol: ${OPS_TEST_KIT_GIT_URL}") | 44 | message(STATUS "[ThirdPartyLib][ops-test-kit] using HTTPS protocol: ${OPS_TEST_KIT_GIT_URL}") |
| 45 | endif() | 45 | endif() |
| 46 | include(FetchContent) | 46 | include(FetchContent) |
| @@ -60,7 +60,7 @@ | |||
| 60 | 60 | ||
| 61 | 开发者进行项目文档写作前,请务必先阅读如下规范,如有问题欢迎您随时提出建议! | 61 | 开发者进行项目文档写作前,请务必先阅读如下规范,如有问题欢迎您随时提出建议! |
| 62 | 62 | ||
| 63 | -- 前提条件:请先学习CANN组织提供的统一写作规范,具体参见[CANN文档写作规范](https://gitcode.com/cann/community/blob/master/contributor/docs/document_writing_specs.md)。 | 63 | +- 前提条件:请先学习CANN组织提供的统一写作规范,具体参见[CANN文档写作规范](https://atomgit.com/cann/community/blob/master/contributor/docs/document_writing_specs.md)。 |
| 64 | 64 | ||
| 65 | - 文档内容要求:介绍项目里必选和可选文档交付件。 | 65 | - 文档内容要求:介绍项目里必选和可选文档交付件。 |
| 66 | - 目录结构规范:介绍目录划分的原则,例如中、英文管理等。 | 66 | - 目录结构规范:介绍目录划分的原则,例如中、英文管理等。 |
| @@ -98,5 +98,5 @@ | |||
| 98 | 98 | ||
| 99 | 算子交付件中涉及的关键文档主要包括如下,具体写作格式、内容要求请参考模板。 | 99 | 算子交付件中涉及的关键文档主要包括如下,具体写作格式、内容要求请参考模板。 |
| 100 | 100 | ||
| 101 | -- [算子README文档模板](https://gitcode.com/cann/ops-transformer/wiki/%E7%AE%97%E5%AD%90README%E6%96%87%E6%A1%A3%E6%A8%A1%E6%9D%BF) | 101 | +- [算子README文档模板](https://atomgit.com/cann/ops-transformer/wiki/%E7%AE%97%E5%AD%90README%E6%96%87%E6%A1%A3%E6%A8%A1%E6%9D%BF) |
| 102 | -- [aclnn API文档模板](https://gitcode.com/cann/ops-transformer/wiki/aclnn%20API%E6%96%87%E6%A1%A3%E6%A8%A1%E6%9D%BF) | 102 | +- [aclnn API文档模板](https://atomgit.com/cann/ops-transformer/wiki/aclnn%20API%E6%96%87%E6%A1%A3%E6%A8%A1%E6%9D%BF) |
| @@ -30,10 +30,10 @@ | |||
| 30 | 30 | ||
| 31 | - 非CANNLab云开发环境: | 31 | - 非CANNLab云开发环境: |
| 32 | 32 | ||
| 33 | - 从[release仓库](https://gitcode.com/cann/release-management)各文件夹下的release-notes文件获取源码与CANN版本配套关系(CANN ops组合包内可独立升级子包配套关系),执行如下命令下载源码,\$\{tag\_version\}替换为目标分支标签,例如9.0.0。 | 33 | + 从[release仓库](https://atomgit.com/cann/release-management)各文件夹下的release-notes文件获取源码与CANN版本配套关系(CANN ops组合包内可独立升级子包配套关系),执行如下命令下载源码,\$\{tag\_version\}替换为目标分支标签,例如9.0.0。 |
| 34 | 34 | ||
| 35 | ```bash | 35 | ```bash |
| 36 | - git clone -b ${tag_version} https://gitcode.com/cann/ops-transformer.git && cd ops-transformer | 36 | + git clone -b ${tag_version} https://atomgit.com/cann/ops-transformer.git && cd ops-transformer |
| 37 | ``` | 37 | ``` |
| 38 | 38 | ||
| 39 | > 说明:如需切换源码分支版本,请参考如下指导。 | 39 | > 说明:如需切换源码分支版本,请参考如下指导。 |
| @@ -62,7 +62,7 @@ Docs目录结构说明如下: | |||
| 62 | 62 | ||
| 63 | ### 样例实践 | 63 | ### 样例实践 |
| 64 | 64 | ||
| 65 | -如需学习算子领域高性能实战案例,可参考[cann-samples Performance目录](https://gitcode.com/cann/cann-samples/blob/master/Samples/2_Performance/README.md)。 | 65 | +如需学习算子领域高性能实战案例,可参考[cann-samples Performance目录](https://atomgit.com/cann/cann-samples/blob/master/Samples/2_Performance/README.md)。 |
| 66 | 66 | ||
| 67 | | 算子分类 | 样例算子 | 说明 | | 67 | | 算子分类 | 样例算子 | 说明 | |
| 68 | | ----------------------- | ---------------------- | ---------------------- | | 68 | | ----------------------- | ---------------------- | ---------------------- | |
| @@ -72,7 +72,7 @@ Docs目录结构说明如下: | |||
| 72 | 72 | ||
| 73 | ### 更多文档 | 73 | ### 更多文档 |
| 74 | 74 | ||
| 75 | -欢迎前往[wiki中心](https://gitcode.com/cann/ops-transformer/wiki/Home.md)了解更多项目信息,包括项目定位、算子开发补充知识介绍、性能优化方法和实践样例、常见问题(FAQ)及问题定位方法等。 | 75 | +欢迎前往[wiki中心](https://atomgit.com/cann/ops-transformer/wiki/Home.md)了解更多项目信息,包括项目定位、算子开发补充知识介绍、性能优化方法和实践样例、常见问题(FAQ)及问题定位方法等。 |
| 76 | 76 | ||
| 77 | ## 附录 | 77 | ## 附录 |
| 78 | 78 | ||
| @@ -66,7 +66,7 @@ | |||
| 66 | 66 | ||
| 67 | * **msDebug单步调试** | 67 | * **msDebug单步调试** |
| 68 | 68 | ||
| 69 | - 对于复杂场景的问题定位,比如算子卡死、GM/UB访问越界等场景,可以采取[msDebug](https://gitcode.com/Ascend/msdebug/blob/master/docs/zh/user_guide/msdebug_user_guide.md)单步调试的方式,具体操作步骤如下: | 69 | + 对于复杂场景的问题定位,比如算子卡死、GM/UB访问越界等场景,可以采取[msDebug](https://atomgit.com/Ascend/msdebug/blob/master/docs/zh/user_guide/msdebug_user_guide.md)单步调试的方式,具体操作步骤如下: |
| 70 | 70 | ||
| 71 | 1. **编译O0 -g的Kernel** | 71 | 1. **编译O0 -g的Kernel** |
| 72 | 72 | ||
| @@ -101,7 +101,7 @@ | |||
| 101 | msdebug ./test_aclnn_add_example | 101 | msdebug ./test_aclnn_add_example |
| 102 | ``` | 102 | ``` |
| 103 | 103 | ||
| 104 | - 更多msDebug使用方法请参见[msDebug](https://gitcode.com/Ascend/msdebug/blob/master/docs/zh/user_guide/msdebug_user_guide.md)算子调试工具文档。 | 104 | + 更多msDebug使用方法请参见[msDebug](https://atomgit.com/Ascend/msdebug/blob/master/docs/zh/user_guide/msdebug_user_guide.md)算子调试工具文档。 |
| 105 | 105 | ||
| 106 | ### 3. Kernel检测 | 106 | ### 3. Kernel检测 |
| 107 | 107 | ||
| @@ -402,7 +402,7 @@ Ascend 950引入集合通信加速器CCU1.0,降低了访存需求,减少了 | |||
| 402 | 402 | ||
| 403 | 在aclnn两段式接口中的第二段接口中,为算子执行器aclOpExecutor指定集合通信类型。 | 403 | 在aclnn两段式接口中的第二段接口中,为算子执行器aclOpExecutor指定集合通信类型。 |
| 404 | 404 | ||
| 405 | -以[MatmulAllReduce](https://gitcode.com/cann/ops-transformer/tree/master/mc2/matmul_all_reduce)算子迁移适配为例: | 405 | +以[MatmulAllReduce](https://atomgit.com/cann/ops-transformer/tree/master/mc2/matmul_all_reduce)算子迁移适配为例: |
| 406 | 设置NnopbaseSetHcclServerType枚举值,A2为NNOPBASE_HCCL_SERVER_AICPU,950为NNOPBASE_HCCL_SERVER_TYPE_CCU。 | 406 | 设置NnopbaseSetHcclServerType枚举值,A2为NNOPBASE_HCCL_SERVER_AICPU,950为NNOPBASE_HCCL_SERVER_TYPE_CCU。 |
| 407 | 407 | ||
| 408 | ```CPP | 408 | ```CPP |
| @@ -426,7 +426,7 @@ aclnnStatus aclnnMatmulAllReduce( | |||
| 426 | 1. 用于资源计算与申请,涉及附属流相关信息的CalcParamFunc回调接口中,为GE的上下文context区分附属流的集合通信类型。 | 426 | 1. 用于资源计算与申请,涉及附属流相关信息的CalcParamFunc回调接口中,为GE的上下文context区分附属流的集合通信类型。 |
| 427 | 2. 用于设置主流/附属流上自定义任务、参数定制的GenerateTask回调接口中,区分两套GE的KernelLaunch接口,分别调用AICPU通信或CCU通信的创建及定制流程。 | 427 | 2. 用于设置主流/附属流上自定义任务、参数定制的GenerateTask回调接口中,区分两套GE的KernelLaunch接口,分别调用AICPU通信或CCU通信的创建及定制流程。 |
| 428 | 428 | ||
| 429 | -静态图GE侧创建通信task的任务类型,A2为aicpu kfc server + kfc_stream;950为ccu server + ccu_stream。涉及代码文件:[matmul_all_reduce_gen_task.cpp](https://gitcode.com/cann/ops-transformer/blob/master/mc2/matmul_all_reduce/op_graph/matmul_all_reduce_gen_task.cpp) | 429 | +静态图GE侧创建通信task的任务类型,A2为aicpu kfc server + kfc_stream;950为ccu server + ccu_stream。涉及代码文件:[matmul_all_reduce_gen_task.cpp](https://atomgit.com/cann/ops-transformer/blob/master/mc2/matmul_all_reduce/op_graph/matmul_all_reduce_gen_task.cpp) |
| 430 | 430 | ||
| 431 | ```CPP | 431 | ```CPP |
| 432 | // ... | 432 | // ... |
| @@ -442,7 +442,7 @@ ge::Status MatmulAllReduceCalcParamFunc(gert::ExeResGenerationContext *context) | |||
| 442 | // ... | 442 | // ... |
| 443 | ``` | 443 | ``` |
| 444 | 444 | ||
| 445 | -静态图GenTask调用接口有区别,流程有差异。涉及代码文件:[matmul_all_reduce_gen_task.cpp](https://gitcode.com/cann/ops-transformer/blob/master/mc2/matmul_all_reduce/op_graph/matmul_all_reduce_gen_task.cpp) | 445 | +静态图GenTask调用接口有区别,流程有差异。涉及代码文件:[matmul_all_reduce_gen_task.cpp](https://atomgit.com/cann/ops-transformer/blob/master/mc2/matmul_all_reduce/op_graph/matmul_all_reduce_gen_task.cpp) |
| 446 | 446 | ||
| 447 | ```CPP | 447 | ```CPP |
| 448 | // ... | 448 | // ... |
| @@ -141,5 +141,5 @@ sudo apt install clang-format | |||
| 141 | 141 | ||
| 142 | - [pre-commit官方文档](https://pre-commit.com/) | 142 | - [pre-commit官方文档](https://pre-commit.com/) |
| 143 | - [clang-format配置](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) | 143 | - [clang-format配置](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) |
| 144 | -- [OAT工具](https://gitcode.com/openharmony-sig/tools_oat) | 144 | +- [OAT工具](https://atomgit.com/openharmony-sig/tools_oat) |
| 145 | -- [代码仓集成pre-commit指导](https://gitcode.com/cann/infrastructure/blob/main/docs/SC/pre-commit/pre-commit%E9%85%8D%E7%BD%AE%E6%8C%87%E5%AF%BC%E4%B9%A6.md) | 145 | +- [代码仓集成pre-commit指导](https://atomgit.com/cann/infrastructure/blob/main/docs/SC/pre-commit/pre-commit%E9%85%8D%E7%BD%AE%E6%8C%87%E5%AF%BC%E4%B9%A6.md) |
| @@ -10,16 +10,16 @@ | |||
| 10 | 10 | ||
| 11 | | 开源软件 | 版本 | 下载地址 | | 11 | | 开源软件 | 版本 | 下载地址 | |
| 12 | |---|---|---| | 12 | |---|---|---| |
| 13 | -| googletest | 1.14.0 | [googletest-1.14.0.tar.gz](https://gitcode.com/cann-src-third-party/googletest/releases/download/v1.14.0/googletest-1.14.0.tar.gz) | | 13 | +| googletest | 1.14.0 | [googletest-1.14.0.tar.gz](https://atomgit.com/cann-src-third-party/googletest/releases/download/v1.14.0/googletest-1.14.0.tar.gz) | |
| 14 | -| json | 3.11.3 | [include.zip](https://gitcode.com/cann-src-third-party/json/releases/download/v3.11.3/include.zip) | | 14 | +| json | 3.11.3 | [include.zip](https://atomgit.com/cann-src-third-party/json/releases/download/v3.11.3/include.zip) | |
| 15 | -| makeself | 2.5.0 | [makeself-release-2.5.0-patch1.tar.gz](https://gitcode.com/cann-src-third-party/makeself/releases/download/release-2.5.0-patch1.0/makeself-release-2.5.0-patch1.tar.gz) | | 15 | +| makeself | 2.5.0 | [makeself-release-2.5.0-patch1.tar.gz](https://atomgit.com/cann-src-third-party/makeself/releases/download/release-2.5.0-patch1.0/makeself-release-2.5.0-patch1.tar.gz) | |
| 16 | -| pybind11 | 2.13.6 | [pybind11-2.13.6.tar.gz](https://gitcode.com/cann-src-third-party/pybind11/releases/download/v2.13.6/pybind11-2.13.6.tar.gz) | | 16 | +| pybind11 | 2.13.6 | [pybind11-2.13.6.tar.gz](https://atomgit.com/cann-src-third-party/pybind11/releases/download/v2.13.6/pybind11-2.13.6.tar.gz) | |
| 17 | -| eigen | 5.0.0 | [eigen-5.0.0.tar.gz](https://gitcode.com/cann-src-third-party/eigen/releases/download/5.0.0/eigen-5.0.0.tar.gz) | | 17 | +| eigen | 5.0.0 | [eigen-5.0.0.tar.gz](https://atomgit.com/cann-src-third-party/eigen/releases/download/5.0.0/eigen-5.0.0.tar.gz) | |
| 18 | -| protobuf | 25.1.0 | [protobuf-25.1.tar.gz](https://gitcode.com/cann-src-third-party/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz) | | 18 | +| protobuf | 25.1.0 | [protobuf-25.1.tar.gz](https://atomgit.com/cann-src-third-party/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz) | |
| 19 | -| abseil-cpp | 20230802.1 | [abseil-cpp-20230802.1.tar.gz](https://gitcode.com/cann-src-third-party/abseil-cpp/releases/download/20230802.1/abseil-cpp-20230802.1.tar.gz) | | 19 | +| abseil-cpp | 20230802.1 | [abseil-cpp-20230802.1.tar.gz](https://atomgit.com/cann-src-third-party/abseil-cpp/releases/download/20230802.1/abseil-cpp-20230802.1.tar.gz) | |
| 20 | -| opbase(自CANN 9.0.0及以后版本需要下载) | master | [opbase](https://gitcode.com/cann/opbase) | | 20 | +| opbase(自CANN 9.0.0及以后版本需要下载) | master | [opbase](https://atomgit.com/cann/opbase) | |
| 21 | | cann-cmake | master-046 | [cmake-master-046.tar.gz](https://cann-3rd.obs.cn-north-4.myhuaweicloud.com/cmake/cmake-master-046.tar.gz) | | 21 | | cann-cmake | master-046 | [cmake-master-046.tar.gz](https://cann-3rd.obs.cn-north-4.myhuaweicloud.com/cmake/cmake-master-046.tar.gz) | |
| 22 | -| ops-tensor(自CANN 9.1.0及以后版本需要下载) | master | [ops-tensor](https://gitcode.com/cann/ops-tensor) | | 22 | +| ops-tensor(自CANN 9.1.0及以后版本需要下载) | master | [ops-tensor](https://atomgit.com/cann/ops-tensor) | |
| 23 | 23 | ||
| 24 | 若您的编译环境可以访问网络,请参考[联网编译](#联网编译),编译脚本会自动联网下载第三方软件。否则,请参考[未联网编译](#未联网编译)手动下载第三方软件。 | 24 | 若您的编译环境可以访问网络,请参考[联网编译](#联网编译),编译脚本会自动联网下载第三方软件。否则,请参考[未联网编译](#未联网编译)手动下载第三方软件。 |
| 25 | 25 | ||
| @@ -180,7 +180,7 @@ | |||
| 180 | 180 | ||
| 181 | 请确保已按[环境部署](../install/quick_install.md)完成基础环境搭建,包括CANN包安装、源码下载等。 | 181 | 请确保已按[环境部署](../install/quick_install.md)完成基础环境搭建,包括CANN包安装、源码下载等。 |
| 182 | 182 | ||
| 183 | - - 在联网环境中,进入[本项目主页](https://gitcode.com/cann/ops-transformer),通过`下载ZIP`或`clone`按钮,根据指导完成源码下载。 | 183 | + - 在联网环境中,进入[本项目主页](https://atomgit.com/cann/ops-transformer),通过`下载ZIP`或`clone`按钮,根据指导完成源码下载。 |
| 184 | - 连接离线环境,上传源码至您指定的目录下。若下载的是源码压缩包,请先进行解压。 | 184 | - 连接离线环境,上传源码至您指定的目录下。若下载的是源码压缩包,请先进行解压。 |
| 185 | 185 | ||
| 186 | 2. **下载第三方软件依赖** | 186 | 2. **下载第三方软件依赖** |
| @@ -21,7 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 对于无昇腾设备的开发者,可直接使用CANNLab云开发环境,即“**一站式开发平台**”,该平台为您提供在线可直接运行的昇腾环境,环境中已安装必备的驱动、软件包和依赖,无需手动安装。 | 22 | 对于无昇腾设备的开发者,可直接使用CANNLab云开发环境,即“**一站式开发平台**”,该平台为您提供在线可直接运行的昇腾环境,环境中已安装必备的驱动、软件包和依赖,无需手动安装。 |
| 23 | 23 | ||
| 24 | -> **说明**:环境默认安装最新版本CANN包,源码下载时注意与软件配套。更多关于开发平台的介绍请参考[CANNLab指导](https://gitcode.com/cann/cann-learning-hub/blob/master/docs/CANNLab_env_experience_guide.md)。 | 24 | +> **说明**:环境默认安装最新版本CANN包,源码下载时注意与软件配套。更多关于开发平台的介绍请参考[CANNLab指导](https://atomgit.com/cann/cann-learning-hub/blob/master/docs/CANNLab_env_experience_guide.md)。 |
| 25 | 25 | ||
| 26 | 1. 进入开源项目,单击“`CANNLab`”按钮,使用已认证过的华为云账号登录。若未注册或认证,请根据页面提示进行注册和认证。 | 26 | 1. 进入开源项目,单击“`CANNLab`”按钮,使用已认证过的华为云账号登录。若未注册或认证,请根据页面提示进行注册和认证。 |
| 27 | 27 | ||
| @@ -118,7 +118,7 @@ docker run --name cann_container --device /dev/davinci0 --device /dev/davinci_ma | |||
| 118 | 下载与CANN版本配套的分支源码,命令如下,`${tag_version}`替换为分支标签名。 | 118 | 下载与CANN版本配套的分支源码,命令如下,`${tag_version}`替换为分支标签名。 |
| 119 | 119 | ||
| 120 | ```bash | 120 | ```bash |
| 121 | - git clone -b ${tag_version} https://gitcode.com/cann/ops-transformer.git | 121 | + git clone -b ${tag_version} https://atomgit.com/cann/ops-transformer.git |
| 122 | ``` | 122 | ``` |
| 123 | 123 | ||
| 124 | 2. 安装依赖。 | 124 | 2. 安装依赖。 |
| @@ -70,7 +70,7 @@ | |||
| 70 | 70 | ||
| 71 | ops-transformer静态库依赖于ops-legacy静态库和ops-math静态库,将上述静态库准备好,解压并将所有lib64、include目录移动至统一目录\$\{static_lib_path\}下。 | 71 | ops-transformer静态库依赖于ops-legacy静态库和ops-math静态库,将上述静态库准备好,解压并将所有lib64、include目录移动至统一目录\$\{static_lib_path\}下。 |
| 72 | 72 | ||
| 73 | - > 说明:ops-legacy静态库`cann-${soc_name}-ops-legacy-static_${cann_version}_linux-${arch}.tar.gz`需单击[下载链接](https://ascend.devcloud.huaweicloud.com/artifactory/cann-run-mirror/dependency/master/)获取, ops-transformer静态库、[ops-math](https://gitcode.com/cann/ops-math)静态库暂未提供软件包,请通过本地编译生成。 | 73 | + > 说明:ops-legacy静态库`cann-${soc_name}-ops-legacy-static_${cann_version}_linux-${arch}.tar.gz`需单击[下载链接](https://ascend.devcloud.huaweicloud.com/artifactory/cann-run-mirror/dependency/master/)获取, ops-transformer静态库、[ops-math](https://atomgit.com/cann/ops-math)静态库暂未提供软件包,请通过本地编译生成。 |
| 74 | 74 | ||
| 75 | 2. **创建run.sh** | 75 | 2. **创建run.sh** |
| 76 | 76 | ||
| @@ -301,9 +301,9 @@ | |||
| 301 | |[aclnnGroupedMatmulV4](../../gmm/grouped_matmul/docs/aclnnGroupedMatmulV4.md)|此接口后续版本会废弃,请使用最新接口[aclnnGroupedMatmulV5](../../gmm/grouped_matmul/docs/aclnnGroupedMatmulV5.md)。 | | 301 | |[aclnnGroupedMatmulV4](../../gmm/grouped_matmul/docs/aclnnGroupedMatmulV4.md)|此接口后续版本会废弃,请使用最新接口[aclnnGroupedMatmulV5](../../gmm/grouped_matmul/docs/aclnnGroupedMatmulV5.md)。 | |
| 302 | |[aclnnMlaProlog](../../attention/mla_prolog/docs/aclnnMlaProlog.md)|此接口后续版本会废弃,请使用最新接口[aclnnMlaPrologV3WeightNz](../../attention/mla_prolog_v3/docs/aclnnMlaPrologV3WeightNz.md)。| | 302 | |[aclnnMlaProlog](../../attention/mla_prolog/docs/aclnnMlaProlog.md)|此接口后续版本会废弃,请使用最新接口[aclnnMlaPrologV3WeightNz](../../attention/mla_prolog_v3/docs/aclnnMlaPrologV3WeightNz.md)。| |
| 303 | |[aclnnMlaPrologV2WeightNz](../../attention/mla_prolog_v2/docs/aclnnMlaPrologV2WeightNz.md)|此接口后续版本会废弃,请使用最新接口[aclnnMlaPrologV3WeightNz](../../attention/mla_prolog_v3/docs/aclnnMlaPrologV3WeightNz.md)。 | | 303 | |[aclnnMlaPrologV2WeightNz](../../attention/mla_prolog_v2/docs/aclnnMlaPrologV2WeightNz.md)|此接口后续版本会废弃,请使用最新接口[aclnnMlaPrologV3WeightNz](../../attention/mla_prolog_v3/docs/aclnnMlaPrologV3WeightNz.md)。 | |
| 304 | -|[aclnnMatmulAllReduceAddRmsNorm](../../mc2/matmul_all_reduce_add_rms_norm/docs/aclnnMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnMatmulAllReduce.md)和[aclnnRmsNorm](https://gitcode.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| | 304 | +|[aclnnMatmulAllReduceAddRmsNorm](../../mc2/matmul_all_reduce_add_rms_norm/docs/aclnnMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnMatmulAllReduce.md)和[aclnnRmsNorm](https://atomgit.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| |
| 305 | -|[aclnnQuantMatmulAllReduceAddRmsNorm](../../mc2/matmul_all_reduce_add_rms_norm/docs/aclnnQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnQuantMatmulAllReduceV2](../../mc2/matmul_all_reduce/docs/aclnnQuantMatmulAllReduceV2.md)和[aclnnRmsNorm](https://gitcode.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| | 305 | +|[aclnnQuantMatmulAllReduceAddRmsNorm](../../mc2/matmul_all_reduce_add_rms_norm/docs/aclnnQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnQuantMatmulAllReduceV2](../../mc2/matmul_all_reduce/docs/aclnnQuantMatmulAllReduceV2.md)和[aclnnRmsNorm](https://atomgit.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| |
| 306 | -|[aclnnWeightQuantMatmulAllReduceAddRmsNorm](../../mc2/matmul_all_reduce_add_rms_norm/docs/aclnnWeightQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnWeightQuantMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnWeightQuantMatmulAllReduce.md)和[aclnnRmsNorm](https://gitcode.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| | 306 | +|[aclnnWeightQuantMatmulAllReduceAddRmsNorm](../../mc2/matmul_all_reduce_add_rms_norm/docs/aclnnWeightQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnWeightQuantMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnWeightQuantMatmulAllReduce.md)和[aclnnRmsNorm](https://atomgit.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| |
| 307 | -|[aclnnInplaceMatmulAllReduceAddRmsNorm](../../mc2/inplace_matmul_all_reduce_add_rms_norm/docs/aclnnInplaceMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnMatmulAllReduce.md)和[aclnnRmsNorm](https://gitcode.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| | 307 | +|[aclnnInplaceMatmulAllReduceAddRmsNorm](../../mc2/inplace_matmul_all_reduce_add_rms_norm/docs/aclnnInplaceMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnMatmulAllReduce.md)和[aclnnRmsNorm](https://atomgit.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| |
| 308 | -|[aclnnInplaceQuantMatmulAllReduceAddRmsNorm](../../mc2/inplace_matmul_all_reduce_add_rms_norm/docs/aclnnInplaceQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnQuantMatmulAllReduceV2](../../mc2/matmul_all_reduce/docs/aclnnQuantMatmulAllReduceV2.md)和[aclnnRmsNorm](https://gitcode.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| | 308 | +|[aclnnInplaceQuantMatmulAllReduceAddRmsNorm](../../mc2/inplace_matmul_all_reduce_add_rms_norm/docs/aclnnInplaceQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnQuantMatmulAllReduceV2](../../mc2/matmul_all_reduce/docs/aclnnQuantMatmulAllReduceV2.md)和[aclnnRmsNorm](https://atomgit.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。| |
| 309 | -|[aclnnInplaceWeightQuantMatmulAllReduceAddRmsNorm](../../mc2/inplace_matmul_all_reduce_add_rms_norm/docs/aclnnInplaceWeightQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnWeightQuantMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnWeightQuantMatmulAllReduce.md)和[aclnnRmsNorm](https://gitcode.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。 | | 309 | +|[aclnnInplaceWeightQuantMatmulAllReduceAddRmsNorm](../../mc2/inplace_matmul_all_reduce_add_rms_norm/docs/aclnnInplaceWeightQuantMatmulAllReduceAddRmsNorm.md)|此接口后续版本会废弃,请替换为[aclnnWeightQuantMatmulAllReduce](../../mc2/matmul_all_reduce/docs/aclnnWeightQuantMatmulAllReduce.md)和[aclnnRmsNorm](https://atomgit.com/cann/ops-nn/blob/master/norm/add_rms_norm/docs/aclnnAddRmsNorm.md)。 | |
| @@ -15,7 +15,7 @@ | |||
| 15 | - gcc 9.4.0+ | 15 | - gcc 9.4.0+ |
| 16 | - python 3.8+ | 16 | - python 3.8+ |
| 17 | - torch>=2.6.0 | 17 | - torch>=2.6.0 |
| 18 | -- 对应版本的[TorchNPU](https://gitcode.com/Ascend/pytorch/releases) | 18 | +- 对应版本的[TorchNPU](https://atomgit.com/Ascend/pytorch/releases) |
| 19 | 19 | ||
| 20 | ## 安装步骤 | Installation Steps | 20 | ## 安装步骤 | Installation Steps |
| 21 | 21 | ||
| @@ -88,7 +88,7 @@ print("Verification successful!") | |||
| 88 | add_sources("--npu-arch=dav-2201") | 88 | add_sources("--npu-arch=dav-2201") |
| 89 | ``` | 89 | ``` |
| 90 | 90 | ||
| 91 | - 这里`dav-2201`为ascend910b芯片对应的编译参数,获取方法参考[NpuArch说明和使用指导](https://gitcode.com/cann/ops-math/wiki/NpuArch%E8%AF%B4%E6%98%8E%E5%92%8C%E4%BD%BF%E7%94%A8%E6%8C%87%E5%AF%BC.md)。 | 91 | + 这里`dav-2201`为ascend910b芯片对应的编译参数,获取方法参考[NpuArch说明和使用指导](https://atomgit.com/cann/ops-math/wiki/NpuArch%E8%AF%B4%E6%98%8E%E5%92%8C%E4%BD%BF%E7%94%A8%E6%8C%87%E5%AF%BC.md)。 |
| 92 | 92 | ||
| 93 | 3. 在soc目录下新建一个`add.cpp`(建议使用算子名为文件名)。这个文件包含了开发一个AI Core算子所需要的全部模块。 | 93 | 3. 在soc目录下新建一个`add.cpp`(建议使用算子名为文件名)。这个文件包含了开发一个AI Core算子所需要的全部模块。 |
| 94 | - 算子Schema注册 | 94 | - 算子Schema注册 |
| @@ -419,7 +419,7 @@ extern "C" __global__ __aicore__ void all_gather_add(GM_ADDR aGM, GM_ADDR bGM, G | |||
| 419 | ## 编译和运行 | 419 | ## 编译和运行 |
| 420 | 420 | ||
| 421 | 编译部署算子请参考开源仓算子README: | 421 | 编译部署算子请参考开源仓算子README: |
| 422 | -https://gitcode.com/cann/ops-transformer/blob/master/examples/mc2/all_gather_add/README.md | 422 | +https://atomgit.com/cann/ops-transformer/blob/master/examples/mc2/all_gather_add/README.md |
| 423 | 423 | ||
| 424 | ## 算子执行样例 | 424 | ## 算子执行样例 |
| 425 | 425 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnAllGatherAdd | 1 | # aclnnAllGatherAdd |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/examples/mc2/all_gather_add) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/examples/mc2/all_gather_add) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -18,7 +18,7 @@ | |||
| 18 | pip install torch-${torch_version}+cpu-${python_version}-linux_${arch}.whl | 18 | pip install torch-${torch_version}+cpu-${python_version}-linux_${arch}.whl |
| 19 | ``` | 19 | ``` |
| 20 | 20 | ||
| 21 | - 根据实际环境,安装对应TorchNPU包:`torch_npu-${torch_version}-${python_version}-linux_${arch}.whl`下载链接为:[官网地址](https://gitcode.com/Ascend/pytorch/releases) | 21 | + 根据实际环境,安装对应TorchNPU包:`torch_npu-${torch_version}-${python_version}-linux_${arch}.whl`下载链接为:[官网地址](https://atomgit.com/Ascend/pytorch/releases) |
| 22 | 22 | ||
| 23 | 安装命令如下: | 23 | 安装命令如下: |
| 24 | 24 | ||
| @@ -60,7 +60,7 @@ | |||
| 60 | <td>×</td> | 60 | <td>×</td> |
| 61 | <td>√</td> | 61 | <td>√</td> |
| 62 | <td>AI Core</td> | 62 | <td>AI Core</td> |
| 63 | - <td>将每4或128个token的KV cache压缩成一个,然后每个token与这些压缩的KV cache进行DSA计算。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 63 | + <td>将每4或128个token的KV cache压缩成一个,然后每个token与这些压缩的KV cache进行DSA计算。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 64 | </tr> | 64 | </tr> |
| 65 | <tr> | 65 | <tr> |
| 66 | <td>kv_quant_sparse_attn_sharedkv</td> | 66 | <td>kv_quant_sparse_attn_sharedkv</td> |
| @@ -71,7 +71,7 @@ | |||
| 71 | <td>×</td> | 71 | <td>×</td> |
| 72 | <td>√</td> | 72 | <td>√</td> |
| 73 | <td>AI Core</td> | 73 | <td>AI Core</td> |
| 74 | - <td>支持量化模式的Sliding Window Attention、Compressed Attention以及Sparse Compressed Attention计算。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 74 | + <td>支持量化模式的Sliding Window Attention、Compressed Attention以及Sparse Compressed Attention计算。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 75 | </tr> | 75 | </tr> |
| 76 | <tr> | 76 | <tr> |
| 77 | <td>kv_quant_sparse_attn_sharedkv_metadata</td> | 77 | <td>kv_quant_sparse_attn_sharedkv_metadata</td> |
| @@ -82,7 +82,7 @@ | |||
| 82 | <td>×</td> | 82 | <td>×</td> |
| 83 | <td>√</td> | 83 | <td>√</td> |
| 84 | <td>AI Cpu</td> | 84 | <td>AI Cpu</td> |
| 85 | - <td>该算子为kv_quant_sparse_attn_sharedkv算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 85 | + <td>该算子为kv_quant_sparse_attn_sharedkv算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 86 | </tr> | 86 | </tr> |
| 87 | <tr> | 87 | <tr> |
| 88 | <td>quant_lightning_indexer</td> | 88 | <td>quant_lightning_indexer</td> |
| @@ -93,7 +93,7 @@ | |||
| 93 | <td>×</td> | 93 | <td>×</td> |
| 94 | <td>√</td> | 94 | <td>√</td> |
| 95 | <td>AI Core</td> | 95 | <td>AI Core</td> |
| 96 | - <td>该算子是推理场景下,稀疏Attention前处理的计算,选出关键的稀疏token,并对输入query和key进行量化实现存8算8,获取最大收益。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 96 | + <td>该算子是推理场景下,稀疏Attention前处理的计算,选出关键的稀疏token,并对输入query和key进行量化实现存8算8,获取最大收益。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 97 | </tr> | 97 | </tr> |
| 98 | <tr> | 98 | <tr> |
| 99 | <td>quant_lightning_indexer_metadata</td> | 99 | <td>quant_lightning_indexer_metadata</td> |
| @@ -104,7 +104,7 @@ | |||
| 104 | <td>×</td> | 104 | <td>×</td> |
| 105 | <td>√</td> | 105 | <td>√</td> |
| 106 | <td>AI Cpu</td> | 106 | <td>AI Cpu</td> |
| 107 | - <td>该算子为quant_lightning_indexer算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 107 | + <td>该算子为quant_lightning_indexer算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 108 | </tr> | 108 | </tr> |
| 109 | <tr> | 109 | <tr> |
| 110 | <td>sparse_attn_sharedkv</td> | 110 | <td>sparse_attn_sharedkv</td> |
| @@ -115,7 +115,7 @@ | |||
| 115 | <td>×</td> | 115 | <td>×</td> |
| 116 | <td>√</td> | 116 | <td>√</td> |
| 117 | <td>AI Core</td> | 117 | <td>AI Core</td> |
| 118 | - <td>该算子支持非量化的Sliding Window Attention、Compressed Attention以及Sparse Compressed Attention计算。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 118 | + <td>该算子支持非量化的Sliding Window Attention、Compressed Attention以及Sparse Compressed Attention计算。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 119 | </tr> | 119 | </tr> |
| 120 | <tr> | 120 | <tr> |
| 121 | <td>sparse_attn_sharedkv_metadata</td> | 121 | <td>sparse_attn_sharedkv_metadata</td> |
| @@ -126,7 +126,7 @@ | |||
| 126 | <td>×</td> | 126 | <td>×</td> |
| 127 | <td>√</td> | 127 | <td>√</td> |
| 128 | <td>AI Cpu</td> | 128 | <td>AI Cpu</td> |
| 129 | - <td>该算子为sparse_attn_sharedkv算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 129 | + <td>该算子为sparse_attn_sharedkv算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 130 | </tr> | 130 | </tr> |
| 131 | <tr> | 131 | <tr> |
| 132 | <td>blitz_sparse_attention</td> | 132 | <td>blitz_sparse_attention</td> |
| @@ -137,7 +137,7 @@ | |||
| 137 | <td>/</td> | 137 | <td>/</td> |
| 138 | <td>/</td> | 138 | <td>/</td> |
| 139 | <td>/</td> | 139 | <td>/</td> |
| 140 | - <td>算子具体使用方法见<a href="https://gitcode.com/cann/ops-transformer/blob/master/experimental/attention/blitz_sparse_attention/README.md">README文档</a>。</td> | 140 | + <td>算子具体使用方法见<a href="https://atomgit.com/cann/ops-transformer/blob/master/experimental/attention/blitz_sparse_attention/README.md">README文档</a>。</td> |
| 141 | </tr> | 141 | </tr> |
| 142 | <tr> | 142 | <tr> |
| 143 | <td>fused_infer_attention_score</td> | 143 | <td>fused_infer_attention_score</td> |
| @@ -148,7 +148,7 @@ | |||
| 148 | <td>/</td> | 148 | <td>/</td> |
| 149 | <td>/</td> | 149 | <td>/</td> |
| 150 | <td>/</td> | 150 | <td>/</td> |
| 151 | - <td>算子具体使用方法见<a href="https://gitcode.com/cann/ops-transformer/blob/master/experimental/attention/fused_infer_attention_score/README.md">README文档</a>。</td> | 151 | + <td>算子具体使用方法见<a href="https://atomgit.com/cann/ops-transformer/blob/master/experimental/attention/fused_infer_attention_score/README.md">README文档</a>。</td> |
| 152 | </tr> | 152 | </tr> |
| 153 | <tr> | 153 | <tr> |
| 154 | <td>typhoon_mla</td> | 154 | <td>typhoon_mla</td> |
| @@ -159,7 +159,7 @@ | |||
| 159 | <td>/</td> | 159 | <td>/</td> |
| 160 | <td>/</td> | 160 | <td>/</td> |
| 161 | <td>/</td> | 161 | <td>/</td> |
| 162 | - <td>算子具体使用方法见<a href="https://gitcode.com/cann/ops-transformer/blob/master/experimental/attention/typhoon_mla/README.md">README文档</a>。</td> | 162 | + <td>算子具体使用方法见<a href="https://atomgit.com/cann/ops-transformer/blob/master/experimental/attention/typhoon_mla/README.md">README文档</a>。</td> |
| 163 | </tr> | 163 | </tr> |
| 164 | <tr> | 164 | <tr> |
| 165 | <td>chunk_gated_delta_rule_compute_wy</td> | 165 | <td>chunk_gated_delta_rule_compute_wy</td> |
| @@ -181,7 +181,7 @@ | |||
| 181 | <td>×</td> | 181 | <td>×</td> |
| 182 | <td>√</td> | 182 | <td>√</td> |
| 183 | <td>AI Core</td> | 183 | <td>AI Core</td> |
| 184 | - <td>该算子融合GDN单token解码中的QKV拆分、Q/K归一化、门控计算、循环状态更新和输出投影。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 184 | + <td>该算子融合GDN单token解码中的QKV拆分、Q/K归一化、门控计算、循环状态更新和输出投影。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 185 | </tr> | 185 | </tr> |
| 186 | <tr> | 186 | <tr> |
| 187 | <td>stem_indexer</td> | 187 | <td>stem_indexer</td> |
| @@ -192,7 +192,7 @@ | |||
| 192 | <td>×</td> | 192 | <td>×</td> |
| 193 | <td>√</td> | 193 | <td>√</td> |
| 194 | <td>AI Core</td> | 194 | <td>AI Core</td> |
| 195 | - <td>该算子是推理场景下,稀疏Attention前处理的计算,选出关键的稀疏block块,获取最大收益。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 195 | + <td>该算子是推理场景下,稀疏Attention前处理的计算,选出关键的稀疏block块,获取最大收益。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 196 | </tr> | 196 | </tr> |
| 197 | <tr> | 197 | <tr> |
| 198 | <td>stem_indexer_metadata</td> | 198 | <td>stem_indexer_metadata</td> |
| @@ -203,7 +203,7 @@ | |||
| 203 | <td>×</td> | 203 | <td>×</td> |
| 204 | <td>√</td> | 204 | <td>√</td> |
| 205 | <td>AI Cpu</td> | 205 | <td>AI Cpu</td> |
| 206 | - <td>该算子为stem_indexer算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> | 206 | + <td>该算子为stem_indexer算子提供分核结果。<br/>算子torch接口调用依赖torch_ops_extension,具体安装方法见<a href="https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85">安装指导</a>。</td> |
| 207 | </tr> | 207 | </tr> |
| 208 | </tbody> | 208 | </tbody> |
| 209 | </table> | 209 | </table> |
| @@ -250,7 +250,7 @@ | |||
| 250 | 250 | ||
| 251 | 根据[算子列表](#算子列表)章节介绍,如需使用`torch`接口进行算子调用,则需前置安装torch_ops_extension包。 | 251 | 根据[算子列表](#算子列表)章节介绍,如需使用`torch`接口进行算子调用,则需前置安装torch_ops_extension包。 |
| 252 | 252 | ||
| 253 | -torch_ops_extension包为自定义算子提供了torch.ops的拓展接口,具体编译安装方法请见[torch_ops_extension安装方法](https://gitcode.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85)。 | 253 | +torch_ops_extension包为自定义算子提供了torch.ops的拓展接口,具体编译安装方法请见[torch_ops_extension安装方法](https://atomgit.com/cann/cann-recipes-infer/tree/master/ops/ascendc#torch_ops_extension%E7%AE%97%E5%AD%90%E5%8C%85%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85)。 |
| 254 | 254 | ||
| 255 | ## 自定义算子执行 | 255 | ## 自定义算子执行 |
| 256 | 项目中各算子通过pytest验证各算子的功能是否正常,各算子的pytest调用方法如下表。 | 256 | 项目中各算子通过pytest验证各算子的功能是否正常,各算子的pytest调用方法如下表。 |
| @@ -80,7 +80,7 @@ | |||
| 80 | 80 | ||
| 81 | ## 函数原型 | 81 | ## 函数原型 |
| 82 | 82 | ||
| 83 | -每个算子分为[两段式接口](https://gitcode.com/cann/ops-transformer/blob/master/docs/zh/context/two_phase_api.md),必须先调用"aclnnBlockSparseAttentionV3GetWorkspaceSize"接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用"aclnnBlockSparseAttentionV3"接口执行计算。 | 83 | +每个算子分为[两段式接口](https://atomgit.com/cann/ops-transformer/blob/master/docs/zh/context/two_phase_api.md),必须先调用"aclnnBlockSparseAttentionV3GetWorkspaceSize"接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用"aclnnBlockSparseAttentionV3"接口执行计算。 |
| 84 | 84 | ||
| 85 | ```c++ | 85 | ```c++ |
| 86 | aclnnStatus aclnnBlockSparseAttentionV3GetWorkspaceSize( | 86 | aclnnStatus aclnnBlockSparseAttentionV3GetWorkspaceSize( |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnCompressorV2 | 1 | # aclnnCompressorV2 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/experimental/attention/compressor_v2) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/experimental/attention/compressor_v2) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # compressor | 1 | # compressor |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/experimental/attention/compressor_v2) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/experimental/attention/compressor_v2) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -39,7 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | ### 前置要求 | 40 | ### 前置要求 |
| 41 | 41 | ||
| 42 | -1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 42 | +1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 43 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../../README.md) | 43 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../../README.md) |
| 44 | 44 | ||
| 45 | ### 编译安装torch_ops_extension | 45 | ### 编译安装torch_ops_extension |
| @@ -61,7 +61,7 @@ | |||
| 61 | 61 | ||
| 62 | 根据当前环境,安装对应的CANN开发套件包(toolkit包+ops包)。 | 62 | 根据当前环境,安装对应的CANN开发套件包(toolkit包+ops包)。 |
| 63 | 63 | ||
| 64 | -1. TorchNPU安装包下载路径:[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 64 | +1. TorchNPU安装包下载路径:[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 65 | 2. CANN包可从[昇腾社区](https://www.hiascend.com/developer/download/community/result?module=cann)获取,具体下载安装见昇腾社区[文档](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/latest/softwareinst/instg/instg_0000.html?Mode=PmIns&InstallType=netconda&OS=Ubuntu)。 | 65 | 2. CANN包可从[昇腾社区](https://www.hiascend.com/developer/download/community/result?module=cann)获取,具体下载安装见昇腾社区[文档](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/latest/softwareinst/instg/instg_0000.html?Mode=PmIns&InstallType=netconda&OS=Ubuntu)。 |
| 66 | 66 | ||
| 67 | 按需选择合适的命令使环境变量生效。 | 67 | 按需选择合适的命令使环境变量生效。 |
| @@ -45,7 +45,7 @@ pytest框架作为一个轻量化精度对比的测试框架,提供了简单 | |||
| 45 | 45 | ||
| 46 | ### 前置要求 | 46 | ### 前置要求 |
| 47 | 47 | ||
| 48 | -1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://gitcode.com/Ascend/pytorch) | 48 | +1. TorchNPU安装包下载路径(需及时更换为最新版本):[TorchNPU安装教程](https://atomgit.com/Ascend/pytorch) |
| 49 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../../README.md) | 49 | 2. 完成环境安装和环境变量配置,具体操作请参考:[ops-transformer](../../../../../README.md) |
| 50 | 50 | ||
| 51 | ### Custom包调用 | 51 | ### Custom包调用 |
| @@ -77,11 +77,11 @@ | |||
| 77 | - 若同时传入seqused\_ori\_kv、seqused\_cmp\_kv和cmp\_residual\_kv,需满足:seqused\_ori\_kv[i] == seqused\_cmp\_kv[i] * cmp\_ratio + cmp\_residual\_kv[i],且cmp\_residual\_kv[i] < cmp\_ratio。 | 77 | - 若同时传入seqused\_ori\_kv、seqused\_cmp\_kv和cmp\_residual\_kv,需满足:seqused\_ori\_kv[i] == seqused\_cmp\_kv[i] * cmp\_ratio + cmp\_residual\_kv[i],且cmp\_residual\_kv[i] < cmp\_ratio。 |
| 78 | - 参数ori\_block\_table的shape为2维,其中第一维长度为B,第二维长度不小于所有Batch中最大的S2对应的block数量,即S2\_max / block\_size1向上取整。 | 78 | - 参数ori\_block\_table的shape为2维,其中第一维长度为B,第二维长度不小于所有Batch中最大的S2对应的block数量,即S2\_max / block\_size1向上取整。 |
| 79 | - 参数cmp\_block\_table的shape为2维,其中第一维长度为B,第二维长度不小于floor(S2\_max \/ cmp\_ratio)对应的block数量,即floor(S2\_max \/ cmp\_ratio) \/ block\_size2向上取整。 | 79 | - 参数cmp\_block\_table的shape为2维,其中第一维长度为B,第二维长度不小于floor(S2\_max \/ cmp\_ratio)对应的block数量,即floor(S2\_max \/ cmp\_ratio) \/ block\_size2向上取整。 |
| 80 | -- ori\_mask\_mode及cmp\_mask\_mode所表示的mask模式的详细介绍见[sparse_mode参数说明](https://gitcode.com/cann/ops-transformer/blob/master/docs/zh/context/sparse_mode_introduction.md)。 | 80 | +- ori\_mask\_mode及cmp\_mask\_mode所表示的mask模式的详细介绍见[sparse_mode参数说明](https://atomgit.com/cann/ops-transformer/blob/master/docs/zh/context/sparse_mode_introduction.md)。 |
| 81 | - q、ori_kv、cmp_kv参数维度含义:B(Batch Size)表示输入样本批量大小、S(Sequence Length)表示输入样本序列长度、H(Hidden Size)表示hidden层的大小、N(Head Num)表示多头数、D(Head Dim)表示hidden层最小的单元尺寸,且满足D=H/N、T表示所有Batch输入样本序列长度的累加和。 | 81 | - q、ori_kv、cmp_kv参数维度含义:B(Batch Size)表示输入样本批量大小、S(Sequence Length)表示输入样本序列长度、H(Hidden Size)表示hidden层的大小、N(Head Num)表示多头数、D(Head Dim)表示hidden层最小的单元尺寸,且满足D=H/N、T表示所有Batch输入样本序列长度的累加和。 |
| 82 | - Q\_S和S1表示q shape中的S,S2表示ori\_kv shape中的S,Q\_N和N1表示num\_q\_heads,KV\_N和N2表示num\_ori\_kv\_heads和num\_cmp\_kv\_heads;T1表示q shape中的T。 | 82 | - Q\_S和S1表示q shape中的S,S2表示ori\_kv shape中的S,Q\_N和N1表示num\_q\_heads,KV\_N和N2表示num\_ori\_kv\_heads和num\_cmp\_kv\_heads;T1表示q shape中的T。 |
| 83 | 83 | ||
| 84 | ## 调用说明 | 84 | ## 调用说明 |
| 85 | 85 | ||
| 86 | - 调用方式:使用npu_ops_tranformer包中的npu_quant_sparse_flash_mla接口进行调用, | 86 | - 调用方式:使用npu_ops_tranformer包中的npu_quant_sparse_flash_mla接口进行调用, |
| 87 | - 详见torch_extension/npu_ops_transformer/ops/quant_sparse_flash_mla.py | 87 | + 详见torch_extension/npu_ops_transformer/ops/quant_sparse_flash_mla.py |
| @@ -75,6 +75,6 @@ | |||
| 75 | 75 | ||
| 76 | ## 精度说明 | 76 | ## 精度说明 |
| 77 | - 本算子为 4bit 量化算子,其输出与全精度 Attention 之间存在量化本身引入的固有偏差,不属于算子实现缺陷。因此精度对标的标杆取**与算子采用相同量化方案的高精度 CPU 实现**(量化与反量化过程按 float64 计算),以剥离量化误差、只考察算子实现误差。 | 77 | - 本算子为 4bit 量化算子,其输出与全精度 Attention 之间存在量化本身引入的固有偏差,不属于算子实现缺陷。因此精度对标的标杆取**与算子采用相同量化方案的高精度 CPU 实现**(量化与反量化过程按 float64 计算),以剥离量化误差、只考察算子实现误差。 |
| 78 | -- 判定沿用 [experimental 精度标准](https://gitcode.com/cann/opbase/blob/master/docs/zh/ops_precision_standard/experimental_standard.md) 的双条件: | 78 | +- 判定沿用 [experimental 精度标准](https://atomgit.com/cann/opbase/blob/master/docs/zh/ops_precision_standard/mixed_tolerance_standard.md) 的双条件: |
| 79 | - 匹配率:满足 $|actual - golden| \le atol + rtol \times |golden|$ 的元素占比 $\ge 0.99$; | 79 | - 匹配率:满足 $|actual - golden| \le atol + rtol \times |golden|$ 的元素占比 $\ge 0.99$; |
| 80 | - 最大绝对误差不超过对应数据类型的硬上限。 | 80 | - 最大绝对误差不超过对应数据类型的硬上限。 |
| @@ -57,11 +57,11 @@ vLLM在 `vllm.model_executor.layers.mamba.ops` 下实现了完整的Mamba v2算 | |||
| 57 | 57 | ||
| 58 | ## Nemotron-H网络中的MambaV2整层计算流 | 58 | ## Nemotron-H网络中的MambaV2整层计算流 |
| 59 | 59 | ||
| 60 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/5163260c-fe1e-4a06-90c6-5355ba23ea90/image.png" height="900"> | 60 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/5163260c-fe1e-4a06-90c6-5355ba23ea90/image.png" height="900"> |
| 61 | 61 | ||
| 62 | ## MambaV2 chunk scan combined计算流和融合算子设计 | 62 | ## MambaV2 chunk scan combined计算流和融合算子设计 |
| 63 | 63 | ||
| 64 | - | 64 | + |
| 65 | 65 | ||
| 66 | ## 目录结构 | 66 | ## 目录结构 |
| 67 | 67 | ||
| @@ -125,4 +125,4 @@ python3 test_causal_conv1d.py | |||
| 125 | 125 | ||
| 126 | (每个算子 tests 下测试脚本在910B3的profile结果) | 126 | (每个算子 tests 下测试脚本在910B3的profile结果) |
| 127 | 127 | ||
| 128 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/4d4b226f-cce2-4c93-bb01-fdaade6fff7e/image.png" height="200"> | 128 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/4d4b226f-cce2-4c93-bb01-fdaade6fff7e/image.png" height="200"> |
| @@ -4,9 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | 基于状态空间模型(SSM)的因果卷积,实现MambaV2 Prefill阶段的因果卷积计算。计算流程包含kernel_size=4的depthwise conv1d和SiLU激活。本算子采用纯Vector实现conv1d,并融合bias和SiLU运算以提升性能。 | 5 | 基于状态空间模型(SSM)的因果卷积,实现MambaV2 Prefill阶段的因果卷积计算。计算流程包含kernel_size=4的depthwise conv1d和SiLU激活。本算子采用纯Vector实现conv1d,并融合bias和SiLU运算以提升性能。 |
| 6 | 6 | ||
| 7 | -**计算流** | 7 | +**计算流** |
| 8 | 8 | ||
| 9 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/a7e74e1a-1080-4a62-bf45-e172eb790545/image.png" height="300"> | 9 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/a7e74e1a-1080-4a62-bf45-e172eb790545/image.png" height="300"> |
| 10 | 10 | ||
| 11 | ### 自定义Kernel输入输出(I/O) | 11 | ### 自定义Kernel输入输出(I/O) |
| 12 | 12 | ||
| @@ -24,11 +24,11 @@ | |||
| 24 | |-----|-----|-----| | 24 | |-----|-----|-----| |
| 25 | | out | BDS | FP32 | | 25 | | out | BDS | FP32 | |
| 26 | 26 | ||
| 27 | -**参数说明:** | 27 | +**参数说明:** |
| 28 | 28 | ||
| 29 | -B: batch size | 29 | +B: batch size |
| 30 | -D: dimension | 30 | +D: dimension |
| 31 | -S: sequence len | 31 | +S: sequence len |
| 32 | 该算子支持任意长度S | 32 | 该算子支持任意长度S |
| 33 | 33 | ||
| 34 | **调用方式** | 34 | **调用方式** |
| @@ -6,7 +6,7 @@ mamba2_chunk_cumsum用于在MambaV2 Prefill阶段对chunk内部执行按时间 | |||
| 6 | 6 | ||
| 7 | **计算流** | 7 | **计算流** |
| 8 | 8 | ||
| 9 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/37cc914a-27a6-45a5-a244-2d3756581e37/image.png" height="500"> | 9 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/37cc914a-27a6-45a5-a244-2d3756581e37/image.png" height="500"> |
| 10 | 10 | ||
| 11 | ### Kernel输入输出(I/O) | 11 | ### Kernel输入输出(I/O) |
| 12 | 12 | ||
| @@ -27,12 +27,12 @@ mamba2_chunk_cumsum用于在MambaV2 Prefill阶段对chunk内部执行按时间 | |||
| 27 | | dacs | BCLH | FP32 | | 27 | | dacs | BCLH | FP32 | |
| 28 | | dacs_chunk | BCH | FP32 | | 28 | | dacs_chunk | BCH | FP32 | |
| 29 | 29 | ||
| 30 | -**参数说明:** | 30 | +**参数说明:** |
| 31 | 31 | ||
| 32 | -B: batch size | 32 | +B: batch size |
| 33 | -C: number of chunks | 33 | +C: number of chunks |
| 34 | -L: chunk size | 34 | +L: chunk size |
| 35 | -H: number of head | 35 | +H: number of head |
| 36 | 其中C*L为padding后的序列长度 | 36 | 其中C*L为padding后的序列长度 |
| 37 | 37 | ||
| 38 | **调用方式** | 38 | **调用方式** |
| @@ -5,9 +5,9 @@ | |||
| 5 | mamba2_chunk_scan用于在MambaV2 Prefill阶段对chunk内状态执行selective scan运算:对来自前序chunk的传播状态、chunk内delta信息以及gating/bias进行结合,根据时间步顺序进行递推累计,生成当前chunk的有效输出。 | 5 | mamba2_chunk_scan用于在MambaV2 Prefill阶段对chunk内状态执行selective scan运算:对来自前序chunk的传播状态、chunk内delta信息以及gating/bias进行结合,根据时间步顺序进行递推累计,生成当前chunk的有效输出。 |
| 6 | 该算子包含两个matmul和两部分vector计算,因此实现为CVCV融合算子,通过VC并行提升计算性能。 | 6 | 该算子包含两个matmul和两部分vector计算,因此实现为CVCV融合算子,通过VC并行提升计算性能。 |
| 7 | 7 | ||
| 8 | -**计算流** | 8 | +**计算流** |
| 9 | 9 | ||
| 10 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/246d0aa8-1ed9-45ff-97db-7ee759ca8334/image.png" height="300"> | 10 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/246d0aa8-1ed9-45ff-97db-7ee759ca8334/image.png" height="300"> |
| 11 | 11 | ||
| 12 | ### Kernel输入输出(I/O) | 12 | ### Kernel输入输出(I/O) |
| 13 | 13 | ||
| @@ -29,15 +29,15 @@ mamba2_chunk_scan用于在MambaV2 Prefill阶段对chunk内状态执行selective | |||
| 29 | |-----|-----|-----| | 29 | |-----|-----|-----| |
| 30 | | final_attn | BCLHP | FP32 | | 30 | | final_attn | BCLHP | FP32 | |
| 31 | 31 | ||
| 32 | -**参数说明:** | 32 | +**参数说明:** |
| 33 | 33 | ||
| 34 | -B: batch size | 34 | +B: batch size |
| 35 | -C: number of chunks | 35 | +C: number of chunks |
| 36 | -L: chunk size | 36 | +L: chunk size |
| 37 | -H: number of head | 37 | +H: number of head |
| 38 | -G: ngroups | 38 | +G: ngroups |
| 39 | -N: state size | 39 | +N: state size |
| 40 | -P: head dim | 40 | +P: head dim |
| 41 | 其中C*L为padding后的序列长度 | 41 | 其中C*L为padding后的序列长度 |
| 42 | 42 | ||
| 43 | **调用方式** | 43 | **调用方式** |
| @@ -6,7 +6,7 @@ mamba2_chunk_state用于在MambaV2 Prefill阶段进行chunk内的离散时间状 | |||
| 6 | 6 | ||
| 7 | **计算流** | 7 | **计算流** |
| 8 | 8 | ||
| 9 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/88ab3b4c-4940-4b88-9aca-e6a44fd4fc04/image.png" height="300"> | 9 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/88ab3b4c-4940-4b88-9aca-e6a44fd4fc04/image.png" height="300"> |
| 10 | 10 | ||
| 11 | ### Kernel输入输出(I/O) | 11 | ### Kernel输入输出(I/O) |
| 12 | 12 | ||
| @@ -25,15 +25,15 @@ mamba2_chunk_state用于在MambaV2 Prefill阶段进行chunk内的离散时间状 | |||
| 25 | |-----|-----|-----| | 25 | |-----|-----|-----| |
| 26 | | states | BCHNP | FP32 | | 26 | | states | BCHNP | FP32 | |
| 27 | 27 | ||
| 28 | -**参数说明:** | 28 | +**参数说明:** |
| 29 | 29 | ||
| 30 | -B: batch size | 30 | +B: batch size |
| 31 | -C: number of chunks | 31 | +C: number of chunks |
| 32 | -L: chunk size | 32 | +L: chunk size |
| 33 | -H: number of head | 33 | +H: number of head |
| 34 | -G: ngroups | 34 | +G: ngroups |
| 35 | -N: state size | 35 | +N: state size |
| 36 | -P: head dim | 36 | +P: head dim |
| 37 | 其中C*L为padding后的序列长度 | 37 | 其中C*L为padding后的序列长度 |
| 38 | 38 | ||
| 39 | **调用方式** | 39 | **调用方式** |
| @@ -5,9 +5,9 @@ | |||
| 5 | mamba2_chunk_state_passing用于在MambaV2 Prefill阶段进行跨chunk状态传递,将chunk内计算得到的状态按照时间顺序依次传递,并在各chunk之间执行指数衰减和新状态叠加,从而形成完整的跨chunk状态序列;同时返回最终的全局状态,用于下一阶段推理。该算子通常在chunk_state之后调用,用于将chunk内状态扩展为跨chunk的连续状态序列,并生成下一阶段使用的最终状态。同时,本算子在状态传递完成后,对重排后的状态张量与ct执行基于Cube的批量矩阵乘(states @ ct),实现类似inter-attention的跨chunk状态混合。 | 5 | mamba2_chunk_state_passing用于在MambaV2 Prefill阶段进行跨chunk状态传递,将chunk内计算得到的状态按照时间顺序依次传递,并在各chunk之间执行指数衰减和新状态叠加,从而形成完整的跨chunk状态序列;同时返回最终的全局状态,用于下一阶段推理。该算子通常在chunk_state之后调用,用于将chunk内状态扩展为跨chunk的连续状态序列,并生成下一阶段使用的最终状态。同时,本算子在状态传递完成后,对重排后的状态张量与ct执行基于Cube的批量矩阵乘(states @ ct),实现类似inter-attention的跨chunk状态混合。 |
| 6 | 该算子实现为Vector+Cube融合算子,通过VC并行提升计算性能。 | 6 | 该算子实现为Vector+Cube融合算子,通过VC并行提升计算性能。 |
| 7 | 7 | ||
| 8 | -**计算流** | 8 | +**计算流** |
| 9 | 9 | ||
| 10 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/49bacbe4-46b1-4780-88e6-2c6327bd97e1/image.png" height="300"> | 10 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/49bacbe4-46b1-4780-88e6-2c6327bd97e1/image.png" height="300"> |
| 11 | 11 | ||
| 12 | ### Kernel输入输出(I/O) | 12 | ### Kernel输入输出(I/O) |
| 13 | 13 | ||
| @@ -27,14 +27,14 @@ mamba2_chunk_state_passing用于在MambaV2 Prefill阶段进行跨chunk状态传 | |||
| 27 | | inter_attn | BCHLP | FP32 | | 27 | | inter_attn | BCHLP | FP32 | |
| 28 | | final_state | BHNP | FP32 | | 28 | | final_state | BHNP | FP32 | |
| 29 | 29 | ||
| 30 | -**参数说明:** | 30 | +**参数说明:** |
| 31 | -B: batch size | 31 | +B: batch size |
| 32 | -C: number of chunks | 32 | +C: number of chunks |
| 33 | -L: chunk size | 33 | +L: chunk size |
| 34 | -H: number of head | 34 | +H: number of head |
| 35 | -G: ngroups | 35 | +G: ngroups |
| 36 | -N: state size | 36 | +N: state size |
| 37 | -P: head dim | 37 | +P: head dim |
| 38 | 其中C*L为padding后的序列长度 | 38 | 其中C*L为padding后的序列长度 |
| 39 | 39 | ||
| 40 | **调用方式** | 40 | **调用方式** |
| @@ -4,9 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | 基于 RMSNorm 和 SiLU 门控的融合算子,实现 MambaV2 Prefill 阶段的 RMSNorm + Gating 计算。计算流程为输入 x 经 SiLU(z) 门控激活后,进行分组 RMSNorm 归一化,再乘以权重 w。 | 5 | 基于 RMSNorm 和 SiLU 门控的融合算子,实现 MambaV2 Prefill 阶段的 RMSNorm + Gating 计算。计算流程为输入 x 经 SiLU(z) 门控激活后,进行分组 RMSNorm 归一化,再乘以权重 w。 |
| 6 | 6 | ||
| 7 | -**计算流** | 7 | +**计算流** |
| 8 | 8 | ||
| 9 | -<img src="https://raw.gitcode.com/user-images/assets/7673863/f90c8afa-f740-40c3-a2d4-f470a301b60a/image.png" height="300"> | 9 | +<img src="https://raw.atomgit.com/user-images/assets/7673863/f90c8afa-f740-40c3-a2d4-f470a301b60a/image.png" height="300"> |
| 10 | 10 | ||
| 11 | ### 自定义Kernel输入输出(I/O) | 11 | ### 自定义Kernel输入输出(I/O) |
| 12 | 12 | ||
| @@ -24,9 +24,9 @@ | |||
| 24 | |-----|-----|-----| | 24 | |-----|-----|-----| |
| 25 | | out | BSD | FP32 | | 25 | | out | BSD | FP32 | |
| 26 | 26 | ||
| 27 | -**参数说明:** | 27 | +**参数说明:** |
| 28 | -B: batch size | 28 | +B: batch size |
| 29 | -S: sequence len | 29 | +S: sequence len |
| 30 | D: dimension | 30 | D: dimension |
| 31 | 额外需要参数 | 31 | 额外需要参数 |
| 32 | G: ngroups | 32 | G: ngroups |
| @@ -22,10 +22,10 @@ For example: x = [1, 24, 28800, 128], y = [128, 128], cos/sin = [1, 1, 28800, 12 | |||
| 22 | ### Design | 22 | ### Design |
| 23 | 23 | ||
| 24 | As the fig shows, we design a Mathematical Equivalence algorithm "Rope-Matrix(ROME)" to accelerate rope. | 24 | As the fig shows, we design a Mathematical Equivalence algorithm "Rope-Matrix(ROME)" to accelerate rope. |
| 25 | -The key is to replace tensor rearrage operator by matrix. | 25 | +The key is to replace tensor rearrage operator by matrix. |
| 26 | - | 26 | + |
| 27 | Besides, for 3D-ROPE situation, origin rope-fused need call three times, we just need to call once. | 27 | Besides, for 3D-ROPE situation, origin rope-fused need call three times, we just need to call once. |
| 28 | - | 28 | + |
| 29 | 29 | ||
| 30 | Designing detail: | 30 | Designing detail: |
| 31 | By profiling, we find memory bound for both C and V on 910B. Thus, no need CV pipeline, we just simplify run V after C. | 31 | By profiling, we find memory bound for both C and V on 910B. Thus, no need CV pipeline, we just simplify run V after C. |
| @@ -37,7 +37,7 @@ Using ```AscendC::CrossCoreSetFlag``` and ```AscendC::CrossCoreWaitFlag``` to co | |||
| 37 | ${op_class} # class | 37 | ${op_class} # class |
| 38 | ├── ${op_name} # name | 38 | ├── ${op_name} # name |
| 39 | │ ├── inc # define aRopeMatrixTiling like TCubeTiling, which can be call by both op_device and op_host | 39 | │ ├── inc # define aRopeMatrixTiling like TCubeTiling, which can be call by both op_device and op_host |
| 40 | - │ │ └── ${op_name}_extern.h | 40 | + │ │ └── ${op_name}_extern.h |
| 41 | │ ├── op_host # Tiling、InferShape(If needed, custom operator may not need)... | 41 | │ ├── op_host # Tiling、InferShape(If needed, custom operator may not need)... |
| 42 | │ │ └── ${op_name}_tiling.h # Tiling | 42 | │ │ └── ${op_name}_tiling.h # Tiling |
| 43 | │ ├── op_kernel # kernel | 43 | │ ├── op_kernel # kernel |
| @@ -46,7 +46,7 @@ Using ```AscendC::CrossCoreSetFlag``` and ```AscendC::CrossCoreWaitFlag``` to co | |||
| 46 | │ ├── tests # tests | 46 | │ ├── tests # tests |
| 47 | │ │ └── test_rope.py # test file: contain how to gen the [d, d] rope-matrix, | 47 | │ │ └── test_rope.py # test file: contain how to gen the [d, d] rope-matrix, |
| 48 | │ ├── CMakeLists.txt # makefile | 48 | │ ├── CMakeLists.txt # makefile |
| 49 | - │ ├── torch_interface.cpp # for torch calling | 49 | + │ ├── torch_interface.cpp # for torch calling |
| 50 | │ └── README.md # readme | 50 | │ └── README.md # readme |
| 51 | ``` | 51 | ``` |
| 52 | 52 | ||
| @@ -54,7 +54,7 @@ Using ```AscendC::CrossCoreSetFlag``` and ```AscendC::CrossCoreWaitFlag``` to co | |||
| 54 | 54 | ||
| 55 | ```bash | 55 | ```bash |
| 56 | from example: https://gitee.com/ascend/samples/blob/master/operator/ascendc/0_introduction/22_baremix_kernellaunch/BareMixInvocation/baremix_custom.cpp | 56 | from example: https://gitee.com/ascend/samples/blob/master/operator/ascendc/0_introduction/22_baremix_kernellaunch/BareMixInvocation/baremix_custom.cpp |
| 57 | -from example: https://gitcode.com/cann/ops-transformer/blob/master/posembedding/rotary_position_embedding/rotate_half_bf16.h | 57 | +from example: https://atomgit.com/cann/ops-transformer/blob/master/posembedding/rotary_position_embedding/rotate_half_bf16.h |
| 58 | ``` | 58 | ``` |
| 59 | 59 | ||
| 60 | we simplify the code from origin rope-fused operator to fit our cases. | 60 | we simplify the code from origin rope-fused operator to fit our cases. |
| @@ -87,8 +87,8 @@ Then cube process 720*2, vector process 720, last vector process 719, last cube | |||
| 87 | 87 | ||
| 88 | ```bash | 88 | ```bash |
| 89 | A. design 'torch_interface.cpp': | 89 | A. design 'torch_interface.cpp': |
| 90 | -1) design interface: | 90 | +1) design interface: |
| 91 | -Add "m.def("rope_matrix(Tensor x, Tensor y, Tensor sin, Tensor cos) -> Tensor");" | 91 | +Add "m.def("rope_matrix(Tensor x, Tensor y, Tensor sin, Tensor cos) -> Tensor");" |
| 92 | into "TORCH_LIBRARY" function in "npu_ops_transformer_ext/npu_ops_def.cpp" | 92 | into "TORCH_LIBRARY" function in "npu_ops_transformer_ext/npu_ops_def.cpp" |
| 93 | 93 | ||
| 94 | Then use TORCH_LIBRARY_IMPL to register your function, fuc must have same inputs and output, | 94 | Then use TORCH_LIBRARY_IMPL to register your function, fuc must have same inputs and output, |
| @@ -146,7 +146,7 @@ or use default ```test_rope.py``` or full test code as follows: | |||
| 146 | 146 | ||
| 147 | ```bash | 147 | ```bash |
| 148 | import os | 148 | import os |
| 149 | -import numpy as np | 149 | +import numpy as np |
| 150 | 150 | ||
| 151 | import torch | 151 | import torch |
| 152 | import torch.nn as nn | 152 | import torch.nn as nn |
| @@ -162,7 +162,7 @@ from torch.cuda.amp import autocast | |||
| 162 | 162 | ||
| 163 | from einops import rearrange, repeat | 163 | from einops import rearrange, repeat |
| 164 | 164 | ||
| 165 | -os.environ["COMBINED_ENABLE"] = "1" # | 165 | +os.environ["COMBINED_ENABLE"] = "1" # |
| 166 | os.environ["INF_NAN_MODE_ENABLE"] = "1" | 166 | os.environ["INF_NAN_MODE_ENABLE"] = "1" |
| 167 | os.environ["PYTORCH_NPU_ALLOC_CONF"] = "expandable_segments:True" | 167 | os.environ["PYTORCH_NPU_ALLOC_CONF"] = "expandable_segments:True" |
| 168 | torch.manual_seed(0) | 168 | torch.manual_seed(0) |
| @@ -171,7 +171,7 @@ torch.set_printoptions(precision=16) | |||
| 171 | torch_npu.npu.set_compile_mode(jit_compile=False) | 171 | torch_npu.npu.set_compile_mode(jit_compile=False) |
| 172 | torch_npu.npu.config.allow_internal_format = False | 172 | torch_npu.npu.config.allow_internal_format = False |
| 173 | torch.npu.conv.allow_hf32 = False | 173 | torch.npu.conv.allow_hf32 = False |
| 174 | -torch.npu.matmul.allow_hf32 = False | 174 | +torch.npu.matmul.allow_hf32 = False |
| 175 | 175 | ||
| 176 | print("import torch_npu success, training in ascend") | 176 | print("import torch_npu success, training in ascend") |
| 177 | 177 | ||
| @@ -203,12 +203,12 @@ def compose_3matrix(matrix_a, matrix_b, matrix_c): | |||
| 203 | b_col_start = matrix_a.size(1) | 203 | b_col_start = matrix_a.size(1) |
| 204 | result[b_row_start:b_row_start + matrix_b.size(0), | 204 | result[b_row_start:b_row_start + matrix_b.size(0), |
| 205 | b_col_start:b_col_start + matrix_b.size(1)] = matrix_b | 205 | b_col_start:b_col_start + matrix_b.size(1)] = matrix_b |
| 206 | - | 206 | + |
| 207 | c_row_start = matrix_a.size(0) + matrix_b.size(0) | 207 | c_row_start = matrix_a.size(0) + matrix_b.size(0) |
| 208 | c_col_start = matrix_a.size(1) + matrix_b.size(1) | 208 | c_col_start = matrix_a.size(1) + matrix_b.size(1) |
| 209 | result[c_row_start:c_row_start + matrix_c.size(0), | 209 | result[c_row_start:c_row_start + matrix_c.size(0), |
| 210 | c_col_start:c_col_start + matrix_c.size(1)] = matrix_c | 210 | c_col_start:c_col_start + matrix_c.size(1)] = matrix_c |
| 211 | - | 211 | + |
| 212 | return result.to('npu') | 212 | return result.to('npu') |
| 213 | 213 | ||
| 214 | 214 | ||
| @@ -235,7 +235,7 @@ def apply_rotary_pos_emb(tensor: torch.Tensor, sin: torch.Tensor, cos: torch.Ten | |||
| 235 | return (tensor * cos) + (rotate_half(tensor) * sin) | 235 | return (tensor * cos) + (rotate_half(tensor) * sin) |
| 236 | else: | 236 | else: |
| 237 | raise NotImplementedError("mode error, only support half or interleave") | 237 | raise NotImplementedError("mode error, only support half or interleave") |
| 238 | - | 238 | + |
| 239 | 239 | ||
| 240 | def apply_3drotary_pos_v1(q, k, freqs_cis, mode): | 240 | def apply_3drotary_pos_v1(q, k, freqs_cis, mode): |
| 241 | ''' | 241 | ''' |
| @@ -269,7 +269,7 @@ def apply_3drotary_pos_v2(q, k, freqs_cis, mat1, mat2, mat3): | |||
| 269 | rope_matrix, matrix不合一的实现 | 269 | rope_matrix, matrix不合一的实现 |
| 270 | ''' | 270 | ''' |
| 271 | sincos_h, sincos_w, sincos_t = freqs_cis | 271 | sincos_h, sincos_w, sincos_t = freqs_cis |
| 272 | - | 272 | + |
| 273 | sin_h, cos_h = sincos_h | 273 | sin_h, cos_h = sincos_h |
| 274 | sin_w, cos_w = sincos_w | 274 | sin_w, cos_w = sincos_w |
| 275 | sin_t, cos_t = sincos_t | 275 | sin_t, cos_t = sincos_t |
| @@ -303,7 +303,7 @@ def apply_3drotary_pos_v3(q, k, freqs_cis, mat, debug=None, high_precision=None) | |||
| 303 | 303 | ||
| 304 | sin = torch.cat((sin_h, sin_w, sin_t), dim=-1) | 304 | sin = torch.cat((sin_h, sin_w, sin_t), dim=-1) |
| 305 | cos = torch.cat((cos_h, cos_w, cos_t), dim=-1) | 305 | cos = torch.cat((cos_h, cos_w, cos_t), dim=-1) |
| 306 | - | 306 | + |
| 307 | if high_precision: | 307 | if high_precision: |
| 308 | q = q.float() * cos.float() + (q @ mat).float() * sin.float() | 308 | q = q.float() * cos.float() + (q @ mat).float() * sin.float() |
| 309 | k = k.float() * cos.float() + (k @ mat).float() * sin.float() | 309 | k = k.float() * cos.float() + (k @ mat).float() * sin.float() |
| @@ -311,7 +311,7 @@ def apply_3drotary_pos_v3(q, k, freqs_cis, mat, debug=None, high_precision=None) | |||
| 311 | else: | 311 | else: |
| 312 | q = q * cos + (q @ mat) * sin | 312 | q = q * cos + (q @ mat) * sin |
| 313 | k = k * cos + (k @ mat) * sin | 313 | k = k * cos + (k @ mat) * sin |
| 314 | - | 314 | + |
| 315 | return q, k | 315 | return q, k |
| 316 | 316 | ||
| 317 | 317 | ||
| @@ -324,7 +324,7 @@ def apply_3drotary_pos_v4(q, k, freqs_cis, mode): | |||
| 324 | sin_h, cos_h = sincos_h | 324 | sin_h, cos_h = sincos_h |
| 325 | sin_w, cos_w = sincos_w | 325 | sin_w, cos_w = sincos_w |
| 326 | sin_t, cos_t = sincos_t | 326 | sin_t, cos_t = sincos_t |
| 327 | - | 327 | + |
| 328 | if mode == 'interleave': | 328 | if mode == 'interleave': |
| 329 | sin = torch.cat((sin_h, sin_w, sin_t), dim=-1) | 329 | sin = torch.cat((sin_h, sin_w, sin_t), dim=-1) |
| 330 | cos = torch.cat((cos_h, cos_w, cos_t), dim=-1) | 330 | cos = torch.cat((cos_h, cos_w, cos_t), dim=-1) |
| @@ -386,7 +386,7 @@ class ROPE3D(nn.Module): | |||
| 386 | 386 | ||
| 387 | def forward(self, q, k, freqs_cis, mat): | 387 | def forward(self, q, k, freqs_cis, mat): |
| 388 | return apply_3drotary_pos_v3(q, k, freqs_cis, mat) | 388 | return apply_3drotary_pos_v3(q, k, freqs_cis, mat) |
| 389 | - | 389 | + |
| 390 | 390 | ||
| 391 | def main(): | 391 | def main(): |
| 392 | # init | 392 | # init |
| @@ -422,7 +422,7 @@ def main(): | |||
| 422 | half_mat_44_44_40 = compose_3matrix(half_mat_44, half_mat_44, half_mat_40) | 422 | half_mat_44_44_40 = compose_3matrix(half_mat_44, half_mat_44, half_mat_40) |
| 423 | 423 | ||
| 424 | mode = 'half' # or 'interleave or None | 424 | mode = 'half' # or 'interleave or None |
| 425 | - | 425 | + |
| 426 | experimental_config = torch_npu.profiler._ExperimentalConfig( | 426 | experimental_config = torch_npu.profiler._ExperimentalConfig( |
| 427 | aic_metrics=torch_npu.profiler.AiCMetrics.PipeUtilization, | 427 | aic_metrics=torch_npu.profiler.AiCMetrics.PipeUtilization, |
| 428 | profiler_level=torch_npu.profiler.ProfilerLevel.Level1, | 428 | profiler_level=torch_npu.profiler.ProfilerLevel.Level1, |
| @@ -454,7 +454,7 @@ def main(): | |||
| 454 | with_flops=False, | 454 | with_flops=False, |
| 455 | with_modules=False, | 455 | with_modules=False, |
| 456 | experimental_config=experimental_config) as prof: | 456 | experimental_config=experimental_config) as prof: |
| 457 | - | 457 | + |
| 458 | if mode == 'interleave': | 458 | if mode == 'interleave': |
| 459 | with torch.no_grad(): | 459 | with torch.no_grad(): |
| 460 | for i in range(10): | 460 | for i in range(10): |
| @@ -473,7 +473,7 @@ def main(): | |||
| 473 | with record_function("3d rope v3 op"): | 473 | with record_function("3d rope v3 op"): |
| 474 | outq3, outk3 = op(q, k, freqs_cis_3d, half_mat_44_44_40) | 474 | outq3, outk3 = op(q, k, freqs_cis_3d, half_mat_44_44_40) |
| 475 | torch.cuda.synchronize() | 475 | torch.cuda.synchronize() |
| 476 | - | 476 | + |
| 477 | XXX = torch.randn(3, 3).npu() | 477 | XXX = torch.randn(3, 3).npu() |
| 478 | XXX = torch.pow(XXX, 2) | 478 | XXX = torch.pow(XXX, 2) |
| 479 | with record_function("3d rope v5"): | 479 | with record_function("3d rope v5"): |
| @@ -486,11 +486,11 @@ def main(): | |||
| 486 | with record_function("3d rope v5"): | 486 | with record_function("3d rope v5"): |
| 487 | outq5, outk5 = apply_3drotary_pos_v5(q, k, freqs_cis_3d, half_mat_44_44_40) | 487 | outq5, outk5 = apply_3drotary_pos_v5(q, k, freqs_cis_3d, half_mat_44_44_40) |
| 488 | torch.cuda.synchronize() | 488 | torch.cuda.synchronize() |
| 489 | - | 489 | + |
| 490 | with record_function("3d rope v3"): | 490 | with record_function("3d rope v3"): |
| 491 | outq3, outk3 = apply_3drotary_pos_v3(q, k, freqs_cis_3d, half_mat_44_44_40, debug=None, high_precision=True) | 491 | outq3, outk3 = apply_3drotary_pos_v3(q, k, freqs_cis_3d, half_mat_44_44_40, debug=None, high_precision=True) |
| 492 | torch.cuda.synchronize() | 492 | torch.cuda.synchronize() |
| 493 | - | 493 | + |
| 494 | # 精度验证 | 494 | # 精度验证 |
| 495 | print(f"q={q[0][0][0][:10]}") | 495 | print(f"q={q[0][0][0][:10]}") |
| 496 | print(f"outq3={outq3[0][0][0][:10]}") | 496 | print(f"outq3={outq3[0][0][0][:10]}") |
| @@ -504,7 +504,7 @@ def main(): | |||
| 504 | error = abs_error / (denominator + 1e-8) | 504 | error = abs_error / (denominator + 1e-8) |
| 505 | print(torch.minimum(abs_error, error).max()) | 505 | print(torch.minimum(abs_error, error).max()) |
| 506 | print((torch.minimum(abs_error, error) > 0).sum()) | 506 | print((torch.minimum(abs_error, error) > 0).sum()) |
| 507 | - | 507 | + |
| 508 | if __name__ == '__main__': | 508 | if __name__ == '__main__': |
| 509 | main() | 509 | main() |
| 510 | ``` | 510 | ``` |
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnFFN | 1 | # aclnnFFN |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/ffn/ffn) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/ffn/ffn) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnFFNV2 | 1 | # aclnnFFNV2 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/ffn/ffn) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/ffn/ffn) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnFFNV3 | 1 | # aclnnFFNV3 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/ffn/ffn) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/ffn/ffn) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnFfnWorkerBatching | 1 | # aclnnFfnWorkerBatching |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/ffn/ffn_worker_batching) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/ffn/ffn_worker_batching) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -7,7 +7,7 @@ abbr { | |||
| 7 | } | 7 | } |
| 8 | </style> | 8 | </style> |
| 9 | 9 | ||
| 10 | -[查看源码](https://gitcode.com/cann/ops-transformer/tree/master/gmm/grouped_matmul) | 10 | +[查看源码](https://atomgit.com/cann/ops-transformer/tree/master/gmm/grouped_matmul) |
| 11 | 11 | ||
| 12 | --- | 12 | --- |
| 13 | 13 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnGroupedMatmulWeightNz | 1 | # aclnnGroupedMatmulWeightNz |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/gmm/grouped_matmul) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/gmm/grouped_matmul) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnGroupedMatmulActivationQuantWeightNz | 1 | # aclnnGroupedMatmulActivationQuantWeightNz |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/gmm/grouped_matmul_activation_quant) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/gmm/grouped_matmul_activation_quant) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnGroupedMatmulAdd | 1 | # aclnnGroupedMatmulAdd |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/gmm/grouped_matmul_add) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/gmm/grouped_matmul_add) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | # aclnnGroupedMatmulAddV2 | 1 | # aclnnGroupedMatmulAddV2 |
| 2 | 2 | ||
| 3 | -[📄 查看源码](https://gitcode.com/cann/ops-transformer/tree/master/gmm/grouped_matmul_add) | 3 | +[📄 查看源码](https://atomgit.com/cann/ops-transformer/tree/master/gmm/grouped_matmul_add) |
| 4 | 4 | ||
| 5 | ## 产品支持情况 | 5 | ## 产品支持情况 |
| 6 | 6 | ||