| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(pre-commit): 全仓代码规范整改——公共 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13532 merge common into master fix(pre-commit): 全仓代码规范整改——公共 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5939 ## 描述 全仓代码规范整改系列——公共目录(common/、examples/、tests/、scripts/ 等)。基于仓库 pre-commit 门禁对存量代码做一次性规范收敛: - clang-format 按 .clang-format 统一格式(列宽 120、指针左对齐等),ruff 格式化 Python - 行尾空白、文件末尾换行修复,少量文档笔误修正 - 规模:280 个文件,+4708/-5785 行,纯格式化改动语义等价,无逻辑变更 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/5939(全仓整改总跟踪) ## 测试 - pre-commit 全部钩子本地通过 - CI 流水线(compile/UT)验证 See merge request: cann/ops-transformer!13532 | 1 个月前 | |
fix(pre-commit): 全仓代码规范整改——公共 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13532 merge common into master fix(pre-commit): 全仓代码规范整改——公共 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5939 ## 描述 全仓代码规范整改系列——公共目录(common/、examples/、tests/、scripts/ 等)。基于仓库 pre-commit 门禁对存量代码做一次性规范收敛: - clang-format 按 .clang-format 统一格式(列宽 120、指针左对齐等),ruff 格式化 Python - 行尾空白、文件末尾换行修复,少量文档笔误修正 - 规模:280 个文件,+4708/-5785 行,纯格式化改动语义等价,无逻辑变更 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/5939(全仓整改总跟踪) ## 测试 - pre-commit 全部钩子本地通过 - CI 流水线(compile/UT)验证 See merge request: cann/ops-transformer!13532 | 1 个月前 | |
fix(pre-commit): 全仓代码规范整改——公共 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13532 merge common into master fix(pre-commit): 全仓代码规范整改——公共 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5939 ## 描述 全仓代码规范整改系列——公共目录(common/、examples/、tests/、scripts/ 等)。基于仓库 pre-commit 门禁对存量代码做一次性规范收敛: - clang-format 按 .clang-format 统一格式(列宽 120、指针左对齐等),ruff 格式化 Python - 行尾空白、文件末尾换行修复,少量文档笔误修正 - 规模:280 个文件,+4708/-5785 行,纯格式化改动语义等价,无逻辑变更 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/5939(全仓整改总跟踪) ## 测试 - pre-commit 全部钩子本地通过 - CI 流水线(compile/UT)验证 See merge request: cann/ops-transformer!13532 | 1 个月前 | |
fix(pre-commit): 全仓代码规范整改——公共 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13532 merge common into master fix(pre-commit): 全仓代码规范整改——公共 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5939 ## 描述 全仓代码规范整改系列——公共目录(common/、examples/、tests/、scripts/ 等)。基于仓库 pre-commit 门禁对存量代码做一次性规范收敛: - clang-format 按 .clang-format 统一格式(列宽 120、指针左对齐等),ruff 格式化 Python - 行尾空白、文件末尾换行修复,少量文档笔误修正 - 规模:280 个文件,+4708/-5785 行,纯格式化改动语义等价,无逻辑变更 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/5939(全仓整改总跟踪) ## 测试 - pre-commit 全部钩子本地通过 - CI 流水线(compile/UT)验证 See merge request: cann/ops-transformer!13532 | 1 个月前 | |
fix(pre-commit): 全仓代码规范整改——公共 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13532 merge common into master fix(pre-commit): 全仓代码规范整改——公共 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5939 ## 描述 全仓代码规范整改系列——公共目录(common/、examples/、tests/、scripts/ 等)。基于仓库 pre-commit 门禁对存量代码做一次性规范收敛: - clang-format 按 .clang-format 统一格式(列宽 120、指针左对齐等),ruff 格式化 Python - 行尾空白、文件末尾换行修复,少量文档笔误修正 - 规模:280 个文件,+4708/-5785 行,纯格式化改动语义等价,无逻辑变更 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/5939(全仓整改总跟踪) ## 测试 - pre-commit 全部钩子本地通过 - CI 流水线(compile/UT)验证 See merge request: cann/ops-transformer!13532 | 1 个月前 | |
fix(pre-commit): 全仓代码规范整改——公共 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13532 merge common into master fix(pre-commit): 全仓代码规范整改——公共 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5939 ## 描述 全仓代码规范整改系列——公共目录(common/、examples/、tests/、scripts/ 等)。基于仓库 pre-commit 门禁对存量代码做一次性规范收敛: - clang-format 按 .clang-format 统一格式(列宽 120、指针左对齐等),ruff 格式化 Python - 行尾空白、文件末尾换行修复,少量文档笔误修正 - 规模:280 个文件,+4708/-5785 行,纯格式化改动语义等价,无逻辑变更 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/5939(全仓整改总跟踪) ## 测试 - pre-commit 全部钩子本地通过 - CI 流水线(compile/UT)验证 See merge request: cann/ops-transformer!13532 | 1 个月前 | |
Pre-Commit 规范整改 — example experimental Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !1465 merge fix into master Pre-Commit 规范整改 — example experimental Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: pre-commit是一个Git Hooks框架,用于在 git commit时自动运行代码检查和格式化工具。: | Hook | 功能 | 说明 | |------|------|------| | **clang-format** | C/C++ 代码格式化 | 自动格式化代码,保持风格一致 | | **OAT Check** | 开源合规检查 | 检测许可证头、禁止二进制文件提交 | 本PR对于example和experiment文件进行了pre-commit检查 See merge request: cann/ops-transformer!1465 | 3 个月前 | |
docs: 修正AddExample快速启动命令执行目录 Co-authored-by: zzzzzzyf_<zhouyunfei10@huawei.com> # message auto-generated for no-merge-commit merge: !14181 merge docs/issue-6270-20261020 into master docs: 修正AddExample快速启动命令执行目录 Created-by: zzzzzzyf_ Commit-by: zzzzzzyf_ Merged-by: cann-robot Description: ## 描述 AddExample 快速启动示例使用了不存在的 example/add_example 目录;即使改为 examples/add_example,该目录下也没有后续命令调用的 build.sh。 删除错误的 cd 命令,改为提示在 ops-transformer 仓库根目录执行后续命令,使执行目录与根目录下的 build.sh 一致。此次仅修改 README 中的一行说明。 ## 关联的Issue Fixes #6270 https://gitcode.com/cann/ops-transformer/issues/6270 ## 测试 - 已核对 build.sh 位于仓库根目录,examples/add_example 下没有该脚本。 - 已检查提交差异,仅替换一行目录说明,构建和运行命令保持不变。 - git diff --check 检查通过。 - 本次为文档修改,未执行编译或 NPU 运行验证。 ## 文档更新 更新 examples/add_example/README.md 中的快速启动说明。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug修复 - [ ] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [x] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!14181 | 25 天前 | |
docs: add English translations for markdown files Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !15306 merge docs/add-english-translations into master docs: add English translations for markdown files Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## 描述 新增仓库Markdown文档英文译稿(第一批,共42个被其他译稿引用的文件):根README_en.md、CONTRIBUTING_en.md、SECURITY_en.md;各算子设计文档英文版(ChunkKdaFwd/FA/FAG/MlaProlog/FFN/AllGatherAdd等design文档)及ascendir系列接口文档;examples系列说明(含fast_kernel_launch_example、mc2/all_gather_add、flash_attn L0_minimal等);以及gmm/grouped_matmul_activation、attention/nsa_compress_attention_infer、attention/nsa_compress_with_cache、attention/recurrent_kda、ffn/ffn、mhc/mhc_sinkhorn、posembedding/partial_rotary_mul_quant共7个算子的README译稿与相关测试/示例说明。 本批为后续批量英文文档提交做前置:本批文件合入master后,其余281篇译稿中的仓内链接(均指向master已有文件或本批文件)即可生效,避免链接失效拦截。7个算子相关文档已全部集中于本批提交,未拆散。 ## 关联的Issue 无 ## 测试 文档类变更,无需算子测试;已通过链接有效性校验(第一批内全部相对链接仅指向master已有文件或本批新增文件),并完成逐篇翻译规范自查与语义校对(含支持状态表、限定词、术语、数值符号核对)。 ## 文档更新 新增41个英文译稿文件,重命名1个中文设计文档(ffn/ffn/docs/FFN算子设计介绍.md → FFN_design.md),不修改其他任何现有文件。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-transformer!15306 | 9 天前 |
AddExample
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Atlas A3系列产品 | √ |
| Atlas A2系列产品 | √ |
功能说明
-
算子功能:完成加法计算。
-
计算公式:
y=x1+x2y = x1 + x2 y=x1+x2
参数说明
| 参数名 | 输入/输出/属性 | 描述 | 数据类型 | 数据格式 |
|---|---|---|---|---|
| x1 | 输入 | 待进行add_example计算的入参,公式中的x1。 | FLOAT、INT32 | ND |
| x2 | 输入 | 待进行add_example计算的入参,公式中的x2。 | FLOAT、INT32 | ND |
| y | 输出 | 待进行add_example计算的出参,公式中的y。 | FLOAT、INT32 | ND |
约束说明
无
调用说明
| 调用方式 | 调用样例 | 说明 |
|---|---|---|
| aclnn调用 | test_aclnn_add_example | 快速调用示例如下文所示,仅供参考,详细算子编译运行方法参见算子调用。 |
## 快速启动
# 请在 ops-transformer 仓库根目录执行以下命令
# 假设已准备好环境变量
bash build.sh --soc=${soc_version} --ops=add_example
bash build.sh --run_example add_example eager cus