| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
重构:废弃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 | 28 天前 | |
feat: 补充2201 Cube C API接口 Co-authored-by: zhangjiru<zhangjiru1@huawei.com> # message auto-generated for no-merge-commit merge: !5736 merge feat/a2a3-matrix-load-api-upstream into master feat: 补充2201 Cube C API接口 Created-by: leozjr Commit-by: zhangjiru Merged-by: cann-robot Description: ## 描述 补齐 Atlas A2 训练/推理系列产品支持的 2201 Cube C API 实现。 - 新增 asc_disable_hf32、asc_set_l0c_copy_config 和 asc_set_l0c_copy_lrelu_alpha(float)。 - 为 asc_set_l13d_rpt、asc_set_l13d_fmatrix、asc_set_l13d_fmatrix_b 补充参数化 overload。 - 新增 asc_set_gm2l1_padding 和 asc_set_l12l0a_3d_padding 的 2201 实现及类型化 overload。 - 改名接口使用独立的 *_impl.h 文件并由对应架构聚合头显式包含。 - asc_set_l0c_copy_lrelu_alpha 仅提供 float 形式,不迁移旧 half& 形式。 ## 关联的Issue ## 测试 - cmake --build build --target ascendc_ut_c_api_ascend910B1_AIC -j8 - 354 个 2201 AIC C API 测试通过。 - 新增接口聚焦 UT:10 个测试、7 个测试套件全部通过。 - git diff --check 通过。 ## 文档更新 无。 ## 类型标签 - [ ] 🐛 fix: Bug 修复 - [x] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [x] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!5736 | 30 天前 | |
feat(c_api): add missing return-value conversion overloads Co-authored-by: Joey_guo<guojianyang@huawei.com> # message auto-generated for no-merge-commit merge: !6186 merge b4doc into master feat(c_api): add missing return-value conversion overloads Created-by: Joey_guo Commit-by: Joey_guo Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 新增带返回值的部分类型转换c api接口,并对应补齐文档。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #xxx--> NA ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 自验证通过 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 更新了asc_half2int4x2_t.md等文档 ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 fix: Bug 修复 - [x] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [x] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6186 | 24 天前 | |
fix: remove duplicate c api headers Co-authored-by: flyingXLB<2108184158@qq.com> # message auto-generated for no-merge-commit merge: !6012 merge fix/master-c-api-duplicate-headers into master fix: remove duplicate c api headers Created-by: flyingXLB Commit-by: flyingXLB Merged-by: cann-robot Description: ## 描述 该 PR 旨在移除 C API 中重复的(转发型/已废弃)头文件。被删除的 include/c_api/sys_var/sys_var.h、include/c_api/utils/enum.h、include/c_api/utils/union.h 均只是带有 ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS 宏保护、内部 #include 转发到标准位置(c_api/utils/sys_var.h、c_api/defs/enum.h、c_api/defs/union.h)的旧入口,删除后统一收敛到规范头文件路径;同时同步修正测试桩中对旧头文件的引用,避免删除后编译失败。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #xxx--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6012 | 27 天前 | |
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 | 30 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 28 天前 | ||
| 30 天前 | ||
| 24 天前 | ||
| 27 天前 | ||
| 30 天前 |