已合并
refactor: 按公开接口头平铺 C API 实现并简化调用层 #5773
refactor: 按公开接口头平铺 C API 实现并简化调用层 #5773
已合并
lihuaichao创建于 20 天前
共 760 个文件变更+51500-99320
@@ -111,7 +111,7 @@ Mock 函数签名必须与底层指令完全一致,并在 stub 中断言所有
111读取顺序:111读取顺序:
112 112 
1131. 目标 API 头文件:`include/c_api/**` 中的函数签名、重载和结构体声明。1131. 目标 API 头文件:`include/c_api/**` 中的函数签名、重载和结构体声明。
114-2. 目标架构 impl:`impl/c_api/**`、`impl/c_api/instr_impl/**` 中的真实字段赋值、默认值、条件编译和指令调用。114+2. 目标架构 impl:`impl/c_api/**`、`impl/c_api/{memory_base_impl,reg_base_impl}/**` 中的真实字段赋值、默认值、条件编译和指令调用。
1153. 底层 stub:`tests/api/c_api/stub/cce_stub.h` 中的 mock/stub 函数签名。1153. 底层 stub:`tests/api/c_api/stub/cce_stub.h` 中的 mock/stub 函数签名。
1164. 已有同架构同类 UT:确认字段初始化、mockcpp 写法和断言习惯。1164. 已有同架构同类 UT:确认字段初始化、mockcpp 写法和断言习惯。
117 117 
@@ -17,8 +17,8 @@
17| 高阶 API 参数/合法性检查 | `include/adv_api/` | `impl/adv_api/detail/api_check/kernel_check/` | `tests/api/adv_api/api_check/` | 属于高阶 API 的检查分支,目录结构与功能 UT 并行。 |17| 高阶 API 参数/合法性检查 | `include/adv_api/` | `impl/adv_api/detail/api_check/kernel_check/` | `tests/api/adv_api/api_check/` | 属于高阶 API 的检查分支,目录结构与功能 UT 并行。 |
18| membase 基础 API - AIV/AIC/common/framework (`aiv`, `aic`) | `include/basic_api/`, `include/basic_api/core_mng/`, `include/basic_api/op_frame/` | `impl/basic_api/dav_*`, `impl/basic_api/utils/` | `tests/api/basic_api/ascendc_case_*` | 排除 `include/basic_api/reg_compute/`。按芯片、AIV/AIC/framework/basic 子目录拆分。 |18| membase 基础 API - AIV/AIC/common/framework (`aiv`, `aic`) | `include/basic_api/`, `include/basic_api/core_mng/`, `include/basic_api/op_frame/` | `impl/basic_api/dav_*`, `impl/basic_api/utils/` | `tests/api/basic_api/ascendc_case_*` | 排除 `include/basic_api/reg_compute/`。按芯片、AIV/AIC/framework/basic 子目录拆分。 |
19| regbase 基础 API (`reg`) | `include/basic_api/reg_compute/` | `impl/basic_api/reg_compute/` | `tests/api/reg_compute_api/` | 当前有 `ascendc_case_ascend950pr_9599_reg_compute/`。 |19| regbase 基础 API (`reg`) | `include/basic_api/reg_compute/` | `impl/basic_api/reg_compute/` | `tests/api/reg_compute_api/` | 当前有 `ascendc_case_ascend950pr_9599_reg_compute/`。 |
20-| C API (`c_api`) | `include/c_api/` | `impl/c_api/instr_impl/npu_arch_2201/`, `impl/c_api/instr_impl/npu_arch_3510/` | `tests/api/c_api/npu_arch_2201/`, `tests/api/c_api/npu_arch_3510/` | AIC/AIV 由 CMake 按产品目标拆分;`tests/api/c_api/stub/` 为支撑目录。 |20+| C API (`c_api`) | `include/c_api/` | `impl/c_api/memory_base_impl/`, `impl/c_api/reg_base_impl/` | `tests/api/c_api/npu_arch_2201/`, `tests/api/c_api/npu_arch_3510/` | AIC/AIV 由 CMake 按产品目标拆分;`tests/api/c_api/stub/` 为支撑目录。 |
21-| C API register 子类 | `include/c_api/reg_compute/` | `impl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/reg_load/`, `impl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/reg_store/`, 以及相关 `vector_compute_impl/*_reg_impl.h` | `tests/api/c_api/npu_arch_3510/vector_datamove/`, `tests/api/c_api/npu_arch_3510/vector_compute/`;2201 现有 reg 相关用例在 `tests/api/c_api/npu_arch_2201/vector_compute/` | 这是 C API 内部 register 风格接口,不等同于 `tests/api/reg_compute_api/`。 |21+| C API register 子类 | `include/c_api/reg_compute/` | `impl/c_api/reg_base_impl/reg_arith_intf_impl.h`, `impl/c_api/reg_base_impl/npu_arch_3510/reg_convert_intf_impl.h`, 现用接口与废弃接口按重载分别归属 | `tests/api/c_api/npu_arch_3510/vector_datamove/`, `tests/api/c_api/npu_arch_3510/vector_compute/`;2201 现有 reg 相关用例在 `tests/api/c_api/npu_arch_2201/vector_compute/` | 这是 C API 内部 register 风格接口,不等同于 `tests/api/reg_compute_api/`。 |
22| SIMT API (`simt`) | `include/simt_api/`, `include/simt_api/cpp/` | `impl/simt_api/cpp/dav_3510/` | `tests/api/simt_api/ascendc_case_ascend950pr_9599_simt/`, `tests/api/simt_api/math*` | `common_simt/` 是共用测试支撑目录。默认 CMake 初始化产品为 `ascend950pr_9599`。 |22| SIMT API (`simt`) | `include/simt_api/`, `include/simt_api/cpp/` | `impl/simt_api/cpp/dav_3510/` | `tests/api/simt_api/ascendc_case_ascend950pr_9599_simt/`, `tests/api/simt_api/math*` | `common_simt/` 是共用测试支撑目录。默认 CMake 初始化产品为 `ascend950pr_9599`。 |
23| 工具类 API (`utils`) | `include/utils/` | `impl/utils/` | `tests/api/utils/` | 包含 context、debug、std、tiling、stub 等子类;`tests/api/utils/std/` 和 `tests/api/utils/tiling/` 有独立 CMake。 |23| 工具类 API (`utils`) | `include/utils/` | `impl/utils/` | `tests/api/utils/` | 包含 context、debug、std、tiling、stub 等子类;`tests/api/utils/std/` 和 `tests/api/utils/tiling/` 有独立 CMake。 |
24| AICPU API | `include/aicpu_api/` | `impl/aicpu_api/` | `tests/api/aicpu_api/` | 独立于当前 `asc-api-ut-gen` 默认 API 类型。 |24| AICPU API | `include/aicpu_api/` | `impl/aicpu_api/` | `tests/api/aicpu_api/` | 独立于当前 `asc-api-ut-gen` 默认 API 类型。 |
@@ -66,20 +66,22 @@
66 66 
67## C API 子目录映射67## C API 子目录映射
68 68 
69+实现目录保持扁平,每个实际声明接口的公开头 `<header>.h` 对应 `<header>_intf_impl.h`。下表列出各类代表文件;atomic 另有 `scalar_atomic_intf_impl.h`,scalar_compute 按 bit/convert/load/store 拆分,vector_compute 按各公开头拆分。公共内部辅助代码位于各架构组的 `utils_impl.h`;聚合头、纯类型头和无独立函数实现的宏别名不生成空实现头。
70+ 
69| C API 子类 | 声明目录 | 2201 实现/UT | 3510 实现/UT |71| C API 子类 | 声明目录 | 2201 实现/UT | 3510 实现/UT |
70|-----------|----------|--------------|--------------|72|-----------|----------|--------------|--------------|
71-| atomic | `include/c_api/atomic/` | `impl/c_api/instr_impl/npu_arch_2201/atomic_impl/`; 当前实际 UT 目录为 `tests/api/c_api/npu_arch_2201/simd_atomic/`,但 CMake glob 写的是 `npu_arch_2201/atomic/*.cpp`,新增前需核对 | `impl/c_api/instr_impl/npu_arch_3510/atomic_impl/`; `tests/api/c_api/npu_arch_3510/atomic/` |73+| atomic | `include/c_api/atomic/` | `impl/c_api/memory_base_impl/datamove_atomic_intf_impl.h`; 当前实际 UT 目录为 `tests/api/c_api/npu_arch_2201/simd_atomic/`,但 CMake glob 写的是 `npu_arch_2201/atomic/*.cpp`,新增前需核对 | `impl/c_api/reg_base_impl/datamove_atomic_intf_impl.h`; `tests/api/c_api/npu_arch_3510/atomic/` |
72-| cache_ctrl | `include/c_api/cache_ctrl/` | `impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/`; `tests/api/c_api/npu_arch_2201/cache_ctrl/` | `impl/c_api/instr_impl/npu_arch_3510/cache_ctrl_impl/`; `tests/api/c_api/npu_arch_3510/cache_ctrl/` |74+| cache_ctrl | `include/c_api/cache_ctrl/` | `impl/c_api/memory_base_impl/cache_ctrl_intf_impl.h`; `tests/api/c_api/npu_arch_2201/cache_ctrl/` | `impl/c_api/reg_base_impl/cache_ctrl_intf_impl.h`; `tests/api/c_api/npu_arch_3510/cache_ctrl/` |
73-| cube_compute | `include/c_api/cube_compute/` | `impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/`; `tests/api/c_api/npu_arch_2201/cube_compute/` | `impl/c_api/instr_impl/npu_arch_3510/cube_compute_impl/`; `tests/api/c_api/npu_arch_3510/cube_compute/` |75+| cube_compute | `include/c_api/cube_compute/` | `impl/c_api/memory_base_impl/cube_compute_intf_impl.h`; `tests/api/c_api/npu_arch_2201/cube_compute/` | `impl/c_api/reg_base_impl/cube_compute_intf_impl.h`; `tests/api/c_api/npu_arch_3510/cube_compute/` |
74-| cube_datamove | `include/c_api/cube_datamove/` | `impl/c_api/instr_impl/npu_arch_2201/cube_datamove_impl/`; `tests/api/c_api/npu_arch_2201/cube_datamove/` | `impl/c_api/instr_impl/npu_arch_3510/cube_datamove_impl/`; `tests/api/c_api/npu_arch_3510/cube_datamove/` |76+| cube_datamove | `include/c_api/cube_datamove/` | `impl/c_api/memory_base_impl/cube_datamove_intf_impl.h`; `tests/api/c_api/npu_arch_2201/cube_datamove/` | `impl/c_api/reg_base_impl/cube_datamove_intf_impl.h`; `tests/api/c_api/npu_arch_3510/cube_datamove/` |
75-| misc | `include/c_api/misc/` | `impl/c_api/instr_impl/npu_arch_2201/misc_impl/`; 当前扫描未发现 `tests/api/c_api/npu_arch_2201/misc/` | `impl/c_api/instr_impl/npu_arch_3510/misc_impl/`; `tests/api/c_api/npu_arch_3510/misc/` |77+| misc | `include/c_api/misc/` | `impl/c_api/memory_base_impl/sys_init_intf_impl.h`; 当前扫描未发现 `tests/api/c_api/npu_arch_2201/misc/` | `impl/c_api/reg_base_impl/sys_init_intf_impl.h`; `tests/api/c_api/npu_arch_3510/misc/` |
76-| scalar_compute | `include/c_api/scalar_compute/` | `impl/c_api/instr_impl/npu_arch_2201/scalar_compute_impl/`; `tests/api/c_api/npu_arch_2201/scalar_compute/` | `impl/c_api/instr_impl/npu_arch_3510/scalar_compute_impl/`; `tests/api/c_api/npu_arch_3510/scalar_compute/` |78+| scalar_compute | `include/c_api/scalar_compute/` | `impl/c_api/memory_base_impl/scalar_bit_intf_impl.h`; `tests/api/c_api/npu_arch_2201/scalar_compute/` | `impl/c_api/reg_base_impl/scalar_bit_intf_impl.h`; `tests/api/c_api/npu_arch_3510/scalar_compute/` |
77-| sync | `include/c_api/sync/` | `impl/c_api/instr_impl/npu_arch_2201/sync_impl/`; `tests/api/c_api/npu_arch_2201/sync/` | `impl/c_api/instr_impl/npu_arch_3510/sync_impl/`; `tests/api/c_api/npu_arch_3510/sync/` |79+| sync | `include/c_api/sync/` | `impl/c_api/memory_base_impl/sync_intf_impl.h`; `tests/api/c_api/npu_arch_2201/sync/` | `impl/c_api/reg_base_impl/sync_intf_impl.h`; `tests/api/c_api/npu_arch_3510/sync/` |
78-| sys_var | `include/c_api/sys_var/` | `impl/c_api/instr_impl/npu_arch_2201/sys_var_impl/`; `tests/api/c_api/npu_arch_2201/sys_var/` | `impl/c_api/instr_impl/npu_arch_3510/sys_var_impl/`; `tests/api/c_api/npu_arch_3510/sys_var/` |80+| sys_var | `include/c_api/utils/sys_var.h` | `impl/c_api/memory_base_impl/sys_var_intf_impl.h`; `tests/api/c_api/npu_arch_2201/sys_var/` | `impl/c_api/reg_base_impl/sys_var_intf_impl.h`; `tests/api/c_api/npu_arch_3510/sys_var/` |
79-| utils | `include/c_api/utils/` | `impl/c_api/instr_impl/npu_arch_2201/utils_impl/`; `tests/api/c_api/npu_arch_2201/utils/` | `impl/c_api/instr_impl/npu_arch_3510/utils_impl/`; `tests/api/c_api/npu_arch_3510/utils/` |81+| utils | `include/c_api/utils/` | `impl/c_api/memory_base_impl/sys_var_intf_impl.h`; `tests/api/c_api/npu_arch_2201/utils/` | `impl/c_api/reg_base_impl/sys_var_intf_impl.h`; `tests/api/c_api/npu_arch_3510/utils/` |
80-| vector_compute | `include/c_api/vector_compute/` | `impl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/`; `tests/api/c_api/npu_arch_2201/vector_compute/` | `impl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/`; `tests/api/c_api/npu_arch_3510/vector_compute/` |82+| vector_compute | `include/c_api/vector_compute/` | `impl/c_api/memory_base_impl/vector_arith_intf_impl.h`; `tests/api/c_api/npu_arch_2201/vector_compute/` | `impl/c_api/reg_base_impl/vector_sort_intf_impl.h`; `tests/api/c_api/npu_arch_3510/vector_compute/` |
81-| vector_datamove | `include/c_api/vector_datamove/` | `impl/c_api/instr_impl/npu_arch_2201/vector_datamove_impl/`; `tests/api/c_api/npu_arch_2201/vector_datamove/` | `impl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/`; `tests/api/c_api/npu_arch_3510/vector_datamove/` |83+| vector_datamove | `include/c_api/vector_datamove/` | `impl/c_api/memory_base_impl/vector_datamove_intf_impl.h`; `tests/api/c_api/npu_arch_2201/vector_datamove/` | `impl/c_api/reg_base_impl/vector_datamove_intf_impl.h`; `tests/api/c_api/npu_arch_3510/vector_datamove/` |
82-| reg_compute headers | `include/c_api/reg_compute/` | reg 相关 2201 现有用例在 `tests/api/c_api/npu_arch_2201/vector_compute/` | 3510 的 reg load/store 实现在 `vector_datamove_impl/reg_load/`、`vector_datamove_impl/reg_store/`,UT 归入 `vector_datamove/` 或 `vector_compute/` |84+| reg_compute headers | `include/c_api/reg_compute/` | reg 相关 2201 现有用例在 `tests/api/c_api/npu_arch_2201/vector_compute/` | 3510 的 reg load/store 实现分别位于 `loadalign_intf_impl.h`、`loadunalign_intf_impl.h`、`storealign_intf_impl.h`、`storeunalign_intf_impl.h`,废弃重载位于 `npu_arch_3510/` 下的同名头,UT 归入 `vector_datamove/` 或 `vector_compute/` |
83 85 
84## 工具类 API 子目录映射86## 工具类 API 子目录映射
85 87 
@@ -187,7 +187,7 @@ flowchart TD
187 187 
188### 7.1 先确定“对外 API”,不要只盯内部 impl188### 7.1 先确定“对外 API”,不要只盯内部 impl
189 189 
190-覆盖率页面通常落在 `impl/` 或 `instr_impl/` 下,但补 UT 时,必须回溯到对应的:190+覆盖率页面通常落在 `impl/` 下(C API 为 `impl/c_api/memory_base_impl/` 和 `impl/c_api/reg_base_impl/`),但补 UT 时,必须回溯到对应的:
191- `include/basic_api`191- `include/basic_api`
192- `include/c_api`192- `include/c_api`
193- `include/adv_api`193- `include/adv_api`
@@ -108,7 +108,7 @@ expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "\`__cbuf__\`" "C
108expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "\`__fbuf__\`" "C API fbuf pointer marker"108expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "\`__fbuf__\`" "C API fbuf pointer marker"
109expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "本表不是固定全集" "C API pointer marker list not exhaustive"109expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "本表不是固定全集" "C API pointer marker list not exhaustive"
110expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "\`__aicore__\`、\`__simd_callee__\` 等函数限定符不是指针类型标记" "C API function qualifier is not pointer marker"110expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "\`__aicore__\`、\`__simd_callee__\` 等函数限定符不是指针类型标记" "C API function qualifier is not pointer marker"
111-expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "impl/c_api/instr_impl/**" "C API impl struct source"111+expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "impl/c_api/{memory_base_impl,reg_base_impl}/**" "C API impl struct source"
112expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "底层 stub 签名" "C API stub signature source"112expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "底层 stub 签名" "C API stub signature source"
113expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "不能只验证本 guide 中列出的常见字段" "C API no fixed attribute list"113expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "不能只验证本 guide 中列出的常见字段" "C API no fixed attribute list"
114expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "Stub 已逐项断言所有 attribute/结构体字段" "C API struct field assertion checklist"114expect_fixed "${REFERENCES_DIR}/api-guides/c-api-ut-guide.md" "Stub 已逐项断言所有 attribute/结构体字段" "C API struct field assertion checklist"
@@ -170,7 +170,7 @@ expect_fixed "${REFERENCES_DIR}/README.md" "api-directory-map.md" "API directory
170expect_fixed "${REFERENCES_DIR}/README.md" "generation-constraints.json" "generation constraints reference"170expect_fixed "${REFERENCES_DIR}/README.md" "generation-constraints.json" "generation constraints reference"
171expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "API 目录映射表" "API directory map title"171expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "API 目录映射表" "API directory map title"
172expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "tests/api/reg_compute_api/" "reg compute test mapping"172expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "tests/api/reg_compute_api/" "reg compute test mapping"
173-expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "impl/c_api/instr_impl/npu_arch_3510/" "C API implementation mapping"173+expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "impl/c_api/reg_base_impl/" "C API implementation mapping"
174expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "ascendc_case_ascend950pr_9599_aiv_basic" "950 AIV basic test mapping"174expect_fixed "${REFERENCES_DIR}/foundations/api-directory-map.md" "ascendc_case_ascend950pr_9599_aiv_basic" "950 AIV basic test mapping"
175if grep -Eq 'Tensor API|tensor_api|experimental/tensor_api|tests/api/tensor_api' "${REFERENCES_DIR}/foundations/api-directory-map.md"; then175if grep -Eq 'Tensor API|tensor_api|experimental/tensor_api|tests/api/tensor_api' "${REFERENCES_DIR}/foundations/api-directory-map.md"; then
176 fail "current asc-api-ut-gen skill must ignore Tensor API mappings"176 fail "current asc-api-ut-gen skill must ignore Tensor API mappings"
@@ -22,11 +22,8 @@ asc-devkit:
22 - impl/basic_api/kernel_macros.h22 - impl/basic_api/kernel_macros.h
23 - impl/basic_api/kernel_prof_trace*.h23 - impl/basic_api/kernel_prof_trace*.h
24 - impl/utils/**/*.h24 - impl/utils/**/*.h
25+ - impl/c_api/reg_base_impl/npu_arch_3510/sync_intf_impl.h
25 - impl/experimental/tensor_api/utils/*.h26 - impl/experimental/tensor_api/utils/*.h
L
LLycheeeee20 天前

只删减,不配新增文件吗?

likedislike
26- - impl/c_api/instr_impl/npu_arch_2201/utils_impl/**/*.h
27- - impl/c_api/instr_impl/npu_arch_3510/utils_impl/**/*.h
28- - impl/c_api/instr_impl/npu_arch_3510/utils_impl.h
29- - impl/c_api/instr_impl/npu_arch_2201/misc_impl.h
30 - impl/basic_api/reg_compute/kernel_reg_compute_struct_intf_impl.h27 - impl/basic_api/reg_compute/kernel_reg_compute_struct_intf_impl.h
31 - impl/basic_api/reg_compute/kernel_reg_compute_common_intf_impl.h28 - impl/basic_api/reg_compute/kernel_reg_compute_common_intf_impl.h
32 - impl/basic_api/reg_compute/kernel_reg_compute_intf_impl.h29 - impl/basic_api/reg_compute/kernel_reg_compute_intf_impl.h
@@ -61,8 +58,6 @@ asc-devkit:
61 - impl/basic_api/dav_m310/kernel_operator_vec_vconv_impl.h58 - impl/basic_api/dav_m310/kernel_operator_vec_vconv_impl.h
62 - impl/basic_api/dav_m200/kernel_operator_dump_tensor_impl.h59 - impl/basic_api/dav_m200/kernel_operator_dump_tensor_impl.h
63 - impl/basic_api/dav_c220/kernel_operator_dump_tensor_impl.h60 - impl/basic_api/dav_c220/kernel_operator_dump_tensor_impl.h
64- - impl/c_api/instr_impl/npu_arch_2201/debug_impl/printf_impl.h
65- - impl/c_api/instr_impl/npu_arch_2201/debug_impl.h
66 - impl/basic_api/common_types.h61 - impl/basic_api/common_types.h
67 - impl/basic_api/kernel_operator_gemm_base_impl.h62 - impl/basic_api/kernel_operator_gemm_base_impl.h
68 - impl/basic_api/kernel_operator_gemm_intf_impl.h63 - impl/basic_api/kernel_operator_gemm_intf_impl.h
@@ -76,19 +71,6 @@ asc-devkit:
76 - impl/adv_api/detail/hccl/impl/hccl_v220_impl.h71 - impl/adv_api/detail/hccl/impl/hccl_v220_impl.h
77 - impl/adv_api/detail/hccl/impl/hccl_v310_impl.h72 - impl/adv_api/detail/hccl/impl/hccl_v310_impl.h
78 - impl/adv_api/detail/hccl/cc73 - impl/adv_api/detail/hccl/cc
79- - impl/c_api/instr_impl/npu_arch_2201/sync_impl/asc_sync_data_barrier_impl.h
80- - impl/c_api/instr_impl/npu_arch_3510/sync_impl/asc_sync_data_barrier_impl.h
81- - impl/c_api/instr_impl/npu_arch_2201/sync_impl/asc_set_flag_impl.h
82- - impl/c_api/instr_impl/npu_arch_2201/sync_impl/asc_wait_flag_impl.h
83- - impl/c_api/instr_impl/npu_arch_3510/sync_impl/asc_sync_wait_impl.h
84- - impl/c_api/instr_impl/npu_arch_3510/sync_impl/asc_sync_notify_impl.h
85- - impl/c_api/instr_impl/npu_arch_3510/sync_impl/asc_lock_impl.h
86- - impl/c_api/instr_impl/npu_arch_3510/sync_impl/asc_unlock_impl.h
87- - impl/c_api/instr_impl/npu_arch_2201/sync_impl.h
88- - impl/c_api/instr_impl/npu_arch_3510/sync_impl.h
89- - impl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/asc_transto5hd_impl.h
90- - impl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_transto5hd_impl.h
91- - impl/c_api/instr_impl/npu_arch_3510/sys_var_impl/asc_get_vf_len_impl.h
92 - impl/basic_api/dav_c310/kernel_operator_determine_compute_sync_impl.h74 - impl/basic_api/dav_c310/kernel_operator_determine_compute_sync_impl.h
93 - impl/tensor_api/arch/utils/*.h75 - impl/tensor_api/arch/utils/*.h
94 - impl/tensor_api/utils/*.h76 - impl/tensor_api/utils/*.h
@@ -261,7 +243,6 @@ asc-devkit:
261 - impl/simt_api/cpp/kernel_simt_bessel_intf_impl.h243 - impl/simt_api/cpp/kernel_simt_bessel_intf_impl.h
262 - impl/simt_api/cpp/kernel_simt_cast_intf_impl.h244 - impl/simt_api/cpp/kernel_simt_cast_intf_impl.h
263 - impl/simt_api/cpp/kernel_simt_atomic_intf_impl.h245 - impl/simt_api/cpp/kernel_simt_atomic_intf_impl.h
264- - impl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/asc_set_vector_mask_impl.h
265 - impl/basic_api/dav_c220/kernel_operator_reg_others_impl.h246 - impl/basic_api/dav_c220/kernel_operator_reg_others_impl.h
266 - impl/basic_api/dav_c220/kernel_operator_vec_others_impl.h247 - impl/basic_api/dav_c220/kernel_operator_vec_others_impl.h
267 - impl/basic_api/dav_c220/kernel_operator_cube_others_impl.h248 - impl/basic_api/dav_c220/kernel_operator_cube_others_impl.h
@@ -176,27 +176,23 @@ asc-devkit/
176│176│
177├── impl/177├── impl/
178│ └── c_api/ # C API implementation178│ └── c_api/ # C API implementation
179-│ ├── instr_impl/ # Instruction implementation179+│ ├── CMakeLists.txt
180-│ │ ├── npu_arch_2201/ # NPU ARCH 220X architecture180+│ ├── memory_base_impl/ # 2201 implementations, one file per public interface header
181-│ │ │ ├── vector_compute_impl/181+│ │ ├── utils_impl.h # Shared internal helpers
182-│ │ │ │ ├── asc_abs_impl.h182+│ │ ├── datamove_atomic_intf_impl.h
183-│ │ │ │ └── ...183+│ │ ├── scalar_atomic_intf_impl.h
184-│ │ │ ├── vector_datamove_impl/184+│ │ ├── vector_arith_intf_impl.h
185-│ │ │ │ ├── asc_copy_gm2ub_align_impl.h185+│ │ ├── vector_datamove_intf_impl.h
186-│ │ │ │ └── ...186+│ │ └── ...
187-│ │ │ ├── vector_compute_impl.h187+│ └── reg_base_impl/ # Shared regbase implementations
188-│ │ │ ├── vector_datamove_impl.h188+│ ├── utils_impl.h
189-│ │ │ └── ...189+│ ├── reg_arith_intf_impl.h
190-│ │ └── npu_arch_3510/ # NPU ARCH 351X architecture190+│ ├── loadalign_intf_impl.h
191-│ │ ├── vector_compute_impl/191+│ ├── vector_datamove_intf_impl.h
192-│ │ │ ├── asc_abs_impl.h192+│ ├── ...
193-│ │ │ └── ...193+│ └── npu_arch_3510/ # 3510-specific implementations, included by common headers under an architecture guard
194-│ │ ├── vector_compute_impl.h194+│ ├── reg_convert_intf_impl.h
195-│ │ └── ...195+│ └── ...
196-│ ├── utils/
197-│ │ └── c_api_utils_impl.cpp
198-│ └── stub/ # Stub
199-│ └── cce_stub.h
200│196│
201├── tests/197├── tests/
202│ └── api/198│ └── api/
@@ -45,7 +45,7 @@ The `include/` and `impl/` top-level directory structures have a one-to-one corr
45| `include/adv_api/math/xxx.h` | `impl/adv_api/detail/math/xxx/xxx_common_impl.h` | |45| `include/adv_api/math/xxx.h` | `impl/adv_api/detail/math/xxx/xxx_common_impl.h` | |
46| `include/adv_api/math/xxx_tiling.h` | `impl/adv_api/tiling/math/xxx_tiling_impl.cpp` | |46| `include/adv_api/math/xxx_tiling.h` | `impl/adv_api/tiling/math/xxx_tiling_impl.cpp` | |
47| `include/adv_api/<cat>/xxx.h` | `impl/adv_api/detail/<cat>/xxx/xxx_common_impl.h` | |47| `include/adv_api/<cat>/xxx.h` | `impl/adv_api/detail/<cat>/xxx/xxx_common_impl.h` | |
48-| `include/c_api/<category>/<category>.h` | `impl/c_api/instr_impl/npu_arch_<NNNN>/<category>_impl/asc_<api>_impl.h` | C API uses `npu_arch_` prefix directory |48+| `include/c_api/<category>/<header>.h` | `impl/c_api/memory_base_impl/<header>_intf_impl.h`, `impl/c_api/reg_base_impl/<header>_intf_impl.h` | Public headers follow the existing category hierarchy and directly include matching common implementation headers, which include 3510-specific implementations under `reg_base_impl/npu_arch_3510/` with an architecture guard. Shared internal helpers belong in each architecture group's `utils_impl.h`. |
49 49 
50---50---
51 51 
@@ -91,7 +91,7 @@ exp_check_common.h
91|---------|--------|---------|------|91|---------|--------|---------|------|
92| Basic API | `kernel_<name>_intf.h` | Dispatch: `kernel_<name>_intf_impl.h`; arch impl: `dav_<arch>/kernel_<name>_impl.h` | `kernel_operator_vec_binary_intf.h` |92| Basic API | `kernel_<name>_intf.h` | Dispatch: `kernel_<name>_intf_impl.h`; arch impl: `dav_<arch>/kernel_<name>_impl.h` | `kernel_operator_vec_binary_intf.h` |
93| High-level API | `<name>.h` | `<name>_common_impl.h` | `axpy.h` / `axpy_common_impl.h` |93| High-level API | `<name>.h` | `<name>_common_impl.h` | `axpy.h` / `axpy_common_impl.h` |
94-| C API | `<category>.h` | `asc_<api>_impl.h` | `vector_compute.h` / `asc_add_impl.h` |94+| C API | `<header>.h` | `<header>_intf_impl.h` | `scalar_atomic.h` / `scalar_atomic_intf_impl.h` |
95| Tiling | `<name>_tiling.h` | `<name>_tiling_impl.cpp` | `axpy_tiling.h` |95| Tiling | `<name>_tiling.h` | `<name>_tiling_impl.cpp` | `axpy_tiling.h` |
96 96 
97---97---
@@ -100,7 +100,7 @@ exp_check_common.h
100 100 
101### Naming Format101### Naming Format
102 102 
103-Architecture-specific implementations for basic API are placed under the `impl/basic_api/dav_<code>/` directory, in the format `dav_` + architecture code. For high-level API, architecture-specific implementations reside in `impl/adv_api/detail/<category>/<api>/<api>_<arch>_impl.h`, dispatched by the public header via `#if __NPU_ARCH__`. C API uses the `npu_arch_<NNNN>/` prefix directory; see the C API mapping table above.103+Architecture-specific implementations for basic API are placed under the `impl/basic_api/dav_<code>/` directory, in the format `dav_` + architecture code. For high-level API, architecture-specific implementations reside in `impl/adv_api/detail/<category>/<api>/<api>_<arch>_impl.h`, dispatched by the public header via `#if __NPU_ARCH__`. C API places 2201 implementations in `impl/c_api/memory_base_impl/`, shared regbase implementations in `impl/c_api/reg_base_impl/`, and 3510-specific implementations in its `npu_arch_3510/` directory. Matching common headers include the specific headers under an architecture guard.
104 104 
105### Architecture Code Mapping (Examples)105### Architecture Code Mapping (Examples)
106 106 
@@ -234,14 +234,23 @@ When adding a complete API, create and modify files according to the following c
234### C API Checklist234### C API Checklist
235 235 
236```text236```text
237-□ include/c_api/<category>/<category>.h or add function declarations to existing file237+□ include/c_api/<category>/<header>.h
238+ Add declarations in the existing category hierarchy; reuse an existing header when appropriate
238 239 
239-□ impl/c_api/instr_impl/npu_arch_<NNNN>/<category>_impl/asc_<api>_impl.h240+□ impl/c_api/memory_base_impl/<header>_intf_impl.h
240- Architecture-specific implementation241+ Direct 2201 implementations and necessary helpers in the matching public header's implementation file
241 242 
242-□ impl/c_api/instr_impl/npu_arch_<NNNN>/<category>_impl.h243+□ impl/c_api/reg_base_impl/<header>_intf_impl.h
243- Add #include "<category>_impl/asc_<api>_impl.h" in the aggregate header244+ Shared regbase implementations, included directly by the matching public header
244- (when adding a new category, also register the public header in include/c_api/asc_simd.h)245+ 
246+□ impl/c_api/reg_base_impl/npu_arch_3510/<header>_intf_impl.h
247+ 3510-specific implementations, included by matching common headers under __NPU_ARCH__ == 3510
248+ Do not include common interface implementation headers in reverse; retain necessary utility dependencies only
249+ Register new public categories in the corresponding public entry headers
250+ 
251+ Do not create empty implementations for aggregate headers, type headers or macro aliases.
252+ Architecture-specific interfaces still use matching common dispatch headers.
253+ Shared internal helpers belong in each architecture group's utils_impl.h; avoid redundant forwarding layers.
245 254 
246□ tests/api/c_api/npu_arch_<arch>/<category>/test_asc_<api>.cpp255□ tests/api/c_api/npu_arch_<arch>/<category>/test_asc_<api>.cpp
247 Mock test256 Mock test
@@ -176,27 +176,23 @@ asc-devkit/
176│176│
177├── impl/177├── impl/
178│ └── c_api/ # C API实现178│ └── c_api/ # C API实现
179-│ ├── instr_impl/ # 指令实现179+│ ├── CMakeLists.txt
180-│ │ ├── npu_arch_2201/ # NPU ARCH 220X架构180+│ ├── memory_base_impl/ # 2201实现,与公开接口头逐文件对应
181-│ │ │ ├── vector_compute_impl/181+│ │ ├── utils_impl.h # 共享的内部辅助实现
182-│ │ │ │ ├── asc_abs_impl.h182+│ │ ├── datamove_atomic_intf_impl.h
183-│ │ │ │ └── ...183+│ │ ├── scalar_atomic_intf_impl.h
184-│ │ │ ├── vector_datamove_impl/184+│ │ ├── vector_arith_intf_impl.h
185-│ │ │ │ ├── asc_copy_gm2ub_align_impl.h185+│ │ ├── vector_datamove_intf_impl.h
186-│ │ │ │ └── ...186+│ │ └── ...
187-│ │ │ ├── vector_compute_impl.h187+│ └── reg_base_impl/ # regbase公共实现
188-│ │ │ ├── vector_datamove_impl.h188+│ ├── utils_impl.h
189-│ │ │ └── ...189+│ ├── reg_arith_intf_impl.h
190-│ │ └── npu_arch_3510/ # NPU ARCH 351X架构190+│ ├── loadalign_intf_impl.h
191-│ │ ├── vector_compute_impl/191+│ ├── vector_datamove_intf_impl.h
192-│ │ │ ├── asc_abs_impl.h192+│ ├── ...
193-│ │ │ └── ...193+│ └── npu_arch_3510/ # 3510专用实现,由公共实现头按架构宏包含
194-│ │ ├── vector_compute_impl.h194+│ ├── reg_convert_intf_impl.h
195-│ │ └── ...195+│ └── ...
196-│ ├── utils/
197-│ │ └── c_api_utils_impl.cpp
198-│ └── stub/ # Stub
199-│ └── cce_stub.h
200│196│
201├── tests/197├── tests/
202│ └── api/198│ └── api/
@@ -45,7 +45,7 @@ asc-devkit/
45| `include/adv_api/math/xxx.h` | `impl/adv_api/detail/math/xxx/xxx_common_impl.h` | |45| `include/adv_api/math/xxx.h` | `impl/adv_api/detail/math/xxx/xxx_common_impl.h` | |
46| `include/adv_api/math/xxx_tiling.h` | `impl/adv_api/tiling/math/xxx_tiling_impl.cpp` | |46| `include/adv_api/math/xxx_tiling.h` | `impl/adv_api/tiling/math/xxx_tiling_impl.cpp` | |
47| `include/adv_api/<cat>/xxx.h` | `impl/adv_api/detail/<cat>/xxx/xxx_common_impl.h` | |47| `include/adv_api/<cat>/xxx.h` | `impl/adv_api/detail/<cat>/xxx/xxx_common_impl.h` | |
48-| `include/c_api/<category>/<category>.h` | `impl/c_api/instr_impl/npu_arch_<NNNN>/<category>_impl/asc_<api>_impl.h` | C API使用 `npu_arch_` 前缀目录 |48+| `include/c_api/<category>/<header>.h` | `impl/c_api/memory_base_impl/<header>_intf_impl.h`、`impl/c_api/reg_base_impl/<header>_intf_impl.h` | 公开头沿用现有分类层级,只直接引用同名公共实现头;公共实现头通过架构宏包含`reg_base_impl/npu_arch_3510/`下的3510专用实现,内部公共辅助代码放在各架构组的`utils_impl.h`中 |
49 49 
50---50---
51 51 
@@ -91,7 +91,7 @@ exp_check_common.h
91|---------|--------|---------|------|91|---------|--------|---------|------|
92| 基础API | `kernel_<name>_intf.h` | 分发层:`kernel_<name>_intf_impl.h`;架构实现:`dav_<arch>/kernel_<name>_impl.h` | `kernel_operator_vec_binary_intf.h` |92| 基础API | `kernel_<name>_intf.h` | 分发层:`kernel_<name>_intf_impl.h`;架构实现:`dav_<arch>/kernel_<name>_impl.h` | `kernel_operator_vec_binary_intf.h` |
93| 高阶API | `<name>.h` | `<name>_common_impl.h` | `axpy.h` / `axpy_common_impl.h` |93| 高阶API | `<name>.h` | `<name>_common_impl.h` | `axpy.h` / `axpy_common_impl.h` |
94-| C API | `<category>.h` | `asc_<api>_impl.h` | `vector_compute.h` / `asc_add_impl.h` |94+| C API | `<header>.h` | `<header>_intf_impl.h` | `scalar_atomic.h` / `scalar_atomic_intf_impl.h` |
95| Tiling | `<name>_tiling.h` | `<name>_tiling_impl.cpp` | `axpy_tiling.h` |95| Tiling | `<name>_tiling.h` | `<name>_tiling_impl.cpp` | `axpy_tiling.h` |
96 96 
97---97---
@@ -100,7 +100,7 @@ exp_check_common.h
100 100 
101### 命名格式101### 命名格式
102 102 
103-基础API的架构特定实现放在 `impl/basic_api/dav_<code>/` 目录下,格式为 `dav_`+架构代码。高阶API的架构特定实现位于 `impl/adv_api/detail/<category>/<api>/<api>_<arch>_impl.h`,由公开头文件通过 `#if __NPU_ARCH__` 分发。C API使用 `npu_arch_<NNNN>/` 前缀目录,详见上文C API映射表。103+基础API的架构特定实现放在 `impl/basic_api/dav_<code>/` 目录下,格式为 `dav_`+架构代码。高阶API的架构特定实现位于 `impl/adv_api/detail/<category>/<api>/<api>_<arch>_impl.h`,由公开头文件通过 `#if __NPU_ARCH__` 分发。C API的2201实现放在`impl/c_api/memory_base_impl/`,regbase公共实现放在`impl/c_api/reg_base_impl/`,3510独有的实现放在后者的`npu_arch_3510/`目录中,由同名公共实现头按架构包含。
104 104 
105### 架构代码映射(示例)105### 架构代码映射(示例)
106 106 
@@ -234,14 +234,17 @@ impl/adv_api/
234### C API清单234### C API清单
235 235 
236```text236```text
237-□ include/c_api/<category>/<category>.h或添加函数声明到现有文件237+□ include/c_api/<category>/<header>.h
238+ 放置接口声明
238 239 
239-□ impl/c_api/instr_impl/npu_arch_<NNNN>/<category>_impl/asc_<api>_impl.h240+□ impl/c_api/memory_base_impl/<header>_intf_impl.h
240- 架构特定实现241+ 放置2201架构的实现
241 242 
242-□ impl/c_api/instr_impl/npu_arch_<NNNN>/<category>_impl.h243+□ impl/c_api/reg_base_impl/<header>_intf_impl.h
243- 在聚合头中添加#include "<category>_impl/asc_<api>_impl.h"244+ 放置regbase公共实现
244- (新增category时还需在include/c_api/asc_simd.h中注册公开头)245+ 
246+□ impl/c_api/reg_base_impl/npu_arch_3510/<header>_intf_impl.h
247+ 仅放置3510独有的实现
245 248 
246□ tests/api/c_api/npu_arch_<arch>/<category>/test_asc_<api>.cpp249□ tests/api/c_api/npu_arch_<arch>/<category>/test_asc_<api>.cpp
247 Mock测试250 Mock测试
@@ -1,114 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl\c_api\instr_impl\npu_arch_2201/atomic_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_H
20- 
21-#include "c_api/defs/defs.h"
22-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_disable_dma_atomic_impl.h"
23-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_none_impl.h"
24-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_get_store_atomic_config_impl.h"
25-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_store_atomic_config_impl.h"
26-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_bfloat_impl.h"
27-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_float_impl.h"
28-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_float16_impl.h"
29-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int_impl.h"
30-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int8_impl.h"
31-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int16_impl.h"
32-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_bfloat_impl.h"
33-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_float_impl.h"
34-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_float16_impl.h"
35-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int_impl.h"
36-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int8_impl.h"
37-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int16_impl.h"
38-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_bfloat_impl.h"
39-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_float_impl.h"
40-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_float16_impl.h"
41-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int_impl.h"
42-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int8_impl.h"
43-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int16_impl.h"
44-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int32_impl.h"
45-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int32_impl.h"
46-#include "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int32_impl.h"
47- 
48-__aicore__ inline void asc_disable_dma_atomic() { asc_disable_dma_atomic_impl(); }
49- 
50-__aicore__ inline void asc_set_store_atomic_config_v1(uint16_t type, uint16_t op)
51-{
52- asc_set_store_atomic_config_v1_impl(type, op);
53-}
54- 
55-__aicore__ inline void asc_set_atomic_add_bfloat() { asc_set_atomic_add_bfloat_impl(); }
56- 
57-__aicore__ inline void asc_set_atomic_add_float() { asc_set_atomic_add_float_impl(); }
58- 
59-__aicore__ inline void asc_set_atomic_add_float16() { asc_set_atomic_add_float16_impl(); }
60- 
61-__aicore__ inline void asc_set_atomic_add_int8() { asc_set_atomic_add_int8_impl(); }
62- 
63-__aicore__ inline void asc_set_atomic_add_int16() { asc_set_atomic_add_int16_impl(); }
64- 
65-__aicore__ inline void asc_set_atomic_add_int32() { asc_set_atomic_add_int32_impl(); }
66- 
67-__aicore__ inline void asc_set_atomic_max_bfloat() { asc_set_atomic_max_bfloat_impl(); }
68- 
69-__aicore__ inline void asc_set_atomic_max_float() { asc_set_atomic_max_float_impl(); }
70- 
71-__aicore__ inline void asc_set_atomic_max_float16() { asc_set_atomic_max_float16_impl(); }
72- 
73-__aicore__ inline void asc_set_atomic_max_int8() { asc_set_atomic_max_int8_impl(); }
74- 
75-__aicore__ inline void asc_set_atomic_max_int16() { asc_set_atomic_max_int16_impl(); }
76- 
77-__aicore__ inline void asc_set_atomic_max_int32() { asc_set_atomic_max_int32_impl(); }
78- 
79-__aicore__ inline void asc_set_atomic_min_bfloat() { asc_set_atomic_min_bfloat_impl(); }
80- 
81-__aicore__ inline void asc_set_atomic_min_float() { asc_set_atomic_min_float_impl(); }
82- 
83-__aicore__ inline void asc_set_atomic_min_float16() { asc_set_atomic_min_float16_impl(); }
84- 
85-__aicore__ inline void asc_set_atomic_min_int8() { asc_set_atomic_min_int8_impl(); }
86- 
87-__aicore__ inline void asc_set_atomic_min_int16() { asc_set_atomic_min_int16_impl(); }
88- 
89-__aicore__ inline void asc_set_atomic_min_int32() { asc_set_atomic_min_int32_impl(); }
90- 
91-ASC_DEPRECATED(9.2.0, "2027/09/07", asc_disable_dma_atomic)
92-__aicore__ inline void asc_set_atomic_none() { asc_disable_dma_atomic(); }
93- 
94-ASC_DEPRECATED(9.1.0, "2027/09/07", asc_atomic_add)
95-__aicore__ inline void asc_get_store_atomic_config(asc_store_atomic_config& config)
96-{
97- asc_get_store_atomic_config_impl(config);
98-}
99- 
100-ASC_DEPRECATED(9.2.0, "2027/09/07", asc_set_atomic_add_int32)
101-__aicore__ inline void asc_set_atomic_add_int() { asc_set_atomic_add_int_impl(); }
102- 
103-ASC_DEPRECATED(9.2.0, "2027/09/07", asc_set_atomic_max_int32)
104-__aicore__ inline void asc_set_atomic_max_int() { asc_set_atomic_max_int_impl(); }
105- 
106-ASC_DEPRECATED(9.2.0, "2027/09/07", asc_set_atomic_min_int32)
107-__aicore__ inline void asc_set_atomic_min_int() { asc_set_atomic_min_int_impl(); }
108- 
109-#endif
110- 
111-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
112-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
113-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
114-#endif
@@ -1,35 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_disable_dma_atomic_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_disable_dma_atomic_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_DISABLE_DMA_ATOMIC_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_DISABLE_DMA_ATOMIC_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_disable_dma_atomic_impl() { set_atomic_none(); }
29- 
30-#endif
31- 
32-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
33-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
34-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
35-#endif
@@ -1,38 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_get_store_atomic_config_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_get_store_atomic_config_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_GET_STORE_ATOMIC_CONFIG_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_GET_STORE_ATOMIC_CONFIG_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_get_store_atomic_config_impl(asc_store_atomic_config& config)
29-{
30- config.config = get_st_atomic_cfg();
31-}
32- 
33-#endif
34- 
35-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
36-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
37-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
38-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_add_bfloat_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_bfloat_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_BFLOAT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_BFLOAT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_add_bfloat_impl()
29-{
30- set_atomic_add();
31- set_atomic_bf16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_add_float16_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_float16_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_FLOAT16_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_FLOAT16_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_add_float16_impl()
29-{
30- set_atomic_add();
31- set_atomic_f16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_add_float_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_float_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_FLOAT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_FLOAT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_add_float_impl()
29-{
30- set_atomic_add();
31- set_atomic_f32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_add_int16_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int16_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT16_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT16_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_add_int16_impl()
29-{
30- set_atomic_add();
31- set_atomic_s16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_add_int32_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int32_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT32_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT32_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_add_int32_impl()
29-{
30- set_atomic_add();
31- set_atomic_s32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_add_int8_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int8_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT8_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT8_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_add_int8_impl()
29-{
30- set_atomic_add();
31- set_atomic_s8();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_add_int_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_add_int_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_ADD_INT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_add_int_impl()
29-{
30- set_atomic_add();
31- set_atomic_s32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_max_bfloat_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_bfloat_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_BFLOAT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_BFLOAT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_max_bfloat_impl()
29-{
30- set_atomic_max();
31- set_atomic_bf16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_max_float16_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_float16_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_FLOAT16_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_FLOAT16_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_max_float16_impl()
29-{
30- set_atomic_max();
31- set_atomic_f16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_max_float_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_float_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_FLOAT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_FLOAT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_max_float_impl()
29-{
30- set_atomic_max();
31- set_atomic_f32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_max_int16_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int16_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT16_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT16_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_max_int16_impl()
29-{
30- set_atomic_max();
31- set_atomic_s16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_max_int32_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int32_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT32_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT32_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_max_int32_impl()
29-{
30- set_atomic_max();
31- set_atomic_s32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_max_int8_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int8_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT8_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT8_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_max_int8_impl()
29-{
30- set_atomic_max();
31- set_atomic_s8();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_max_int_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_max_int_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MAX_INT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_max_int_impl()
29-{
30- set_atomic_max();
31- set_atomic_s32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_min_bfloat_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_bfloat_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_BFLOAT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_BFLOAT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_min_bfloat_impl()
29-{
30- set_atomic_min();
31- set_atomic_bf16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_min_float16_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_float16_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_FLOAT16_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_FLOAT16_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_min_float16_impl()
29-{
30- set_atomic_min();
31- set_atomic_f16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_min_float_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_float_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_FLOAT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_FLOAT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_min_float_impl()
29-{
30- set_atomic_min();
31- set_atomic_f32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_min_int16_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int16_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT16_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT16_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_min_int16_impl()
29-{
30- set_atomic_min();
31- set_atomic_s16();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_min_int32_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int32_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT32_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT32_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_min_int32_impl()
29-{
30- set_atomic_min();
31- set_atomic_s32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_min_int8_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int8_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT8_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT8_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_min_int8_impl()
29-{
30- set_atomic_min();
31- set_atomic_s8();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,39 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_min_int_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_min_int_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_MIN_INT_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_min_int_impl()
29-{
30- set_atomic_min();
31- set_atomic_s32();
32-}
33- 
34-#endif
35- 
36-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
37-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
38-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
39-#endif
@@ -1,35 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_atomic_none_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_atomic_none_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_NONE_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_ATOMIC_NONE_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_atomic_none_impl() { set_atomic_none(); }
29- 
30-#endif
31- 
32-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
33-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
34-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
35-#endif
@@ -1,41 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_store_atomic_config_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/atomic_impl/asc_set_store_atomic_config_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_STORE_ATOMIC_CONFIG_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_ATOMIC_IMPL_ASC_SET_STORE_ATOMIC_CONFIG_IMPL_H
25-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
26- 
27-__aicore__ inline void asc_set_store_atomic_config_v1_impl(uint16_t type, uint16_t op)
28-{
29- constexpr uint64_t type_mask = 0x7;
30- constexpr uint64_t op_mask = 0x3;
31- constexpr uint64_t op_bit = 3;
32- uint64_t config = (type & type_mask) | ((op & op_mask) << op_bit);
33- set_st_atomic_cfg(config);
34-}
35- 
36-#endif
37- 
38-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
39-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
40-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
41-#endif
@@ -1,57 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/c_api_instr_impl/cache_ctrl_c_api_impl/cache_ctrl_c_api_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_CACHE_CTRL_C_API_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_CACHE_CTRL_C_API_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/asc_get_icache_preload_status_impl.h"
22-#include "impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/asc_data_cache_preload_impl.h"
23-#include "impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/asc_dcci_impl.h"
24-#include "impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/asc_icache_preload_impl.h"
25- 
26-namespace __asc_aicore {
27-__aicore__ inline void asc_dcci_single(__gm__ void* dst) { asc_dcci_single_impl(dst); }
28-} // namespace __asc_aicore
29- 
30-__aicore__ inline void asc_ub_dcci_single(__ubuf__ void* dst) { asc_ub_dcci_single_impl(dst); }
31- 
32-__aicore__ inline void asc_dcci_entire_all() { asc_dcci_entire_all_impl(); }
33- 
34-__aicore__ inline void asc_dcci_entire_ub() { asc_dcci_entire_ub_impl(); }
35- 
36-__aicore__ inline void asc_dcci_entire_out() { asc_dcci_entire_out_impl(); }
37- 
38-__aicore__ inline void asc_dcci_entire_atomic() { asc_dcci_entire_atomic_impl(); }
39- 
40-__aicore__ inline void asc_datacache_preload(__gm__ uint64_t* address, int64_t offset)
41-{
42- asc_datacache_preload_impl(address, offset);
43-}
44- 
45-__aicore__ inline int64_t asc_get_icache_preload_status() { return asc_get_icache_preload_status_impl(); }
46- 
47-__aicore__ inline void asc_icache_preload(const void* addr, int64_t prefetch_len)
48-{
49- asc_icache_preload_impl(addr, prefetch_len);
50-}
51- 
52-#endif
53- 
54-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
55-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
56-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
57-#endif
@@ -1,33 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/asc_data_cache_preload_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_ASC_DATA_CACHE_PRELOAD_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_ASC_DATA_CACHE_PRELOAD_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
22- 
23-__aicore__ inline void asc_datacache_preload_impl(__gm__ uint64_t* address, int64_t offset)
24-{
25- dc_preload(address, offset);
26-}
27- 
28-#endif
29- 
30-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
31-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
32-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
33-#endif
@@ -1,30 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/get_icache_preload_status_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_ASC_GET_ICACHE_PRL_ST_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_ASC_GET_ICACHE_PRL_ST_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
22- 
23-__aicore__ inline int64_t asc_get_icache_preload_status_impl() { return get_icache_prl_st(); }
24- 
25-#endif
26- 
27-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
28-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
29-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
30-#endif
@@ -1,35 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_icache_preload_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/asc_icache_preload_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_ASC_ICACHE_PRL_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CACHE_CTRL_IMPL_ASC_ICACHE_PRL_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_icache_preload_impl(const void* addr, int64_t prefetch_len) { preload(addr, prefetch_len); }
29- 
30-#endif
31- 
32-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
33-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
34-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
35-#endif
@@ -1,34 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_enable_hf32_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_ENABLE_HF32_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_ENABLE_HF32_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
22- 
23-__aicore__ inline void asc_enable_hf32_impl()
24-{
25- constexpr int32_t HF32_MODE_BIT = 46;
26- set_ctrl(sbitset1(get_ctrl(), HF32_MODE_BIT));
27-}
28- 
29-#endif
30- 
31-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
32-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
33-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
34-#endif
@@ -1,43 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_enable_hf32_trans_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_enable_hf32_trans_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_ENABLE_HF32_TRANS_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_ENABLE_HF32_TRANS_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_enable_hf32_trans_impl(uint32_t mode)
29-{
30- constexpr int32_t HF32_TRANS_MODE_BIT = 47;
31- if (mode) {
32- set_ctrl(sbitset1(get_ctrl(), HF32_TRANS_MODE_BIT));
33- } else {
34- set_ctrl(sbitset0(get_ctrl(), HF32_TRANS_MODE_BIT));
35- }
36-}
37- 
38-#endif
39- 
40-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
41-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
42-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
43-#endif
@@ -1,63 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_get_l0c2gm_config_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "c_api/instr_impl/cube_compute_impl/asc_get_l0c2gm_config_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_GET_L0C2GM_CONFIG_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_GET_L0C2GM_CONFIG_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline uint64_t asc_get_l0c2gm_relu_impl()
29-{
30- if ASC_IS_AIC {
31- asc_capi_fpc_reg_config config;
32- config.config = get_fpc();
33- return static_cast<uint64_t>(config.relu_units);
34- }
35- return 0;
36-}
37- 
38-__aicore__ inline uint64_t asc_get_l0c2gm_prequant_impl()
39-{
40- if ASC_IS_AIC {
41- asc_capi_fpc_reg_config config;
42- config.config = get_fpc();
43- return static_cast<uint64_t>(config.quant_units);
44- }
45- return 0;
46-}
47- 
48-__aicore__ inline uint64_t asc_get_l0c2gm_unitflag_impl()
49-{
50- if ASC_IS_AIC {
51- asc_capi_fpc_reg_config config;
52- config.config = get_fpc();
53- return static_cast<uint64_t>(config.unit_flag);
54- }
55- return 0;
56-}
57- 
58-#endif
59- 
60-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
61-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
62-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
63-#endif
@@ -1,45 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_mmad_sparse_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_MMAD_SPARSE_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_MMAD_SPARSE_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
22- 
23-__aicore__ inline void asc_mmad_sparse_impl(
24- __cc__ int32_t* c, __ca__ int8_t* a, __cb__ int8_t* b, uint16_t m, uint16_t k, uint16_t n, uint8_t unit_flag,
25- bool c_matrix_source, bool c_matrix_init_val)
26-{
27- if ASC_IS_AIC {
28- mad_sp(c, a, b, m, k, n, unit_flag, c_matrix_source, c_matrix_init_val);
29- }
30-}
31- 
32-__aicore__ inline void asc_mmad_sparse_sync_impl(
33- __cc__ int32_t* c, __ca__ int8_t* a, __cb__ int8_t* b, uint16_t m, uint16_t k, uint16_t n, uint8_t unit_flag,
34- bool c_matrix_source, bool c_matrix_init_val)
35-{
36- asc_mmad_sparse_impl(c, a, b, m, k, n, unit_flag, c_matrix_source, c_matrix_init_val);
37- asc_sync_post_process();
38-}
39- 
40-#endif
41- 
42-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
43-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
44-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
45-#endif
@@ -1,34 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_set_fp32_mode_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_FP32_MODE_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_FP32_MODE_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
22- 
23-__aicore__ inline void asc_set_fp32_mode_impl()
24-{
25- constexpr int32_t HF32_MODE_BIT = 46;
26- set_ctrl(sbitset0(get_ctrl(), HF32_MODE_BIT));
27-}
28- 
29-#endif
30- 
31-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
32-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
33-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
34-#endif
@@ -1,43 +0,0 @@
1-/**
2- * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_hf32_round_mode_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_set_hf32_round_mode_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_HF32_ROUND_MODE_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_HF32_ROUND_MODE_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_set_hf32_round_mode_impl(asc_hf32_round_mode hf32_round_mode)
29-{
30- constexpr int32_t HF32_TRANS_MODE_BIT = 47;
31- if (hf32_round_mode == asc_hf32_round_mode::NEAREST_AWAY) {
32- set_ctrl(sbitset1(get_ctrl(), HF32_TRANS_MODE_BIT));
33- } else {
34- set_ctrl(sbitset0(get_ctrl(), HF32_TRANS_MODE_BIT));
35- }
36-}
37- 
38-#endif
39- 
40-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
41-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
42-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
43-#endif
@@ -1,38 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_mmad_direction_m_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_set_mmad_direction_m_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_MMAD_DIRECTION_M_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_MMAD_DIRECTION_M_IMPL_H
25-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
26- 
27-__aicore__ inline void asc_set_mmad_direction_m_impl()
28-{
29- constexpr int32_t capi_mm_layout_mode_bit = 51;
30- set_ctrl(sbitset0(get_ctrl(), capi_mm_layout_mode_bit));
31-}
32- 
33-#endif
34- 
35-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
36-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
37-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
38-#endif
@@ -1,38 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_set_mmad_direction_n_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_set_mmad_direction_n_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_MMAD_DIRECTION_N_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_COMPUTE_IMPL_ASC_SET_MMAD_DIRECTION_N_IMPL_H
25-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
26- 
27-__aicore__ inline void asc_set_mmad_direction_n_impl()
28-{
29- constexpr int32_t capi_mm_layout_mode_bit = 51;
30- set_ctrl(sbitset1(get_ctrl(), capi_mm_layout_mode_bit));
31-}
32- 
33-#endif
34- 
35-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
36-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
37-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
38-#endif
@@ -1,157 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_copy_gm2l0a_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/cube_datamove_impl/asc_copy_gm2l0a_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L0A_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L0A_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-__aicore__ inline void asc_copy_gm2l0a_impl(
29- __ca__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
30- uint16_t dst_gap)
31-{
32- if ASC_IS_AIC {
33- load_gm_to_ca(dst, src, base_idx, repeat, src_stride, dst_gap, 0, inc);
34- }
35-}
36- 
37-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
38- __ca__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
39- uint16_t dst_gap)
40-{
41- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
42- asc_sync_post_process();
43-}
44- 
45-__aicore__ inline void asc_copy_gm2l0a_impl(
46- __ca__ half* dst, __gm__ half* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
47-{
48- if ASC_IS_AIC {
49- load_gm_to_ca(dst, src, base_idx, repeat, src_stride, dst_gap, 0, inc);
50- }
51-}
52- 
53-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
54- __ca__ half* dst, __gm__ half* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
55-{
56- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
57- asc_sync_post_process();
58-}
59- 
60-__aicore__ inline void asc_copy_gm2l0a_impl(
61- __ca__ float* dst, __gm__ float* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
62-{
63- if ASC_IS_AIC {
64- load_gm_to_ca(dst, src, base_idx, repeat, src_stride, dst_gap, 0, inc);
65- }
66-}
67- 
68-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
69- __ca__ float* dst, __gm__ float* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
70-{
71- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
72- asc_sync_post_process();
73-}
74- 
75-__aicore__ inline void asc_copy_gm2l0a_impl(
76- __ca__ int32_t* dst, __gm__ int32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
77-{
78- if ASC_IS_AIC {
79- load_gm_to_ca(dst, src, base_idx, repeat, src_stride, dst_gap, 0, inc);
80- }
81-}
82- 
83-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
84- __ca__ int32_t* dst, __gm__ int32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
85-{
86- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
87- asc_sync_post_process();
88-}
89- 
90-__aicore__ inline void asc_copy_gm2l0a_impl(
91- __ca__ uint8_t* dst, __gm__ uint8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
92-{
93- if ASC_IS_AIC {
94- load_gm_to_ca(dst, src, base_idx, repeat, src_stride, dst_gap, 0, inc);
95- }
96-}
97- 
98-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
99- __ca__ uint8_t* dst, __gm__ uint8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
100-{
101- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
102- asc_sync_post_process();
103-}
104- 
105-__aicore__ inline void asc_copy_gm2l0a_impl(
106- __ca__ int8_t* dst, __gm__ int8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
107-{
108- if ASC_IS_AIC {
109- load_gm_to_ca(dst, src, base_idx, repeat, src_stride, dst_gap, 0, inc);
110- }
111-}
112- 
113-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
114- __ca__ int8_t* dst, __gm__ int8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
115-{
116- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
117- asc_sync_post_process();
118-}
119- 
120-__aicore__ inline void asc_copy_gm2l0a_impl(
121- __ca__ uint32_t* dst, __gm__ uint32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
122- uint16_t dst_gap)
123-{
124- if ASC_IS_AIC {
125- load_gm_to_ca(dst, src, base_idx, repeat, src_stride, dst_gap, 0, inc);
126- }
127-}
128- 
129-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
130- __ca__ uint32_t* dst, __gm__ uint32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
131- uint16_t dst_gap)
132-{
133- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
134- asc_sync_post_process();
135-}
136- 
137-__aicore__ inline void asc_copy_gm2l0a_impl(
138- __ca__ int4b_t* dst, __gm__ int4b_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
139-{
140- if ASC_IS_AIC {
141- load_gm_to_ca_s4((__ca__ void*)dst, (__gm__ void*)src, base_idx, repeat, src_stride, dst_gap, 0, inc);
142- }
143-}
144- 
145-__aicore__ inline void asc_copy_gm2l0a_sync_impl(
146- __ca__ int4b_t* dst, __gm__ int4b_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
147-{
148- asc_copy_gm2l0a_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
149- asc_sync_post_process();
150-}
151- 
152-#endif
153- 
154-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
155-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
156-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
157-#endif
@@ -1,151 +0,0 @@
1-/**
2- * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/instr_impl/npu_arch_2201/cube_datamove_impl/asc_copy_gm2l0b_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L0B_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L0B_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
22- 
23-__aicore__ inline void asc_copy_gm2l0b_impl(
24- __cb__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
25- uint16_t dst_gap)
26-{
27- if ASC_IS_AIC {
28- load_gm_to_cb(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
29- }
30-}
31- 
32-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
33- __cb__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
34- uint16_t dst_gap)
35-{
36- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
37- asc_sync_post_process();
38-}
39- 
40-__aicore__ inline void asc_copy_gm2l0b_impl(
41- __cb__ half* dst, __gm__ half* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
42-{
43- if ASC_IS_AIC {
44- load_gm_to_cb(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
45- }
46-}
47- 
48-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
49- __cb__ half* dst, __gm__ half* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
50-{
51- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
52- asc_sync_post_process();
53-}
54- 
55-__aicore__ inline void asc_copy_gm2l0b_impl(
56- __cb__ float* dst, __gm__ float* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
57-{
58- if ASC_IS_AIC {
59- load_gm_to_cb(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
60- }
61-}
62- 
63-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
64- __cb__ float* dst, __gm__ float* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
65-{
66- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
67- asc_sync_post_process();
68-}
69- 
70-__aicore__ inline void asc_copy_gm2l0b_impl(
71- __cb__ int32_t* dst, __gm__ int32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
72-{
73- if ASC_IS_AIC {
74- load_gm_to_cb(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
75- }
76-}
77- 
78-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
79- __cb__ int32_t* dst, __gm__ int32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
80-{
81- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
82- asc_sync_post_process();
83-}
84- 
85-__aicore__ inline void asc_copy_gm2l0b_impl(
86- __cb__ int8_t* dst, __gm__ int8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
87-{
88- if ASC_IS_AIC {
89- load_gm_to_cb(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
90- }
91-}
92- 
93-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
94- __cb__ int8_t* dst, __gm__ int8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
95-{
96- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
97- asc_sync_post_process();
98-}
99- 
100-__aicore__ inline void asc_copy_gm2l0b_impl(
101- __cb__ uint32_t* dst, __gm__ uint32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
102- uint16_t dst_gap)
103-{
104- if ASC_IS_AIC {
105- load_gm_to_cb(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
106- }
107-}
108- 
109-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
110- __cb__ uint32_t* dst, __gm__ uint32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
111- uint16_t dst_gap)
112-{
113- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
114- asc_sync_post_process();
115-}
116- 
117-__aicore__ inline void asc_copy_gm2l0b_impl(
118- __cb__ uint8_t* dst, __gm__ uint8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
119-{
120- if ASC_IS_AIC {
121- load_gm_to_cb(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
122- }
123-}
124- 
125-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
126- __cb__ uint8_t* dst, __gm__ uint8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
127-{
128- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
129- asc_sync_post_process();
130-}
131- 
132-__aicore__ inline void asc_copy_gm2l0b_impl(
133- __cb__ int4b_t* dst, __gm__ int4b_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
134-{
135- if ASC_IS_AIC {
136- load_gm_to_cb_s4(dst, src, base_idx, repeat, src_stride, dst_gap, 0, addr_cal_mode_t::inc);
137- }
138-}
139- 
140-__aicore__ inline void asc_copy_gm2l0b_sync_impl(
141- __cb__ int4b_t* dst, __gm__ int4b_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
142-{
143- asc_copy_gm2l0b_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
144- asc_sync_post_process();
145-}
146-#endif
147- 
148-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
149-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
150-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
151-#endif
@@ -1,326 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_copy_gm2l1_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/npu_arch_2201/cube_datamove_impl/asc_copy_gm2l1_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L1_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L1_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-// PAD_NONE
29-__aicore__ inline void asc_copy_gm2l1_impl(
30- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
31-{
32- if ASC_IS_AIC {
33- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_NONE);
34- }
35-}
36- 
37-__aicore__ inline void asc_copy_gm2l1_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
38-{
39- asc_copy_gm2l1_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
40-}
41- 
42-__aicore__ inline void asc_copy_gm2l1_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
43-{
44- asc_copy_gm2l1_impl(dst, src, size);
45- asc_sync_post_process();
46-}
47- 
48-// PAD_MODE1
49-__aicore__ inline void asc_copy_gm2l1_pad1_impl(
50- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
51-{
52- if ASC_IS_AIC {
53- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE1);
54- }
55-}
56- 
57-__aicore__ inline void asc_copy_gm2l1_pad1_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
58-{
59- asc_copy_gm2l1_pad1_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
60-}
61- 
62-__aicore__ inline void asc_copy_gm2l1_pad1_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
63-{
64- asc_copy_gm2l1_pad1_impl(dst, src, size);
65- asc_sync_post_process();
66-}
67- 
68-// PAD_MODE2
69-__aicore__ inline void asc_copy_gm2l1_pad2_impl(
70- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
71-{
72- if ASC_IS_AIC {
73- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE2);
74- }
75-}
76- 
77-__aicore__ inline void asc_copy_gm2l1_pad2_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
78-{
79- asc_copy_gm2l1_pad2_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
80-}
81- 
82-__aicore__ inline void asc_copy_gm2l1_pad2_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
83-{
84- asc_copy_gm2l1_pad2_impl(dst, src, size);
85- asc_sync_post_process();
86-}
87- 
88-// PAD_MODE3
89-__aicore__ inline void asc_copy_gm2l1_pad3_impl(
90- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
91-{
92- if ASC_IS_AIC {
93- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE3);
94- }
95-}
96- 
97-__aicore__ inline void asc_copy_gm2l1_pad3_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
98-{
99- asc_copy_gm2l1_pad3_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
100-}
101- 
102-__aicore__ inline void asc_copy_gm2l1_pad3_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
103-{
104- asc_copy_gm2l1_pad3_impl(dst, src, size);
105- asc_sync_post_process();
106-}
107- 
108-// PAD_MODE4
109-__aicore__ inline void asc_copy_gm2l1_pad4_impl(
110- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
111-{
112- if ASC_IS_AIC {
113- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE4);
114- }
115-}
116- 
117-__aicore__ inline void asc_copy_gm2l1_pad4_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
118-{
119- asc_copy_gm2l1_pad4_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
120-}
121- 
122-__aicore__ inline void asc_copy_gm2l1_pad4_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
123-{
124- asc_copy_gm2l1_pad4_impl(dst, src, size);
125- asc_sync_post_process();
126-}
127- 
128-// PAD_MODE5
129-__aicore__ inline void asc_copy_gm2l1_pad5_impl(
130- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
131-{
132- if ASC_IS_AIC {
133- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE5);
134- }
135-}
136- 
137-__aicore__ inline void asc_copy_gm2l1_pad5_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
138-{
139- asc_copy_gm2l1_pad5_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
140-}
141- 
142-__aicore__ inline void asc_copy_gm2l1_pad5_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
143-{
144- asc_copy_gm2l1_pad5_impl(dst, src, size);
145- asc_sync_post_process();
146-}
147- 
148-// PAD_MODE6
149-__aicore__ inline void asc_copy_gm2l1_pad6_impl(
150- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
151-{
152- if ASC_IS_AIC {
153- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE6);
154- }
155-}
156- 
157-__aicore__ inline void asc_copy_gm2l1_pad6_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
158-{
159- asc_copy_gm2l1_pad6_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
160-}
161- 
162-__aicore__ inline void asc_copy_gm2l1_pad6_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
163-{
164- asc_copy_gm2l1_pad6_impl(dst, src, size);
165- asc_sync_post_process();
166-}
167- 
168-// PAD_MODE7
169-__aicore__ inline void asc_copy_gm2l1_pad7_impl(
170- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
171-{
172- if ASC_IS_AIC {
173- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE7);
174- }
175-}
176- 
177-__aicore__ inline void asc_copy_gm2l1_pad7_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
178-{
179- asc_copy_gm2l1_pad7_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
180-}
181- 
182-__aicore__ inline void asc_copy_gm2l1_pad7_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
183-{
184- asc_copy_gm2l1_pad7_impl(dst, src, size);
185- asc_sync_post_process();
186-}
187- 
188-// PAD_MODE8
189-__aicore__ inline void asc_copy_gm2l1_pad8_impl(
190- __cbuf__ void* dst, __gm__ void* src, uint16_t n_burst, uint16_t len_burst, uint16_t src_gap, uint16_t dst_gap)
191-{
192- if ASC_IS_AIC {
193- copy_gm_to_cbuf(dst, src, 0, n_burst, len_burst, src_gap, dst_gap, PAD_MODE8);
194- }
195-}
196- 
197-__aicore__ inline void asc_copy_gm2l1_pad8_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
198-{
199- asc_copy_gm2l1_pad8_impl(dst, src, 1, size / ASC_C_API_ONE_DATABLOCK_SIZE, 0, 0);
200-}
201- 
202-__aicore__ inline void asc_copy_gm2l1_pad8_sync_impl(__cbuf__ void* dst, __gm__ void* src, uint32_t size)
203-{
204- asc_copy_gm2l1_pad8_impl(dst, src, size);
205- asc_sync_post_process();
206-}
207- 
208-__aicore__ inline void asc_copy_gm2l1_impl(
209- __cbuf__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
210- uint16_t dst_gap)
211-{
212- if ASC_IS_AIC {
213- load_gm_to_cbuf(dst, src, base_idx, repeat, src_stride, dst_gap, static_cast<uint8_t>(0), addr_cal_mode_t::inc);
214- }
215-}
216- 
217-__aicore__ inline void asc_copy_gm2l1_sync_impl(
218- __cbuf__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
219- uint16_t dst_gap)
220-{
221- asc_copy_gm2l1_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
222- asc_sync_post_process();
223-}
224- 
225-__aicore__ inline void asc_copy_gm2l1_impl(
226- __cbuf__ half* dst, __gm__ half* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
227-{
228- if ASC_IS_AIC {
229- load_gm_to_cbuf(dst, src, base_idx, repeat, src_stride, dst_gap, static_cast<uint8_t>(0), addr_cal_mode_t::inc);
230- }
231-}
232- 
233-__aicore__ inline void asc_copy_gm2l1_sync_impl(
234- __cbuf__ half* dst, __gm__ half* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
235-{
236- asc_copy_gm2l1_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
237- asc_sync_post_process();
238-}
239- 
240-__aicore__ inline void asc_copy_gm2l1_impl(
241- __cbuf__ float* dst, __gm__ float* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
242-{
243- if ASC_IS_AIC {
244- load_gm_to_cbuf(dst, src, base_idx, repeat, src_stride, dst_gap, static_cast<uint8_t>(0), addr_cal_mode_t::inc);
245- }
246-}
247- 
248-__aicore__ inline void asc_copy_gm2l1_sync_impl(
249- __cbuf__ float* dst, __gm__ float* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
250-{
251- asc_copy_gm2l1_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
252- asc_sync_post_process();
253-}
254- 
255-__aicore__ inline void asc_copy_gm2l1_impl(
256- __cbuf__ int32_t* dst, __gm__ int32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
257- uint16_t dst_gap)
258-{
259- if ASC_IS_AIC {
260- load_gm_to_cbuf(dst, src, base_idx, repeat, src_stride, dst_gap, static_cast<uint8_t>(0), addr_cal_mode_t::inc);
261- }
262-}
263- 
264-__aicore__ inline void asc_copy_gm2l1_sync_impl(
265- __cbuf__ int32_t* dst, __gm__ int32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
266- uint16_t dst_gap)
267-{
268- asc_copy_gm2l1_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
269- asc_sync_post_process();
270-}
271- 
272-__aicore__ inline void asc_copy_gm2l1_impl(
273- __cbuf__ int8_t* dst, __gm__ int8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
274-{
275- if ASC_IS_AIC {
276- load_gm_to_cbuf(dst, src, base_idx, repeat, src_stride, dst_gap, static_cast<uint8_t>(0), addr_cal_mode_t::inc);
277- }
278-}
279- 
280-__aicore__ inline void asc_copy_gm2l1_sync_impl(
281- __cbuf__ int8_t* dst, __gm__ int8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride, uint16_t dst_gap)
282-{
283- asc_copy_gm2l1_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
284- asc_sync_post_process();
285-}
286- 
287-__aicore__ inline void asc_copy_gm2l1_impl(
288- __cbuf__ uint32_t* dst, __gm__ uint32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
289- uint16_t dst_gap)
290-{
291- if ASC_IS_AIC {
292- load_gm_to_cbuf(dst, src, base_idx, repeat, src_stride, dst_gap, static_cast<uint8_t>(0), addr_cal_mode_t::inc);
293- }
294-}
295- 
296-__aicore__ inline void asc_copy_gm2l1_sync_impl(
297- __cbuf__ uint32_t* dst, __gm__ uint32_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
298- uint16_t dst_gap)
299-{
300- asc_copy_gm2l1_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
301- asc_sync_post_process();
302-}
303- 
304-__aicore__ inline void asc_copy_gm2l1_impl(
305- __cbuf__ uint8_t* dst, __gm__ uint8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
306- uint16_t dst_gap)
307-{
308- if ASC_IS_AIC {
309- load_gm_to_cbuf(dst, src, base_idx, repeat, src_stride, dst_gap, static_cast<uint8_t>(0), addr_cal_mode_t::inc);
310- }
311-}
312- 
313-__aicore__ inline void asc_copy_gm2l1_sync_impl(
314- __cbuf__ uint8_t* dst, __gm__ uint8_t* src, uint16_t base_idx, uint8_t repeat, uint16_t src_stride,
315- uint16_t dst_gap)
316-{
317- asc_copy_gm2l1_impl(dst, src, base_idx, repeat, src_stride, dst_gap);
318- asc_sync_post_process();
319-}
320- 
321-#endif
322- 
323-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
324-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
325-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
326-#endif
@@ -1,225 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-/* !
12- * \file asc_copy_gm2l1_nd2nz_impl.h
13- * \brief
14- */
15- 
16-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
17-#warning \
18- "impl/c_api/instr_impl/npu_arch_2201/npu_arch_2201/cube_datamove_impl/asc_copy_gm2l1_nd2nz_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
19-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
20-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
21-#endif
22- 
23-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L1_ND2NZ_IMPL_H
24-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_GM2L1_ND2NZ_IMPL_H
25- 
26-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
27- 
28-// copy_gm2l1_nd2nz_b8 int8_t
29-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
30- __cbuf__ int8_t* dst, __gm__ int8_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
31- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
32- uint16_t dst_nz_matrix_stride)
33-{
34- if ASC_IS_AIC {
35- copy_gm_to_cbuf_multi_nd2nz_b8(
36- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
37- dst_nz_matrix_stride);
38- }
39-}
40- 
41-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
42- __cbuf__ int8_t* dst, __gm__ int8_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
43- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
44- uint16_t dst_nz_matrix_stride)
45-{
46- asc_copy_gm2l1_nd2nz_impl(
47- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
48- dst_nz_matrix_stride);
49- asc_sync_post_process();
50-}
51- 
52-// copy_gm2l1_nd2nz_b8 uint8_t
53-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
54- __cbuf__ uint8_t* dst, __gm__ uint8_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
55- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
56- uint16_t dst_nz_matrix_stride)
57-{
58- if ASC_IS_AIC {
59- copy_gm_to_cbuf_multi_nd2nz_b8(
60- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
61- dst_nz_matrix_stride);
62- }
63-}
64- 
65-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
66- __cbuf__ uint8_t* dst, __gm__ uint8_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
67- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
68- uint16_t dst_nz_matrix_stride)
69-{
70- asc_copy_gm2l1_nd2nz_impl(
71- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
72- dst_nz_matrix_stride);
73- asc_sync_post_process();
74-}
75- 
76-// copy_gm2l1_nd2nz_b16 bfloat16
77-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
78- __cbuf__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
79- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
80- uint16_t dst_nz_matrix_stride)
81-{
82- if ASC_IS_AIC {
83- copy_gm_to_cbuf_multi_nd2nz_b16(
84- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
85- dst_nz_matrix_stride);
86- }
87-}
88- 
89-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
90- __cbuf__ bfloat16_t* dst, __gm__ bfloat16_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
91- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
92- uint16_t dst_nz_matrix_stride)
93-{
94- asc_copy_gm2l1_nd2nz_impl(
95- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
96- dst_nz_matrix_stride);
97- asc_sync_post_process();
98-}
99- 
100-// copy_gm2l1_nd2nz_b16 half
101-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
102- __cbuf__ half* dst, __gm__ half* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
103- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
104- uint16_t dst_nz_matrix_stride)
105-{
106- if ASC_IS_AIC {
107- copy_gm_to_cbuf_multi_nd2nz_b16(
108- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
109- dst_nz_matrix_stride);
110- }
111-}
112- 
113-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
114- __cbuf__ half* dst, __gm__ half* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
115- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
116- uint16_t dst_nz_matrix_stride)
117-{
118- asc_copy_gm2l1_nd2nz_impl(
119- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
120- dst_nz_matrix_stride);
121- asc_sync_post_process();
122-}
123- 
124-// copy_gm2l1_nd2nz_b16 int16_t
125-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
126- __cbuf__ int16_t* dst, __gm__ int16_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
127- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
128- uint16_t dst_nz_matrix_stride)
129-{
130- if ASC_IS_AIC {
131- copy_gm_to_cbuf_multi_nd2nz_b16(
132- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
133- dst_nz_matrix_stride);
134- }
135-}
136- 
137-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
138- __cbuf__ int16_t* dst, __gm__ int16_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
139- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
140- uint16_t dst_nz_matrix_stride)
141-{
142- asc_copy_gm2l1_nd2nz_impl(
143- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
144- dst_nz_matrix_stride);
145- asc_sync_post_process();
146-}
147- 
148-// copy_gm2l1_nd2nz_b32s float
149-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
150- __cbuf__ float* dst, __gm__ float* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
151- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
152- uint16_t dst_nz_matrix_stride)
153-{
154- if ASC_IS_AIC {
155- copy_gm_to_cbuf_multi_nd2nz_b32s(
156- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
157- dst_nz_matrix_stride);
158- }
159-}
160- 
161-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
162- __cbuf__ float* dst, __gm__ float* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
163- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
164- uint16_t dst_nz_matrix_stride)
165-{
166- asc_copy_gm2l1_nd2nz_impl(
167- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
168- dst_nz_matrix_stride);
169- asc_sync_post_process();
170-}
171- 
172-// copy_gm2l1_nd2nz_b32s int32_t
173-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
174- __cbuf__ int32_t* dst, __gm__ int32_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
175- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
176- uint16_t dst_nz_matrix_stride)
177-{
178- if ASC_IS_AIC {
179- copy_gm_to_cbuf_multi_nd2nz_b32s(
180- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
181- dst_nz_matrix_stride);
182- }
183-}
184- 
185-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
186- __cbuf__ int32_t* dst, __gm__ int32_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
187- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
188- uint16_t dst_nz_matrix_stride)
189-{
190- asc_copy_gm2l1_nd2nz_impl(
191- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
192- dst_nz_matrix_stride);
193- asc_sync_post_process();
194-}
195- 
196-// copy_gm2l1_nd2nz_b32s uint32_t
197-__aicore__ inline void asc_copy_gm2l1_nd2nz_impl(
198- __cbuf__ uint32_t* dst, __gm__ uint32_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
199- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
200- uint16_t dst_nz_matrix_stride)
201-{
202- if ASC_IS_AIC {
203- copy_gm_to_cbuf_multi_nd2nz_b32s(
204- dst, src, 0, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
205- dst_nz_matrix_stride);
206- }
207-}
208- 
209-__aicore__ inline void asc_copy_gm2l1_nd2nz_sync_impl(
210- __cbuf__ uint32_t* dst, __gm__ uint32_t* src, uint16_t nd_num, uint16_t n_value, uint16_t d_value,
211- uint16_t src_nd_matrix_stride, uint16_t src_d_value, uint16_t dst_nz_c0_stride, uint16_t dst_nz_n_stride,
212- uint16_t dst_nz_matrix_stride)
213-{
214- asc_copy_gm2l1_nd2nz_impl(
215- dst, src, nd_num, n_value, d_value, src_nd_matrix_stride, src_d_value, dst_nz_c0_stride, dst_nz_n_stride,
216- dst_nz_matrix_stride);
217- asc_sync_post_process();
218-}
219- 
220-#endif
221- 
222-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
223-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
224-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
225-#endif
@@ -1,235 +0,0 @@
1-/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.
9- */
10- 
11-#if !defined(ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS)
12-#warning \
13- "impl/c_api/instr_impl/npu_arch_2201/cube_datamove_impl/asc_copy_l0c2gm_impl.h is an internal header file and must not be used directly. Functions or variables defined in this file maybe removed in the future. Please use "#include "c_api/asc_simd.h"" and use public functions or variables defined in interface headers files."
14-#define ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
15-#define UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
16-#endif
17- 
18-#ifndef IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_L0C2GM_IMPL_H
19-#define IMPL_C_API_INSTR_IMPL_NPU_ARCH_2201_CUBE_DATAMOVE_IMPL_ASC_COPY_L0C2GM_IMPL_H
20- 
21-#include "impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h"
22- 
23-__aicore__ inline void asc_copy_l0c2gm_impl(
24- __gm__ half* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
25- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
26- bool nz2nd_en)
27-{
28- if ASC_IS_AIC {
29- copy_matrix_cc_to_gm(
30- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
31- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
32- }
33-}
34- 
35-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
36- __gm__ half* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
37- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
38- bool nz2nd_en)
39-{
40- asc_copy_l0c2gm_impl(
41- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
42- nz2nd_en);
43- asc_sync_post_process();
44-}
45- 
46-__aicore__ inline void asc_copy_l0c2gm_impl(
47- __gm__ bfloat16_t* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
48- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
49- bool nz2nd_en)
50-{
51- if ASC_IS_AIC {
52- copy_matrix_cc_to_gm(
53- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
54- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
55- }
56-}
57- 
58-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
59- __gm__ bfloat16_t* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
60- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
61- bool nz2nd_en)
62-{
63- asc_copy_l0c2gm_impl(
64- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
65- nz2nd_en);
66- asc_sync_post_process();
67-}
68- 
69-__aicore__ inline void asc_copy_l0c2gm_impl(
70- __gm__ int8_t* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
71- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
72- bool nz2nd_en)
73-{
74- if ASC_IS_AIC {
75- copy_matrix_cc_to_gm(
76- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
77- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
78- }
79-}
80- 
81-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
82- __gm__ int8_t* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
83- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
84- bool nz2nd_en)
85-{
86- asc_copy_l0c2gm_impl(
87- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
88- nz2nd_en);
89- asc_sync_post_process();
90-}
91- 
92-__aicore__ inline void asc_copy_l0c2gm_impl(
93- __gm__ uint8_t* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
94- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
95- bool nz2nd_en)
96-{
97- if ASC_IS_AIC {
98- copy_matrix_cc_to_gm(
99- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
100- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
101- }
102-}
103- 
104-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
105- __gm__ uint8_t* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
106- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
107- bool nz2nd_en)
108-{
109- asc_copy_l0c2gm_impl(
110- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
111- nz2nd_en);
112- asc_sync_post_process();
113-}
114- 
115-__aicore__ inline void asc_copy_l0c2gm_impl(
116- __gm__ float* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
117- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
118- bool nz2nd_en)
119-{
120- if ASC_IS_AIC {
121- copy_matrix_cc_to_gm(
122- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
123- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
124- }
125-}
126- 
127-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
128- __gm__ float* dst, __cc__ float* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
129- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
130- bool nz2nd_en)
131-{
132- asc_copy_l0c2gm_impl(
133- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
134- nz2nd_en);
135- asc_sync_post_process();
136-}
137- 
138-__aicore__ inline void asc_copy_l0c2gm_impl(
139- __gm__ half* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
140- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
141- bool nz2nd_en)
142-{
143- if ASC_IS_AIC {
144- copy_matrix_cc_to_gm(
145- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
146- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
147- }
148-}
149- 
150-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
151- __gm__ half* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
152- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
153- bool nz2nd_en)
154-{
155- asc_copy_l0c2gm_impl(
156- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
157- nz2nd_en);
158- asc_sync_post_process();
159-}
160- 
161-__aicore__ inline void asc_copy_l0c2gm_impl(
162- __gm__ int16_t* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
163- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
164- bool nz2nd_en)
165-{
166- if ASC_IS_AIC {
167- copy_matrix_cc_to_gm(
168- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
169- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
170- }
171-}
172- 
173-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
174- __gm__ int16_t* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
175- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
176- bool nz2nd_en)
177-{
178- asc_copy_l0c2gm_impl(
179- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
180- nz2nd_en);
181- asc_sync_post_process();
182-}
183- 
184-__aicore__ inline void asc_copy_l0c2gm_impl(
185- __gm__ int8_t* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
186- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
187- bool nz2nd_en)
188-{
189- if ASC_IS_AIC {
190- copy_matrix_cc_to_gm(
191- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
192- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
193- }
194-}
195- 
196-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
197- __gm__ int8_t* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
198- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
199- bool nz2nd_en)
200-{
201- asc_copy_l0c2gm_impl(
202- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
203- nz2nd_en);
204- asc_sync_post_process();
205-}
206- 
207-__aicore__ inline void asc_copy_l0c2gm_impl(
208- __gm__ int32_t* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
209- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
210- bool nz2nd_en)
211-{
212- if ASC_IS_AIC {
213- copy_matrix_cc_to_gm(
214- dst, src, 0, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode,
215- static_cast<QuantMode_t>(quant_pre), relu_pre, channel_split, nz2nd_en);
216- }
217-}
218- 
219-__aicore__ inline void asc_copy_l0c2gm_sync_impl(
220- __gm__ int32_t* dst, __cc__ int32_t* src, uint16_t n_size, uint16_t m_size, uint32_t dst_stride_dst_d,
221- uint16_t src_stride, uint8_t unit_flag_mode, uint64_t quant_pre, uint8_t relu_pre, bool channel_split,
222- bool nz2nd_en)
223-{
224- asc_copy_l0c2gm_impl(
225- dst, src, n_size, m_size, dst_stride_dst_d, src_stride, unit_flag_mode, quant_pre, relu_pre, channel_split,
226- nz2nd_en);
227- asc_sync_post_process();
228-}
229- 
230-#endif
231- 
232-#if defined(UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC)
233-#undef ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS
234-#undef UNDEF_ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS_ASCENDC
235-#endif
Rimpl/c_api/instr_impl/npu_arch_2201/cache_ctrl_impl/asc_dcci_impl.h→impl/c_api/memory_base_impl/cache_ctrl_intf_impl.h+16-17
Rimpl/c_api/instr_impl/npu_arch_2201/cube_compute_impl.h→impl/c_api/memory_base_impl/cube_compute_composite_intf_impl.h+61-214
Rimpl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_mmad_impl.h→impl/c_api/memory_base_impl/cube_compute_intf_impl.h+195-188
Rimpl/c_api/instr_impl/npu_arch_2201/cube_datamove_impl.h→impl/c_api/memory_base_impl/cube_datamove_composite_intf_impl.h+749-1536
Rimpl/c_api/instr_impl/npu_arch_2201/misc_impl.h→impl/c_api/memory_base_impl/scalar_atomic_intf_impl.h+17-6
Rimpl/c_api/instr_impl/npu_arch_2201/cube_datamove_impl/asc_set_l0c2gm_lrelu_alpha_impl.h→impl/c_api/memory_base_impl/scalar_bit_intf_impl.h+16-21
Rimpl/c_api/instr_impl/npu_arch_3510/scalar_compute_impl/asc_popc_impl.h→impl/c_api/memory_base_impl/spr_intf_impl.h+7-5
Rimpl/c_api/instr_impl/npu_arch_2201/sync_impl/asc_wait_flag_impl.h→impl/c_api/memory_base_impl/sync_intf_impl.h+277-6
Rimpl/c_api/instr_impl/npu_arch_2201/misc_impl/init_soc_state_impl.h→impl/c_api/memory_base_impl/sys_init_intf_impl.h+7-7
Rimpl/c_api/instr_impl/npu_arch_2201/sync_impl/asc_sync_subblock_arrive_impl.h→impl/c_api/memory_base_impl/sys_var_intf_impl.h+38-33
Rimpl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h→impl/c_api/memory_base_impl/utils_impl.h+17-14
Rimpl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/asc_duplicate_impl.h→impl/c_api/memory_base_impl/vector_broadcast_intf_impl.h+42-70
Rimpl/c_api/instr_impl/npu_arch_2201/vector_datamove_impl.h→impl/c_api/memory_base_impl/vector_datamove_intf_impl.h+269-223
Rimpl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/asc_gather_impl.h→impl/c_api/memory_base_impl/vector_gather_intf_impl.h+44-88
Rimpl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/asc_set_vector_mask_impl.h→impl/c_api/memory_base_impl/vector_mask_config_intf_impl.h+21-5
Rimpl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/asc_mrgsort4_impl.h→impl/c_api/memory_base_impl/vector_sort_intf_impl.h+25-31
Rimpl/c_api/instr_impl/npu_arch_3510/sys_var_impl/asc_get_pipe_idle_slot_count_impl.h→impl/c_api/reg_base_impl/asc_get_pipe_idle_slot_count_intf_impl.h+5-5
Rimpl/c_api/instr_impl/npu_arch_3510/cache_ctrl_impl.h→impl/c_api/reg_base_impl/cache_ctrl_intf_impl.h+46-40
Rimpl/c_api/instr_impl/npu_arch_3510/atomic_impl/asc_set_atomic_none_impl.h→impl/c_api/reg_base_impl/cube_compute_composite_intf_impl.h+7-12
Rimpl/c_api/instr_impl/npu_arch_3510/cube_compute_impl.h→impl/c_api/reg_base_impl/cube_compute_intf_impl.h+290-319
Rimpl/c_api/instr_impl/npu_arch_3510/misc_impl/asc_nop_impl.h→impl/c_api/reg_base_impl/cube_datamove_composite_intf_impl.h+7-9
Rimpl/c_api/instr_impl/npu_arch_3510/atomic_impl.h→impl/c_api/reg_base_impl/datamove_atomic_intf_impl.h+118-100
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/reg_load/asc_loadunalign_postupdate_impl.h→impl/c_api/reg_base_impl/loadunalign_intf_impl.h+407-45
Rimpl/c_api/instr_impl/npu_arch_3510/cube_compute_impl/asc_mmad_mx_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/cube_compute_composite_intf_impl.h+137-190
Rimpl/c_api/instr_impl/npu_arch_3510/cache_ctrl_impl/asc_dci_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/datamove_atomic_intf_impl.h+30-12
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_fma_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/reg_fused_intf_impl.h+22-17
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_mula_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/reg_logic_intf_impl.h+28-28
Rimpl/c_api/instr_impl/npu_arch_3510/atomic_impl/asc_set_store_atomic_config_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/scalar_atomic_intf_impl.h+15-13
Rimpl/c_api/instr_impl/npu_arch_2201/scalar_compute_impl/asc_popc_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/spr_intf_impl.h+6-5
Rimpl/c_api/instr_impl/npu_arch_2201/sys_var_impl/asc_get_ffts_base_addr_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/sync_intf_impl.h+6-5
Rimpl/c_api/instr_impl/npu_arch_2201/sys_var_impl/asc_get_phy_stack_base_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/sys_var_intf_impl.h+7-10
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/asc_scatter_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/ub_scatter_intf_impl.h+38-30
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/asc_copy_gm2ub_align_impl.h→impl/c_api/reg_base_impl/npu_arch_3510/vector_datamove_intf_impl.h+740-327
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_update_addr_reg_impl.h→impl/c_api/reg_base_impl/reg_addr_reg_intf_impl.h+52-42
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl.h→impl/c_api/reg_base_impl/reg_convert_intf_impl.h+6201-14061
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_copy_impl.h→impl/c_api/reg_base_impl/reg_copy_intf_impl.h+110-23
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_cumulative_histogram_impl.h→impl/c_api/reg_base_impl/reg_histogram_intf_impl.h+21-14
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_arange_impl.h→impl/c_api/reg_base_impl/reg_index_intf_impl.h+85-20
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_update_mask_impl.h→impl/c_api/reg_base_impl/reg_mask_intf_impl.h+13-13
Rimpl/c_api/instr_impl/npu_arch_3510/scalar_compute_impl.h→impl/c_api/reg_base_impl/scalar_atomic_intf_impl.h+144-258
Rimpl/c_api/instr_impl/npu_arch_3510/misc_impl.h→impl/c_api/reg_base_impl/scalar_bit_intf_impl.h+18-11
Rimpl/c_api/instr_impl/npu_arch_2201/sync_impl/asc_sync_inter_wait_impl.h→impl/c_api/reg_base_impl/scalar_convert_intf_impl.h+11-10
Rimpl/c_api/instr_impl/npu_arch_3510/scalar_compute_impl/asc_load_dev_impl.h→impl/c_api/reg_base_impl/scalar_load_intf_impl.h+13-20
Rimpl/c_api/instr_impl/npu_arch_3510/scalar_compute_impl/asc_store_dev_impl.h→impl/c_api/reg_base_impl/scalar_store_intf_impl.h+14-15
Rimpl/c_api/instr_impl/npu_arch_3510/sys_var_impl/asc_set_saturation_strategy_impl.h→impl/c_api/reg_base_impl/spr_intf_impl.h+37-11
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/reg_store/asc_storealign_impl.h→impl/c_api/reg_base_impl/storealign_intf_impl.h+781-879
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/reg_store/asc_store_impl.h→impl/c_api/reg_base_impl/storeunalign_composite_intf_impl.h+122-110
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/reg_store/asc_storeunalign_postupdate_impl.h→impl/c_api/reg_base_impl/storeunalign_intf_impl.h+568-183
Rimpl/c_api/instr_impl/npu_arch_3510/misc_impl/init_soc_state_impl.h→impl/c_api/reg_base_impl/sys_init_intf_impl.h+6-7
Rimpl/c_api/instr_impl/npu_arch_3510/utils_impl.h→impl/c_api/reg_base_impl/sys_misc_intf_impl.h+8-8
Rimpl/c_api/instr_impl/npu_arch_2201/vector_datamove_impl/asc_copy_ub2ub_impl.h→impl/c_api/reg_base_impl/sys_var_intf_impl.h+33-24
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/reg_store/asc_scatter_impl.h→impl/c_api/reg_base_impl/ub_scatter_intf_impl.h+18-21
Rimpl/c_api/instr_impl/npu_arch_3510/utils_impl/utils_impl.h→impl/c_api/reg_base_impl/utils_impl.h+22-3
Rimpl/c_api/instr_impl/npu_arch_2201/cube_compute_impl/asc_set_l0c2gm_config_impl.h→impl/c_api/reg_base_impl/vector_compute_composite_intf_impl.h+7-17
Rimpl/c_api/instr_impl/npu_arch_3510/vector_datamove_impl/asc_ndim_copy_gm2ub_impl.h→impl/c_api/reg_base_impl/vector_datamove_intf_impl.h+279-141
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_set_vector_mask_impl.h→impl/c_api/reg_base_impl/vector_mask_config_intf_impl.h+6-4
Rimpl/c_api/instr_impl/npu_arch_2201/vector_compute_impl/asc_transto5hd_impl.h→impl/c_api/reg_base_impl/vector_permute_sel_intf_impl.h+283-76
Rimpl/c_api/instr_impl/npu_arch_3510/vector_compute_impl/asc_mrgsort4_impl.h→impl/c_api/reg_base_impl/vector_sort_intf_impl.h+24-35