| Files | Last commit | Last update |
|---|---|---|
重构:废弃A5 Cube旧C API接口 Co-authored-by: zhangjiru<zhangjiru1@huawei.com> # message auto-generated for no-merge-commit merge: !5740 merge fix/a5-cube-api-deprecation-review into master 重构:废弃A5 Cube旧C API接口 Created-by: leozjr Commit-by: zhangjiru Merged-by: cann-robot Description: ## 描述 本 PR 面向 A5(dav-3510)Cube C API,废弃旧接口、旧参数重载和同步封装接口。旧声明保留并添加废弃标记,已有代码可继续编译;新增代码请使用下表所列接口。原 _sync 调用统一拆分为常规接口调用和后续 asc_sync 调用。 ### 废弃接口与替代关系 | 废弃接口或重载 | 替代接口/方式 | 具体修改点 | |---|---|---| | asc_enable_fp8() | asc_disable_hif8() | 删除对 asc_enable_fp8() 的新调用;改为调用无参数的 asc_disable_hif8()。 | | asc_set_fp32_mode() | asc_disable_hf32() | 删除对 asc_set_fp32_mode() 的新调用;改为调用无参数的 asc_disable_hf32()。 | | asc_enable_hf32_trans(uint32_t mode) | 无 | 不提供替代接口;删除该接口调用,不能通过其他接口保留原 mode 设置行为。 | | asc_set_l0c2gm_nz2nd(uint64_t nd_num, uint64_t src_nd_stride, uint64_t dst_nd_stride) | asc_set_l0c_copy_nz_para(uint16_t matrix_num, uint16_t src_nz_matrix_stride, uint32_t dst_matrix_stride) | 函数名由 asc_set_l0c2gm_nz2nd 改为 asc_set_l0c_copy_nz_para;第 1、2 个参数从 uint64_t 分别改为 uint16_t,第 3 个参数仍为 32 位但名称由 dst_nd_stride 改为 dst_matrix_stride。 | | asc_set_l0c2gm_channel_para(uint64_t config) | asc_set_l0c_copy_channel_para(uint16_t src_nz_fractal_stride) | 函数名变化;一个打包的 uint64_t config 参数改为一个 uint16_t src_nz_fractal_stride 参数。 | | asc_set_l0c2gm_config(uint64_t relu_pre, uint64_t quant_pre, bool enable_unit_flag) | asc_set_l0c_copy_config(uint64_t relu_pre_addr, uint64_t quant_pre_addr, bool is_clean_unit_flag) | 函数名变化;参数位置和类型不变;参数名依次改为 relu_pre_addr、quant_pre_addr、is_clean_unit_flag。 | | asc_set_l0c2gm_relu_alpha(uint64_t config) | asc_set_l0c_copy_relu_alpha(float scalar_relu_pre_alpha) | 函数名变化;一个 uint64_t config 参数改为一个 float scalar_relu_pre_alpha 参数。 | | asc_set_l0c2gm_lrelu_alpha(half& config)、asc_set_l0c2gm_lrelu_alpha(float& config) | asc_set_l0c_copy_lrelu_alpha(float scalar_relu_pre_alpha) | 两个旧重载均废弃;新接口只接收一个按值传递的 float 参数,不再接收 half& 或 float& 引用参数。 | | asc_set_l12l0_padding_val(uint64_t config) | asc_set_l12l0b_3d_padding(T padding_value) 或 asc_set_l12l0b_3d_padding(uint64_t config) | 旧接口删除时,调用方根据已有数据选择 T padding_value 重载或保留 uint64_t config 形式的新接口;函数名由 asc_set_l12l0_padding_val 改为 asc_set_l12l0b_3d_padding。 | | asc_set_l13d_padding(uint64_t config) | asc_set_gm2l1_padding(T padding_value) 或 asc_set_l12l0a_3d_padding(T padding_value) | 一个旧接口替换为两个接口:GM 到 L1 的调用改为 asc_set_gm2l1_padding,L1 到 L0A 的调用改为 asc_set_l12l0a_3d_padding;两者均接收 T padding_value。 | | 旧 asc_copy_gm2l1_align(..., bool data_select_bit, uint8_t l2_cache_ctl, uint64_t burst_src_stride, uint32_t burst_dst_stride) 及所有 asc_copy_gm2l1_align_sync 重载 | asc_copy_gm2l1_align(..., bool enable_data_select, asc_load_l2_cache_mode l2_cache_mode, uint64_t src_stride, uint32_t dst_stride) + asc_sync | 常规接口的第 7 至第 10 个参数依次由 data_select_bit、l2_cache_ctl、burst_src_stride、burst_dst_stride 改为 enable_data_select、l2_cache_mode、src_stride、dst_stride;其中第 8 个参数从 uint8_t 改为 asc_load_l2_cache_mode。删除 _sync 调用后,在常规接口之后调用 asc_sync。 | | 旧 asc_copy_gm2l1_dn2nz 常规重载及所有 _sync 重载 | 带 asc_load_l2_cache_mode l2_cache_mode 的 asc_copy_gm2l1_dn2nz 常规重载 + asc_sync | 将旧 L2 Cache 控制参数替换为 asc_load_l2_cache_mode l2_cache_mode;删除 _sync 调用后,在常规接口之后调用 asc_sync。 | | 旧 asc_copy_gm2l1_nd2nz 常规重载及所有 _sync 重载 | 带 asc_load_l2_cache_mode l2_cache_mode 的 asc_copy_gm2l1_nd2nz 常规重载 + asc_sync | 将旧 L2 Cache 控制参数替换为 asc_load_l2_cache_mode l2_cache_mode;删除 _sync 调用后,在常规接口之后调用 asc_sync。 | | asc_copy_gm2l1 的 uint8_t pad_func_mode 常规重载及对应 _sync 重载 | asc_copy_gm2l1 的 asc_channel_pad_mode pad_mode 常规重载 + asc_sync | 原 uint8_t pad_func_mode 参数改为 asc_channel_pad_mode pad_mode 参数;删除 _sync 调用后,在常规接口之后调用 asc_sync。 | | asc_copy_gm2l1 的 uint8_t decomp_mode、uint8_t l2_cache_ctl 常规重载及对应 _sync 重载 | 使用 asc_load_l2_cache_mode l2_cache_mode 的 asc_copy_gm2l1 常规重载 + asc_sync | 新接口不再传入 decomp_mode;原 uint8_t l2_cache_ctl 改为 asc_load_l2_cache_mode l2_cache_mode;删除 _sync 调用后,在常规接口之后调用 asc_sync。 | | asc_copy_l12ub_sync | asc_copy_l12ub(..., int8_t sub_blockid) + asc_sync | 常规 asc_copy_l12ub 的 sub_blockid 参数从 bool 改为 int8_t;仅废弃 _sync 重载,常规接口保留。删除 _sync 调用后,在常规接口之后调用 asc_sync。 | ### 本次实现范围 - 在 include/c_api 的公共声明、2201/3510 的实现包装层以及 cube_datamove_composite.h 中,为上表列出的旧重载添加废弃标记。 - 新增 asc_channel_pad_mode 枚举定义和文档。 - 旧接口文档移动到 deprecated_interface 目录;归档文档保留旧函数原型、旧参数、旧约束和旧示例,并在功能说明第一段给出替代接口。 - 活跃接口文档删除已废弃原型,只保留当前重载,并更新参数表和调用示例。 - 更新 API 导航、C API 废弃接口索引及附录废弃接口清单。 - 更新 host-header 检查和 3510 定向测试的调用;删除仅用于旧接口的测试用例。 ### 未废弃的参数化重载 以下旧重载不废弃,本 PR 仅补充或使用新重载: | 接口 | 保留的旧重载 | 新增重载 | |---|---|---| | asc_set_gm2l1_nz_para | asc_set_gm2l1_nz_para(uint64_t config) | asc_set_gm2l1_nz_para(uint16_t matrix_num, uint16_t dst_nz_n_stride, uint16_t dst_nz_c0_stride, uint16_t dst_nz_matrix_stride) | | asc_set_l0c_copy_prequant | asc_set_l0c_copy_prequant(uint64_t config) | asc_set_l0c_copy_prequant(float scale, uint16_t offset, bool is_signed) | | asc_set_l13d_rpt | asc_set_l13d_rpt(asc_load3d_v2_config& config) | asc_set_l13d_rpt(uint16_t repeat_stride, uint8_t repeat_times, asc_l13d_repeat_direction repeat_direction, uint16_t dst_stride_k, uint16_t dst_start_pos_m) | | asc_set_l13d_rpt_b | asc_set_l3d_rpt_b(uint64_t config) | asc_set_l13d_rpt_b(uint16_t repeat_stride, uint8_t repeat_times, asc_l13d_repeat_direction repeat_direction, uint16_t dst_stride_k, uint16_t dst_start_pos_m) | | asc_set_l13d_fmatrix | asc_set_l13d_fmatrix(asc_l13d_fmatrix_config& config) | asc_set_l13d_fmatrix(uint16_t fmatrix_w, uint16_t fmatrix_h, uint8_t pad_left, uint8_t pad_right, uint8_t pad_top, uint8_t pad_bottom) | | asc_set_l13d_fmatrix_b | asc_set_l13d_fmatrix_b(asc_l13d_fmatrix_config& config) | asc_set_l13d_fmatrix_b(uint16_t fmatrix_w, uint16_t fmatrix_h, uint8_t pad_left, uint8_t pad_right, uint8_t pad_top, uint8_t pad_bottom) | ## 关联的Issue 无。 ## 测试 - git diff --check:通过。 - pre-commit:通过,包括 clang-format、codespell、OAT 合规检查和 Markdown 链接检查。 - 同步更新 C API host-header 检查及 3510 定向 UT 覆盖的接口调用。 ## 文档更新 - 归档废弃接口文档,并保留原接口说明、参数、约束和示例。 - 更新活跃接口文档、API 导航、C API 废弃接口索引和附录废弃接口清单。 ## 类型标签 - [ ] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [x] ♻️ refactor: 代码重构 - [x] 🧪 test: 新增或修改测试 - [x] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!5740 | 2 months ago | |
add kernel tla about icache preload flag Co-authored-by: wuyang_hw<wuyang74@hisilicon.com> # message auto-generated for no-merge-commit merge: !6525 merge icache_preload_tlv into master add kernel tla about icache preload flag Created-by: wuyang_hw Commit-by: wuyang_hw Merged-by: cann-robot Description: ## 描述 为 dav-2201 和 dav-3510 的指令缓存预加载接口增加二进制元数据标记,使编译产物能够标识 kernel 是否使用 ICache preload。 - 覆盖 basic_api 的 AscendC::ICachePreLoad 和 C API 的 asc_icache_preload。 - 在接口实现中使用 used 和 section(".ascend.meta") 属性,将 TLV 标记写入设备侧 .o。 - 新增 B_TYPE_ICACHE_PRELOAD_FLAG,类型值为 7,数据长度为 4 字节。 - 数据字段由 uint16_t preload 标记和 uint16_t reserved 组成,分别初始化为 1、0,保留后续扩展空间。 ## 关联的Issue NA ## 测试 - 使用 readelf 检查设备侧 .o:开启 preload 时存在 type=7、len=4、flag=1、reserved=0 的 TLV;关闭时不存在该标记。 ## 文档更新 NA ## 类型标签 - [ ] 🐛 fix: Bug 修复 - [x] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6525 | 1 month ago | |
add kernel tla about icache preload flag Co-authored-by: wuyang_hw<wuyang74@hisilicon.com> # message auto-generated for no-merge-commit merge: !6525 merge icache_preload_tlv into master add kernel tla about icache preload flag Created-by: wuyang_hw Commit-by: wuyang_hw Merged-by: cann-robot Description: ## 描述 为 dav-2201 和 dav-3510 的指令缓存预加载接口增加二进制元数据标记,使编译产物能够标识 kernel 是否使用 ICache preload。 - 覆盖 basic_api 的 AscendC::ICachePreLoad 和 C API 的 asc_icache_preload。 - 在接口实现中使用 used 和 section(".ascend.meta") 属性,将 TLV 标记写入设备侧 .o。 - 新增 B_TYPE_ICACHE_PRELOAD_FLAG,类型值为 7,数据长度为 4 字节。 - 数据字段由 uint16_t preload 标记和 uint16_t reserved 组成,分别初始化为 1、0,保留后续扩展空间。 ## 关联的Issue NA ## 测试 - 使用 readelf 检查设备侧 .o:开启 preload 时存在 type=7、len=4、flag=1、reserved=0 的 TLV;关闭时不存在该标记。 ## 文档更新 NA ## 类型标签 - [ ] 🐛 fix: Bug 修复 - [x] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6525 | 1 month ago | |
c_api_cube_9201 Co-authored-by: ChenCangtao<chencangtao@huawei.com> Co-authored-by: xumengxuan<xumengxuan2@huawei.com> Co-authored-by: wuzhengzhen<wuzhengzhen@huawei.com> # message auto-generated for no-merge-commit merge: !6436 merge c_api_cube_combine into master c_api_cube_9201 Created-by: xumengxuan Commit-by: wuzhengzhen;ChenCangtao;xumengxuan Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 增加c api 9201架构 cube datamove和cube compute的接口和实现 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #xxx--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 fix: Bug 修复 - [x] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6436 | 1 month ago | |
删除重复定义接口 Co-authored-by: yhf0922<yuhaifei1@huawei.com> # message auto-generated for no-merge-commit merge: !6495 merge cce_stub into master 删除重复定义接口 Created-by: yhf0922 Commit-by: yhf0922 Merged-by: cann-robot Description: ## 描述 删除重复定义接口 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #xxx--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6495 | 1 month ago | |
C_API支持9201UT Co-authored-by: zhangfeifan0709<zhangfeifan7@huawei.com> # message auto-generated for no-merge-commit merge: !5733 merge 9201_ut into master C_API支持9201UT Created-by: zhangfeifan0709 Commit-by: zhangfeifan0709 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 支持9201UT ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #xxx--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 fix: Bug 修复 - [x] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!5733 | 2 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 2 months ago |