| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
修复issue 1409和issue 1472 Co-authored-by: cgcaof<caochenguang1@h-partners.com> # message auto-generated for no-merge-commit merge: !5100 merge master into master 修复issue 1409和issue 1472 Created-by: cgcaof Commit-by: cgcaof Merged-by: cann-robot Description: ## 描述 修复issue 1409,文档链接指向错误 修复issue 1472,链接名称错误 ## 关联的Issue https://gitcode.com/cann/asc-devkit/issues/1409 https://gitcode.com/cann/asc-devkit/issues/1472 ## 测试 不涉及 ## 文档更新 docs/zh/guide/算子实践参考/SIMD算子实现/融合算子编程/CV融合/算子实现.md ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!5100 | 1 个月前 | |
style: ruff 配置行宽 120 并关闭 magic trailing comma Co-authored-by: zhangyujia77<zhangyujia37@huawei.com> # message auto-generated for no-merge-commit merge: !6286 merge style/ruff-line-length-120 into master style: ruff 配置行宽 120 并关闭 magic trailing comma Created-by: zhangyujia77 Commit-by: zhangyujia77 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ruff.toml 新增两项配置并据此重排全仓 Python 代码: line-length = 120 行宽从默认 88 放宽到 120 [format] skip-magic-trailing-comma = true 忽略末尾逗号的强制展开语义 ### 为什么改 line-length ruff 的 line-length 此前**从未在仓库任何地方配置过** —— ruff.toml 只设了target-version,全仓搜 line-length 零命中,pre-commit 的 ruff hook 也没传参。 所以生效值 88 是 ruff 内置默认(沿用 Black 的约定),**不是评估过的技术决策**: $ ruff check --show-settings Settings path: ".../asc-devkit/ruff.toml" linter.line_length = 88 120 有三层依据: 1. **本仓 C++ 侧已定 120** —— .clang-format: ColumnLimit: 120。同一仓库 C++ 120、Python 88 本身不一致。 2. **CANN 生态其余 Python 仓统一为 120** —— pyasc、pypto、pto-isa、ops-test-kit、vllm-ascend(ruff),torch_npu、pytorch(flake8)。asc-devkit 是其中唯一没配的。 3. **本仓 Python 历史上事实遵守 120** —— ruff-format 落地前,非空行 P99.5 = 119,99.82% 的行 ≤ 120;超 120 的 38 行基本是嵌在 Python 里的 C++ 模板与宏定义。 88 列会把多参数调用强制拆成逐参数一行,一条语句常常变 3-5 行: python # 前(1 行) raise RuntimeError("Length of ASCENDC_TPL_UINT_{} {} is too short.".format(self.macro_type, self.name)) # 后(5 行) raise RuntimeError( "Length of ASCENDC_TPL_UINT_{} {} is too short.".format( self.macro_type, self.name ) ) ### 为什么关 magic trailing comma 末尾逗号会让 ruff-format 强制保持展开,即使该行放得下。统计范围内现存 886 处此类逗号,**绝大多数是 88 列时期 ruff 自己折行时补上的,并非作者意图** ——换到 120 列后这些调用本可收拢,却因那个自动留下的逗号继续保持展开。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #xxx--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [x] 🧹 chore: 代码格式修改 See merge request: cann/asc-devkit!6286 | 1 天前 | |
fix example readme warning Co-authored-by: changxianyu<changxianyu@hisilicon.com> # message auto-generated for no-merge-commit merge: !3333 merge asc_example into master fix example readme warning Created-by: changxianyu Commit-by: changxianyu Merged-by: cann-robot Description: ## 描述 修正样例 README 中的接口名称、核函数名、参数说明、编译选项、术语表述和链接指向。 清理样例源码中的未使用变量和不可达代码,补齐异常路径资源释放。 修正数据搬运、矩阵计算、Reg 编程、工具能力等样例中与源码不一致的描述。 对部分场景参数、shape、padding、量化模式、仿真/调试说明进行一致性校准。 确保仅处理表格中已接受的待处理项,未修改未接受条目。 ## 关联的Issue ## 测试 本地验证功能/精度正常 ## 文档更新 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!3333 | 3 个月前 | |
【样例】优化01_simd_cpp_api下目录结构 Co-authored-by: wx369<wangxu243@huawei.com> # message auto-generated for no-merge-commit merge: !2877 merge update into master 【样例】优化01_simd_cpp_api下目录结构 Created-by: wx369 Commit-by: wx369 Merged-by: cann-robot Description: ## 描述 优化01_simd_cpp_api下目录结构 ## 关联的Issue 关联Issue [#896](https://gitcode.com/cann/asc-devkit/issues/896) ## 测试 通过了相关样例的编译运行 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [x] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!2877 | 3 个月前 |
Add样例介绍
概述
基于Ascend C的Add向量加法样例,介绍静态Tensor和TQue/TPipe两种实现方式。
样例列表
| 目录名称 | 功能描述 | 支持的产品 |
|---|---|---|
| add | 基于静态Tensor编程实现Add向量加法 | Ascend 950PR/Ascend 950DT Atlas A3 训练系列产品/Atlas A3 推理系列产品 Atlas A2 训练系列产品/Atlas A2 推理系列产品 |
| add_tpipe_tque | 基于TQue和TPipe编程实现Add向量加法 | Ascend 950PR/Ascend 950DT Atlas A3 训练系列产品/Atlas A3 推理系列产品 Atlas A2 训练系列产品/Atlas A2 推理系列产品 |