已合并
feat: rename op_api_def.h to op_api_def_nn.h #8360
FishPotatoChen创建于 8月6日
feat: rename op_api_def.h to op_api_def_nn.h #8360
已合并
FishPotatoChen创建于 8月6日
共 161 个文件变更+312-490
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
18#include "opdev/make_op_executor.h"18#include "opdev/make_op_executor.h"
19#include "opdev/platform.h"19#include "opdev/platform.h"
20#include "aclnn_kernels/common/op_error_check.h"20#include "aclnn_kernels/common/op_error_check.h"
21-#include "op_api/op_api_def.h"21+#include "op_api/op_api_def_nn.h"
22#include "op_api/aclnn_util.h"22#include "op_api/aclnn_util.h"
23 23 
24using namespace op;24using namespace op;
@@ -145,4 +145,4 @@ aclnnStatus aclnnFastGelu(void* workspace, uint64_t workspaceSize, aclOpExecutor
145 145 
146#ifdef __cplusplus146#ifdef __cplusplus
147}147}
148-#endif148+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
17#include "opdev/platform.h"17#include "opdev/platform.h"
18#include "opdev/data_type_utils.h"18#include "opdev/data_type_utils.h"
19#include "aclnn_kernels/common/op_error_check.h"19#include "aclnn_kernels/common/op_error_check.h"
20-#include "op_api/op_api_def.h"20+#include "op_api/op_api_def_nn.h"
21#include "op_api/aclnn_util.h"21#include "op_api/aclnn_util.h"
22 22 
23using namespace op;23using namespace op;
@@ -159,4 +159,4 @@ aclnnStatus aclnnFastGeluBackward(void* workspace, uint64_t workspaceSize, aclOp
159 159 
160#ifdef __cplusplus160#ifdef __cplusplus
161}161}
162-#endif162+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "geglu_v2.h"12#include "geglu_v2.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14#include "aclnn_kernels/reshape.h"14#include "aclnn_kernels/reshape.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18#include "opdev/common_types.h"18#include "opdev/common_types.h"
@@ -252,4 +252,4 @@ aclnnStatus aclnnGeGluV3(void* workspace, uint64_t workspaceSize, aclOpExecutor*
252 252 
253#ifdef __cplusplus253#ifdef __cplusplus
254}254}
255-#endif255+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#include "aclnn_gelu.h"11#include "aclnn_gelu.h"
12#include "gelu.h"12#include "gelu.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "op_api/aclnn_util.h"15#include "op_api/aclnn_util.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/op_dfx.h"17#include "opdev/op_dfx.h"
@@ -131,4 +131,4 @@ aclnnStatus aclnnGelu(void* workspace, uint64_t workspaceSize, aclOpExecutor* ex
131 L2_DFX_PHASE_2(aclnnGelu);131 L2_DFX_PHASE_2(aclnnGelu);
132 132 
133 return CommonOpExecutorRun(workspace, workspaceSize, executor, stream);133 return CommonOpExecutorRun(workspace, workspaceSize, executor, stream);
134-}134+}
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
21#include "opdev/op_dfx.h"21#include "opdev/op_dfx.h"
22#include "opdev/op_log.h"22#include "opdev/op_log.h"
23#include "opdev/platform.h"23#include "opdev/platform.h"
24-#include "op_api/op_api_def.h"24+#include "op_api/op_api_def_nn.h"
25#include "op_api/level2_base.h"25#include "op_api/level2_base.h"
26#include "op_api/aclnn_util.h"26#include "op_api/aclnn_util.h"
27 27 
@@ -207,4 +207,4 @@ aclnnStatus aclnnGeluBackward(void* workspace, uint64_t workspace_size, aclOpExe
207 L2_DFX_PHASE_2(aclnnGeluBackward);207 L2_DFX_PHASE_2(aclnnGeluBackward);
208 // 固定写法,调用框架能力,完成计算208 // 固定写法,调用框架能力,完成计算
209 return CommonOpExecutorRun(workspace, workspace_size, executor, stream);209 return CommonOpExecutorRun(workspace, workspace_size, executor, stream);
210-}210+}
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
25#include "opdev/format_utils.h"25#include "opdev/format_utils.h"
26#include "opdev/op_dfx.h"26#include "opdev/op_dfx.h"
27#include "opdev/op_executor.h"27#include "opdev/op_executor.h"
28-#include "op_api/op_api_def.h"28+#include "op_api/op_api_def_nn.h"
29#include "op_api/aclnn_util.h"29#include "op_api/aclnn_util.h"
30#include "opdev/op_log.h"30#include "opdev/op_log.h"
31#include "opdev/platform.h"31#include "opdev/platform.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
20#include "opdev/op_executor.h"20#include "opdev/op_executor.h"
21#include "opdev/op_log.h"21#include "opdev/op_log.h"
22#include "opdev/tensor_view_utils.h"22#include "opdev/tensor_view_utils.h"
23-#include "op_api/op_api_def.h"23+#include "op_api/op_api_def_nn.h"
24#include "aclnn_kernels/common/op_error_check.h"24#include "aclnn_kernels/common/op_error_check.h"
25 25 
26using namespace op;26using namespace op;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
23#include "aclnn_kernels/common/op_error_check.h"23#include "aclnn_kernels/common/op_error_check.h"
24#include "log/log.h"24#include "log/log.h"
25#include "op_api/level2_base.h"25#include "op_api/level2_base.h"
26-#include "op_api/op_api_def.h"26+#include "op_api/op_api_def_nn.h"
27 27 
28using namespace op;28using namespace op;
29static constexpr const char* ACLNN_HARD_SIGMOID_NAME = "aclnnHardsigmoid";29static constexpr const char* ACLNN_HARD_SIGMOID_NAME = "aclnnHardsigmoid";
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "aclnn_kernels/contiguous.h"16#include "aclnn_kernels/contiguous.h"
17#include "aclnn/aclnn_base.h"17#include "aclnn/aclnn_base.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "opdev/common_types.h"20#include "opdev/common_types.h"
21#include "opdev/data_type_utils.h"21#include "opdev/data_type_utils.h"
22#include "opdev/format_utils.h"22#include "opdev/format_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "hard_swish_grad.h"16#include "hard_swish_grad.h"
17#include "aclnn_kernels/contiguous.h"17#include "aclnn_kernels/contiguous.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/level2_base.h"20#include "op_api/level2_base.h"
21#include "opdev/common_types.h"21#include "opdev/common_types.h"
22#include "opdev/shape_utils.h"22#include "opdev/shape_utils.h"
@@ -140,4 +140,4 @@ aclnnStatus aclnnHardswishBackward(void* workspace, uint64_t workspaceSize, aclO
140 140 
141#ifdef __cplusplus141#ifdef __cplusplus
142}142}
143-#endif143+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "hard_swish_grad_v2.h"16#include "hard_swish_grad_v2.h"
17#include "aclnn_kernels/contiguous.h"17#include "aclnn_kernels/contiguous.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "opdev/data_type_utils.h"20#include "opdev/data_type_utils.h"
21#include "opdev/format_utils.h"21#include "opdev/format_utils.h"
22#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
@@ -142,4 +142,4 @@ aclnnStatus aclnnHardswishBackwardV2(void* workspace, uint64_t workspaceSize, ac
142 142 
143#ifdef __cplusplus143#ifdef __cplusplus
144}144}
145-#endif145+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/cast.h"12#include "aclnn_kernels/cast.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14#include "aclnn_kernels/common/op_error_check.h"14#include "aclnn_kernels/common/op_error_check.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "opdev/common_types.h"16#include "opdev/common_types.h"
17#include "opdev/shape_utils.h"17#include "opdev/shape_utils.h"
18#include "opdev/data_type_utils.h"18#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
19#include "aclnn_kernels/contiguous.h"19#include "aclnn_kernels/contiguous.h"
20#include "aclnn_kernels/cast.h"20#include "aclnn_kernels/cast.h"
21#include "aclnn_kernels/transdata.h"21#include "aclnn_kernels/transdata.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "opdev/common_types.h"23#include "opdev/common_types.h"
24#include "opdev/data_type_utils.h"24#include "opdev/data_type_utils.h"
25#include "opdev/format_utils.h"25#include "opdev/format_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15 15 
16#include "aclnn_logsigmoid.h"16#include "aclnn_logsigmoid.h"
17#include "opdev/op_dfx.h"17#include "opdev/op_dfx.h"
18-#include "op_api/op_api_def.h"18+#include "op_api/op_api_def_nn.h"
19#include "aclnn_kernels/cast.h"19#include "aclnn_kernels/cast.h"
20#include "aclnn_kernels/contiguous.h"20#include "aclnn_kernels/contiguous.h"
21#include "logsigmoid.h"21#include "logsigmoid.h"
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/contiguous.h"12#include "aclnn_kernels/contiguous.h"
13#include "opdev/op_log.h"13#include "opdev/op_log.h"
14#include "opdev/op_dfx.h"14#include "opdev/op_dfx.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "opdev/common_types.h"16#include "opdev/common_types.h"
17#include "opdev/data_type_utils.h"17#include "opdev/data_type_utils.h"
18#include "opdev/make_op_executor.h"18#include "opdev/make_op_executor.h"
@@ -127,4 +127,4 @@ aclnnStatus aclnnInplaceMish(void* workspace, uint64_t workspaceSize, aclOpExecu
127 127 
128#ifdef __cplusplus128#ifdef __cplusplus
129}129}
130-#endif130+#endif
@@ -14,7 +14,7 @@
14#include "mish_grad.h"14#include "mish_grad.h"
15#include "level0/broadcast_to.h"15#include "level0/broadcast_to.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "op_api/aclnn_util.h"18#include "op_api/aclnn_util.h"
19#include "opdev/common_types.h"19#include "opdev/common_types.h"
20#include "opdev/data_type_utils.h"20#include "opdev/data_type_utils.h"
@@ -215,4 +215,4 @@ aclnnStatus aclnnMishBackward(void* workspace, uint64_t workspaceSize, aclOpExec
215 215 
216#ifdef __cplusplus216#ifdef __cplusplus
217}217}
218-#endif218+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15#include "../../p_relu_grad_reduce/op_api/prelu_grad_reduce.h"15#include "../../p_relu_grad_reduce/op_api/prelu_grad_reduce.h"
16#include "aclnn_kernels/reshape.h"16#include "aclnn_kernels/reshape.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18-#include "op_api/op_api_def.h"18+#include "op_api/op_api_def_nn.h"
19#include "opdev/common_types.h"19#include "opdev/common_types.h"
20#include "opdev/data_type_utils.h"20#include "opdev/data_type_utils.h"
21#include "opdev/op_dfx.h"21#include "opdev/op_dfx.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#include "aclnn_kernels/contiguous.h"11#include "aclnn_kernels/contiguous.h"
12#include "relu.h"12#include "relu.h"
13#include "aclnn_kernels/common/op_error_check.h"13#include "aclnn_kernels/common/op_error_check.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "aclnn/aclnn_base.h"15#include "aclnn/aclnn_base.h"
16#include "opdev/common_types.h"16#include "opdev/common_types.h"
17#include "opdev/data_type_utils.h"17#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -10,7 +10,7 @@
10 10 
11#include "aclnn_selu.h"11#include "aclnn_selu.h"
12 12 
13-#include "op_api/op_api_def.h"13+#include "op_api/op_api_def_nn.h"
14#include "aclnn_kernels/common/op_error_check.h"14#include "aclnn_kernels/common/op_error_check.h"
15#include "opdev/common_types.h"15#include "opdev/common_types.h"
16#include "opdev/data_type_utils.h"16#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -9,7 +9,7 @@
9 */9 */
10#include "aclnn_selu_backward.h"10#include "aclnn_selu_backward.h"
11 11 
12-#include "op_api/op_api_def.h"12+#include "op_api/op_api_def_nn.h"
13#include "aclnn_kernels/common/op_error_check.h"13#include "aclnn_kernels/common/op_error_check.h"
14#include "opdev/common_types.h"14#include "opdev/common_types.h"
15#include "opdev/data_type_utils.h"15#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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")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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
19#include "opdev/op_dfx.h"19#include "opdev/op_dfx.h"
20#include "opdev/op_log.h"20#include "opdev/op_log.h"
21#include "opdev/platform.h"21#include "opdev/platform.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "op_api/aclnn_util.h"23#include "op_api/aclnn_util.h"
24#include "aclnn_kernels/common/op_error_check.h"24#include "aclnn_kernels/common/op_error_check.h"
25 25 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -8,7 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10#include "aclnn/aclnn_base.h"10#include "aclnn/aclnn_base.h"
11-#include "op_api/op_api_def.h"11+#include "op_api/op_api_def_nn.h"
12#include "aclnn_kernels/common/op_error_check.h"12#include "aclnn_kernels/common/op_error_check.h"
13#include "level0/broadcast_to.h"13#include "level0/broadcast_to.h"
14#include "aclnn_kernels/cast.h"14#include "aclnn_kernels/cast.h"
@@ -190,8 +190,8 @@ aclnnStatus aclnnSoftshrinkBackwardGetWorkspaceSize(const aclTensor* gradOutput,
190 }190 }
191 191 
192 // 调用SoftShrinkGrad算子kernel192 // 调用SoftShrinkGrad算子kernel
193- auto softShrinkBackwardOpOut =193+ auto softShrinkBackwardOpOut = l0op::SoftShrinkGrad(gradOutputContiguous, selfContiguous, lambdValue,
194- l0op::SoftShrinkGrad(gradOutputContiguous, selfContiguous, lambdValue, uniqueExecutor.get());194+ uniqueExecutor.get());
195 CHECK_RET(softShrinkBackwardOpOut != nullptr, ACLNN_ERR_INNER_NULLPTR);195 CHECK_RET(softShrinkBackwardOpOut != nullptr, ACLNN_ERR_INNER_NULLPTR);
196 196 
197 // 固定写法,将计算结果拷贝到输出gradInput上,gradInput可能是非连续的tensor197 // 固定写法,将计算结果拷贝到输出gradInput上,gradInput可能是非连续的tensor
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "softmax_cross_entropy_with_logits.h"12#include "softmax_cross_entropy_with_logits.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14#include "aclnn_kernels/reshape.h"14#include "aclnn_kernels/reshape.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/common_types.h"17#include "opdev/common_types.h"
18#include "opdev/data_type_utils.h"18#include "opdev/data_type_utils.h"
@@ -20,7 +20,7 @@
20#include "opdev/shape_utils.h"20#include "opdev/shape_utils.h"
21#include "opdev/tensor_view_utils.h"21#include "opdev/tensor_view_utils.h"
22#include "aclnn_kernels/common/op_error_check.h"22#include "aclnn_kernels/common/op_error_check.h"
23-#include "op_api/op_api_def.h"23+#include "op_api/op_api_def_nn.h"
24#include "op_api/level2_base.h"24#include "op_api/level2_base.h"
25 25 
26using namespace op;26using namespace op;
@@ -163,4 +163,4 @@ aclnnStatus aclnnSoftplus(void* workspace, uint64_t workspaceSize, aclOpExecutor
163 163 
164#ifdef __cplusplus164#ifdef __cplusplus
165}165}
166-#endif166+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "opdev/op_executor.h"16#include "opdev/op_executor.h"
17#include "opdev/op_log.h"17#include "opdev/op_log.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/aclnn_util.h"20#include "op_api/aclnn_util.h"
21 21 
22using namespace op;22using namespace op;
@@ -193,4 +193,4 @@ aclnnStatus aclnnSoftplusBackward(void* workspace, uint64_t workspaceSize, aclOp
193 193 
194#ifdef __cplusplus194#ifdef __cplusplus
195}195}
196-#endif196+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/cast.h"12#include "aclnn_kernels/cast.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14#include "aclnn/aclnn_base.h"14#include "aclnn/aclnn_base.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/common_types.h"17#include "opdev/common_types.h"
18#include "opdev/data_type_utils.h"18#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
25#include "opdev/platform.h"25#include "opdev/platform.h"
26#include "opdev/shape_utils.h"26#include "opdev/shape_utils.h"
27#include "opdev/tensor_view_utils.h"27#include "opdev/tensor_view_utils.h"
28-#include "op_api/op_api_def.h"28+#include "op_api/op_api_def_nn.h"
29 29 
30using namespace op;30using namespace op;
31 31 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
24#include "opdev/platform.h"24#include "opdev/platform.h"
25#include "opdev/shape_utils.h"25#include "opdev/shape_utils.h"
26#include "opdev/tensor_view_utils.h"26#include "opdev/tensor_view_utils.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "op_api/level2_base_caculation.h"28#include "op_api/level2_base_caculation.h"
29 29 
30using namespace op;30using namespace op;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
19#include "opdev/op_dfx.h"19#include "opdev/op_dfx.h"
20#include "opdev/op_log.h"20#include "opdev/op_log.h"
21#include "opdev/platform.h"21#include "opdev/platform.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "aclnn_kernels/common/op_error_check.h"23#include "aclnn_kernels/common/op_error_check.h"
24 24 
25#include "swish_grad.h"25#include "swish_grad.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
20#include "opdev/tensor_view_utils.h"20#include "opdev/tensor_view_utils.h"
21#include "opdev/make_op_executor.h"21#include "opdev/make_op_executor.h"
22#include "aclnn_kernels/common/op_error_check.h"22#include "aclnn_kernels/common/op_error_check.h"
23-#include "op_api/op_api_def.h"23+#include "op_api/op_api_def_nn.h"
24#include "activation/common/op_api/threshold.h"24#include "activation/common/op_api/threshold.h"
25#include "aclnn_threshold.h"25#include "aclnn_threshold.h"
26 26 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
22#include "opdev/op_log.h"22#include "opdev/op_log.h"
23#include "opdev/tensor_view_utils.h"23#include "opdev/tensor_view_utils.h"
24#include "opdev/make_op_executor.h"24#include "opdev/make_op_executor.h"
25-#include "op_api/op_api_def.h"25+#include "op_api/op_api_def_nn.h"
26#include "op_api/aclnn_util.h"26#include "op_api/aclnn_util.h"
27 27 
28using namespace op;28using namespace op;
@@ -172,4 +172,4 @@ aclnnStatus aclnnThresholdBackward(void* workspace, uint64_t workspaceSize, aclO
172 172 
173#ifdef __cplusplus173#ifdef __cplusplus
174}174}
175-#endif175+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#define LEVEL2_BASE_H_12#define LEVEL2_BASE_H_
13 13 
14#include <algorithm>14#include <algorithm>
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn/aclnn_base.h"17#include "aclnn/aclnn_base.h"
18#include "opdev/platform.h"18#include "opdev/platform.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#define LEVEL2_BASE_CALCULATION_H_12#define LEVEL2_BASE_CALCULATION_H_
13 13 
14#include <bitset>14#include <bitset>
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn/aclnn_base.h"16#include "aclnn/aclnn_base.h"
17#include "opdev/shape_utils.h"17#include "opdev/shape_utils.h"
18#include "level0/fill.h"18#include "level0/fill.h"
@@ -259,4 +259,4 @@ static inline op::Shape ReduceShapeGetWithVar(const aclTensor* self, const aclIn
259#ifdef __cplusplus259#ifdef __cplusplus
260}260}
261#endif261#endif
262-#endif // LEVEL2_BASE_CALCULATION_H_262+#endif // LEVEL2_BASE_CALCULATION_H_
Rcommon/inc/op_api/op_api_def.h→common/inc/op_api/op_api_def_nn.h+4-4
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -8,8 +8,8 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef OP_API_DEF_H_11+#ifndef OP_API_DEF_NN_H_
12-#define OP_API_DEF_H_12+#define OP_API_DEF_NN_H_
13 13 
14namespace op {14namespace op {
15constexpr size_t BN_MIN_SUPPORT_DIMS_NUMS = 2;15constexpr size_t BN_MIN_SUPPORT_DIMS_NUMS = 2;
@@ -22,4 +22,4 @@ constexpr int8_t USE_HF32 = 3;
22constexpr int8_t USE_FP32_ADD = 4;22constexpr int8_t USE_FP32_ADD = 4;
23constexpr size_t MAX_MASK_LEN64 = 64;23constexpr size_t MAX_MASK_LEN64 = 64;
24} // namespace op24} // namespace op
25-#endif // OP_API_DEF_H_25+#endif // OP_API_DEF_NN_H_
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
19#include "aclnn_kernels/reshape.h"19#include "aclnn_kernels/reshape.h"
20#include "aclnn_kernels/transpose.h"20#include "aclnn_kernels/transpose.h"
21#include "aclnn_kernels/transdata.h"21#include "aclnn_kernels/transdata.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "../../convolution_forward/op_host/op_api/convolution.h"23#include "../../convolution_forward/op_host/op_api/convolution.h"
24#include "op_api/dilation.h"24#include "op_api/dilation.h"
25#include "level0/fill.h"25#include "level0/fill.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -10,7 +10,7 @@
10 10 
11#include "gtest/gtest.h"11#include "gtest/gtest.h"
12#include "../../../op_api/aclnn_convolution_backward.h"12#include "../../../op_api/aclnn_convolution_backward.h"
13-#include "op_api/op_api_def.h"13+#include "op_api/op_api_def_nn.h"
14#include "op_api_ut_common/tensor_desc.h"14#include "op_api_ut_common/tensor_desc.h"
15#include "op_api_ut_common/scalar_desc.h"15#include "op_api_ut_common/scalar_desc.h"
16#include "op_api_ut_common/op_api_ut.h"16#include "op_api_ut_common/op_api_ut.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -10,7 +10,7 @@
10#include "gtest/gtest.h"10#include "gtest/gtest.h"
11 11 
12#include "../../../op_api/aclnn_convolution_backward.h"12#include "../../../op_api/aclnn_convolution_backward.h"
13-#include "op_api/op_api_def.h"13+#include "op_api/op_api_def_nn.h"
14#include "op_api_ut_common/op_api_ut.h"14#include "op_api_ut_common/op_api_ut.h"
15#include "op_api_ut_common/scalar_desc.h"15#include "op_api_ut_common/scalar_desc.h"
16#include "op_api_ut_common/tensor_desc.h"16#include "op_api_ut_common/tensor_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -10,7 +10,7 @@
10 10 
11#include "gtest/gtest.h"11#include "gtest/gtest.h"
12#include "../../../op_api/aclnn_convolution_backward.h"12#include "../../../op_api/aclnn_convolution_backward.h"
13-#include "op_api/op_api_def.h"13+#include "op_api/op_api_def_nn.h"
14#include "op_api_ut_common/tensor_desc.h"14#include "op_api_ut_common/tensor_desc.h"
15#include "op_api_ut_common/scalar_desc.h"15#include "op_api_ut_common/scalar_desc.h"
16#include "op_api_ut_common/op_api_ut.h"16#include "op_api_ut_common/op_api_ut.h"
@@ -728,4 +728,4 @@ TEST_F(deformable_conv2d_backward_test, test_DeformableConv2dBackward_weight_inp
728 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size);728 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size);
729 EXPECT_EQ(aclRet, ACLNN_ERR_PARAM_INVALID);729 EXPECT_EQ(aclRet, ACLNN_ERR_PARAM_INVALID);
730}730}
731-} // namespace731+} // namespace
@@ -11,7 +11,7 @@
11#include "aclnn_gelu.h"11#include "aclnn_gelu.h"
12#include "gelu.h"12#include "gelu.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "op_api/aclnn_util.h"15#include "op_api/aclnn_util.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/op_dfx.h"17#include "opdev/op_dfx.h"
@@ -129,4 +129,4 @@ aclnnStatus aclnnGelu(void* workspace, uint64_t workspaceSize, aclOpExecutor* ex
129 L2_DFX_PHASE_2(aclnnGelu);129 L2_DFX_PHASE_2(aclnnGelu);
130 130 
131 return CommonOpExecutorRun(workspace, workspaceSize, executor, stream);131 return CommonOpExecutorRun(workspace, workspaceSize, executor, stream);
132-}132+}
@@ -21,7 +21,7 @@
21#include "opdev/op_dfx.h"21#include "opdev/op_dfx.h"
22#include "opdev/op_log.h"22#include "opdev/op_log.h"
23#include "opdev/platform.h"23#include "opdev/platform.h"
24-#include "op_api/op_api_def.h"24+#include "op_api/op_api_def_nn.h"
25#include "op_api/level2_base.h"25#include "op_api/level2_base.h"
26 26 
27using namespace op;27using namespace op;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
19#include "aclnn_kernels/contiguous.h"19#include "aclnn_kernels/contiguous.h"
20#include "aclnn/aclnn_base.h"20#include "aclnn/aclnn_base.h"
21#include "aclnn_kernels/common/op_error_check.h"21#include "aclnn_kernels/common/op_error_check.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "opdev/common_types.h"23#include "opdev/common_types.h"
24#include "opdev/data_type_utils.h"24#include "opdev/data_type_utils.h"
25#include "opdev/format_utils.h"25#include "opdev/format_utils.h"
@@ -16,7 +16,7 @@
16#include "hard_swish_grad.h"16#include "hard_swish_grad.h"
17#include "aclnn_kernels/contiguous.h"17#include "aclnn_kernels/contiguous.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/level2_base.h"20#include "op_api/level2_base.h"
21#include "opdev/common_types.h"21#include "opdev/common_types.h"
22#include "opdev/shape_utils.h"22#include "opdev/shape_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/contiguous.h"12#include "aclnn_kernels/contiguous.h"
13#include "opdev/op_log.h"13#include "opdev/op_log.h"
14#include "opdev/op_dfx.h"14#include "opdev/op_dfx.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "opdev/common_types.h"16#include "opdev/common_types.h"
17#include "opdev/data_type_utils.h"17#include "opdev/data_type_utils.h"
18#include "opdev/make_op_executor.h"18#include "opdev/make_op_executor.h"
@@ -127,4 +127,4 @@ aclnnStatus aclnnInplaceMish(void* workspace, uint64_t workspaceSize, aclOpExecu
127 127 
128#ifdef __cplusplus128#ifdef __cplusplus
129}129}
130-#endif130+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14#include "mish_grad.h"14#include "mish_grad.h"
15#include "level0/broadcast_to.h"15#include "level0/broadcast_to.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/common_types.h"18#include "opdev/common_types.h"
19#include "opdev/data_type_utils.h"19#include "opdev/data_type_utils.h"
20#include "opdev/format_utils.h"20#include "opdev/format_utils.h"
@@ -1,175 +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-#include "aclnn_threshold_backward.h"
11-#include "relu_grad.h"
12-#include "../../../../../activation/threshold_grad_v2_d/op_host/op_api/threshold_grad.cpp"
13-#include "../../../../../activation/threshold_grad_v2_d/op_host/op_api/threshold_grad.h"
14-#include "aclnn_kernels/contiguous.h"
15-#include "aclnn_kernels/common/op_error_check.h"
16-#include "aclnn/aclnn_base.h"
17-#include "opdev/common_types.h"
18-#include "opdev/data_type_utils.h"
19-#include "opdev/shape_utils.h"
20-#include "opdev/format_utils.h"
21-#include "opdev/op_dfx.h"
22-#include "opdev/op_executor.h"
23-#include "opdev/op_log.h"
24-#include "opdev/tensor_view_utils.h"
25-#include "opdev/make_op_executor.h"
26-#include "op_api/op_api_def.h"
27- 
28-using namespace op;
29-#ifdef __cplusplus
30-extern "C" {
31-#endif
32- 
33-namespace {
34-float thresholdVal_ = 0.0;
35-// 根据API定义,需要列出所能支持的所有dtype
36-static const std::initializer_list<op::DataType> ASCEND910_DTYPE_DTYPE_SUPPORT_LIST = {
37- op::DataType::DT_FLOAT, op::DataType::DT_INT32, op::DataType::DT_FLOAT16, op::DataType::DT_INT8,
38- op::DataType::DT_UINT8};
39- 
40-static const std::initializer_list<op::DataType> ASCEND910B_DTYPE_DTYPE_SUPPORT_LIST = {
41- op::DataType::DT_FLOAT, op::DataType::DT_INT32, op::DataType::DT_FLOAT16,
42- op::DataType::DT_INT8, op::DataType::DT_UINT8, op::DataType::DT_BF16};
43- 
44-static const std::initializer_list<op::DataType> REGBASE_DTYPE_DTYPE_SUPPORT_LIST = {
45- op::DataType::DT_FLOAT, op::DataType::DT_INT32, op::DataType::DT_FLOAT16, op::DataType::DT_INT8,
46- op::DataType::DT_UINT8, op::DataType::DT_BF16, op::DataType::DT_INT64};
47- 
48-static bool IsFloatEqual(float a, float b) { return std::abs(a - b) <= std::numeric_limits<float>::epsilon(); }
49- 
50-static bool CheckPtrValid(const aclTensor* gradOutput, const aclTensor* self)
51-{
52- OP_CHECK_NULL(gradOutput, return false);
53- OP_CHECK_NULL(self, return false);
54- return true;
55-}
56- 
57-static const std::initializer_list<DataType>& GetDtypeSupportList()
58-{
59- auto curArch = GetCurrentPlatformInfo().GetCurNpuArch();
60- if (curArch == NpuArch::DAV_2201 || Ops::NN::AclnnUtil::IsRegbase(curArch)) {
61- if (Ops::NN::AclnnUtil::IsRegbase(curArch) && IsFloatEqual(thresholdVal_, 0.0)) {
62- // relugrad 支持int64
63- return REGBASE_DTYPE_DTYPE_SUPPORT_LIST;
64- } else {
65- return ASCEND910B_DTYPE_DTYPE_SUPPORT_LIST;
66- }
67- } else {
68- return ASCEND910_DTYPE_DTYPE_SUPPORT_LIST;
69- }
70-}
71- 
72-static bool CheckDtypeValid(const aclTensor* gradOutput, const aclTensor* self, const aclTensor* out)
73-{
74- const auto& supportList = GetDtypeSupportList();
75- // 检查gradOutput和self数据类型是否在ThresholdBackward算子的支持列表内
76- OP_CHECK_DTYPE_NOT_SUPPORT(gradOutput, supportList, return false);
77- OP_CHECK_DTYPE_NOT_SUPPORT(self, supportList, return false);
78- OP_CHECK_DTYPE_NOT_MATCH(gradOutput, self->GetDataType(), return false);
79- OP_CHECK_DTYPE_NOT_MATCH(out, self->GetDataType(), return false);
80- return true;
81-}
82- 
83-static bool CheckShape(const aclTensor* gradOutput, const aclTensor* self)
84-{
85- OP_CHECK_MAX_DIM(gradOutput, MAX_SUPPORT_DIMS_NUMS, return false);
86- OP_CHECK_MAX_DIM(self, MAX_SUPPORT_DIMS_NUMS, return false);
87- return true;
88-}
89- 
90-static aclnnStatus CheckParams(const aclTensor* gradOutput, const aclTensor* self, const aclTensor* out)
91-{
92- // 错误码等DFX方案细化后刷新,错误日志在check接口内打印
93- // 1. 检查参数是否为空指针
94- CHECK_RET(CheckPtrValid(gradOutput, self), ACLNN_ERR_PARAM_NULLPTR);
95- 
96- // 2. 检查输入的数据类型是否在API支持的数据类型范围之内,需要根据api定义校验
97- CHECK_RET(CheckDtypeValid(gradOutput, self, out), ACLNN_ERR_PARAM_INVALID);
98- 
99- // 3.输入维度校验
100- CHECK_RET(CheckShape(gradOutput, self), ACLNN_ERR_PARAM_INVALID);
101- 
102- return ACLNN_SUCCESS;
103-}
104-} // namespace
105- 
106-aclnnStatus aclnnThresholdBackwardGetWorkspaceSize(const aclTensor* gradOutput, const aclTensor* self,
107- const aclScalar* threshold, aclTensor* out, uint64_t* workspaceSize,
108- aclOpExecutor** executor)
109-{
110- L2_DFX_PHASE_1(aclnnThresholdBackward, DFX_IN(gradOutput, self, threshold), DFX_OUT(out));
111- // 固定写法,创建OpExecutor
112- auto uniqueExecutor = CREATE_EXECUTOR();
113- CHECK_RET(uniqueExecutor.get() != nullptr, ACLNN_ERR_INNER_CREATE_EXECUTOR);
114- // 固定写法,参数检查
115- CHECK_RET(threshold != nullptr, ACLNN_ERR_PARAM_NULLPTR);
116- thresholdVal_ = threshold->ToFloat();
117- CHECK_RET(out != nullptr, ACLNN_ERR_PARAM_NULLPTR);
118- CHECK_RET(workspaceSize != nullptr, ACLNN_ERR_PARAM_NULLPTR);
119- auto ret = CheckParams(gradOutput, self, out);
120- CHECK_RET(ret == ACLNN_SUCCESS, ret);
121- // 校验输入shape是否可broadcast
122- op::Shape broadcastShape;
123- OP_CHECK_BROADCAST_AND_INFER_SHAPE(self, gradOutput, broadcastShape, return ACLNN_ERR_PARAM_INVALID);
124- // 校验输出shape是否与推导出的broadcastShape相符
125- if (broadcastShape != out->GetViewShape()) {
126- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Shape of out should be %s, but current is %s.",
127- op::ToString(broadcastShape).GetString(), op::ToString(out->GetViewShape()).GetString());
128- return ACLNN_ERR_PARAM_INVALID;
129- }
130- 
131- // 算子的空tensor在kernel中支持,对标竞品根据算子实际情况补充
132- if (self->IsEmpty() || gradOutput->IsEmpty()) {
133- *workspaceSize = 0;
134- uniqueExecutor.ReleaseTo(executor);
135- return ACLNN_SUCCESS;
136- }
137- 
138- // 固定写法,将输入gradOutput转换成连续的tensor
139- auto gradOutputContiguous = l0op::Contiguous(gradOutput, uniqueExecutor.get());
140- CHECK_RET(gradOutputContiguous != nullptr, ACLNN_ERR_INNER_NULLPTR);
141- 
142- // 固定写法,将输入self转换成连续的tensor
143- auto selfContiguous = l0op::Contiguous(self, uniqueExecutor.get());
144- CHECK_RET(selfContiguous != nullptr, ACLNN_ERR_INNER_NULLPTR);
145- 
146- // 调用 ReluGrad or ThresholdGradV2D 算子kernel
147- const aclTensor* opOut;
148- if (IsFloatEqual(thresholdVal_, 0.0)) {
149- opOut = l0op::ReluGrad(gradOutputContiguous, selfContiguous, uniqueExecutor.get());
150- } else {
151- opOut = l0op::ThresholdGradV2D(gradOutputContiguous, selfContiguous, thresholdVal_, uniqueExecutor.get());
152- }
153- 
154- CHECK_RET(opOut != nullptr, ACLNN_ERR_INNER_NULLPTR);
155- // 固定写法,将计算结果拷贝到输出out上,out可能是非连续的tensor
156- auto viewCopyResult = l0op::ViewCopy(opOut, out, uniqueExecutor.get());
157- CHECK_RET(viewCopyResult != nullptr, ACLNN_ERR_INNER_NULLPTR);
158- 
159- // 固定写法,获取计算过程中需要使用的workspace大小
160- *workspaceSize = uniqueExecutor->GetWorkspaceSize();
161- uniqueExecutor.ReleaseTo(executor);
162- return ACLNN_SUCCESS;
163-}
164- 
165-aclnnStatus aclnnThresholdBackward(void* workspace, uint64_t workspaceSize, aclOpExecutor* executor,
166- const aclrtStream stream)
167-{
168- L2_DFX_PHASE_2(aclnnThresholdBackward);
169- // 固定写法,调用框架能力,完成计算
170- return CommonOpExecutorRun(workspace, workspaceSize, executor, stream);
171-}
172- 
173-#ifdef __cplusplus
174-}
175-#endif
@@ -9,7 +9,7 @@
9 */9 */
10#include "aclnn_selu_backward.h"10#include "aclnn_selu_backward.h"
11 11 
12-#include "op_api/op_api_def.h"12+#include "op_api/op_api_def_nn.h"
13#include "aclnn_kernels/common/op_error_check.h"13#include "aclnn_kernels/common/op_error_check.h"
14#include "opdev/common_types.h"14#include "opdev/common_types.h"
15#include "opdev/data_type_utils.h"15#include "opdev/data_type_utils.h"
@@ -19,7 +19,7 @@
19#include "opdev/op_dfx.h"19#include "opdev/op_dfx.h"
20#include "opdev/op_log.h"20#include "opdev/op_log.h"
21#include "opdev/platform.h"21#include "opdev/platform.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "op_api/aclnn_util.h"23#include "op_api/aclnn_util.h"
24#include "aclnn_kernels/common/op_error_check.h"24#include "aclnn_kernels/common/op_error_check.h"
25 25 
@@ -20,7 +20,7 @@
20#include "opdev/shape_utils.h"20#include "opdev/shape_utils.h"
21#include "opdev/tensor_view_utils.h"21#include "opdev/tensor_view_utils.h"
22#include "aclnn_kernels/common/op_error_check.h"22#include "aclnn_kernels/common/op_error_check.h"
23-#include "op_api/op_api_def.h"23+#include "op_api/op_api_def_nn.h"
24#include "op_api/level2_base.h"24#include "op_api/level2_base.h"
25 25 
26using namespace op;26using namespace op;
@@ -163,4 +163,4 @@ aclnnStatus aclnnSoftplus(void* workspace, uint64_t workspaceSize, aclOpExecutor
163 163 
164#ifdef __cplusplus164#ifdef __cplusplus
165}165}
166-#endif166+#endif
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/cast.h"12#include "aclnn_kernels/cast.h"
13#include "aclnn_kernels/common/op_error_check.h"13#include "aclnn_kernels/common/op_error_check.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "opdev/common_types.h"16#include "opdev/common_types.h"
17#include "opdev/op_dfx.h"17#include "opdev/op_dfx.h"
18#include "opdev/op_executor.h"18#include "opdev/op_executor.h"
@@ -173,4 +173,4 @@ aclnnStatus aclnnSoftplusBackward(void* workspace, uint64_t workspaceSize, aclOp
173 173 
174#ifdef __cplusplus174#ifdef __cplusplus
175}175}
176-#endif176+#endif
@@ -8,7 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10#include "aclnn/aclnn_base.h"10#include "aclnn/aclnn_base.h"
11-#include "op_api/op_api_def.h"11+#include "op_api/op_api_def_nn.h"
12#include "aclnn_kernels/common/op_error_check.h"12#include "aclnn_kernels/common/op_error_check.h"
13#include "level0/broadcast_to.h"13#include "level0/broadcast_to.h"
14#include "aclnn_kernels/cast.h"14#include "aclnn_kernels/cast.h"
@@ -20,7 +20,7 @@
20#include "aclnn_kernels/contiguous.h"20#include "aclnn_kernels/contiguous.h"
21#include "opdev/op_log.h"21#include "opdev/op_log.h"
22#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
23-#include "op_api/op_api_def.h"23+#include "op_api/op_api_def_nn.h"
24#include "opdev/common_types.h"24#include "opdev/common_types.h"
25#include "opdev/data_type_utils.h"25#include "opdev/data_type_utils.h"
26#include "opdev/make_op_executor.h"26#include "opdev/make_op_executor.h"
@@ -24,7 +24,7 @@
24#include "opdev/platform.h"24#include "opdev/platform.h"
25#include "opdev/shape_utils.h"25#include "opdev/shape_utils.h"
26#include "opdev/tensor_view_utils.h"26#include "opdev/tensor_view_utils.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "op_api/level2_base_caculation.h"28#include "op_api/level2_base_caculation.h"
29 29 
30using namespace op;30using namespace op;
@@ -24,7 +24,7 @@
24#include "opdev/platform.h"24#include "opdev/platform.h"
25#include "opdev/shape_utils.h"25#include "opdev/shape_utils.h"
26#include "opdev/tensor_view_utils.h"26#include "opdev/tensor_view_utils.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "op_api/level2_base_caculation.h"28#include "op_api/level2_base_caculation.h"
29 29 
30using namespace op;30using namespace op;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
19#include "opdev/op_dfx.h"19#include "opdev/op_dfx.h"
20#include "opdev/op_log.h"20#include "opdev/op_log.h"
21#include "opdev/platform.h"21#include "opdev/platform.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "aclnn_kernels/common/op_error_check.h"23#include "aclnn_kernels/common/op_error_check.h"
24 24 
25#include "swish_grad.h"25#include "swish_grad.h"
@@ -22,7 +22,7 @@
22#include "opdev/op_log.h"22#include "opdev/op_log.h"
23#include "opdev/tensor_view_utils.h"23#include "opdev/tensor_view_utils.h"
24#include "opdev/make_op_executor.h"24#include "opdev/make_op_executor.h"
25-#include "op_api/op_api_def.h"25+#include "op_api/op_api_def_nn.h"
26 26 
27using namespace op;27using namespace op;
28#ifdef __cplusplus28#ifdef __cplusplus
@@ -171,4 +171,4 @@ aclnnStatus aclnnThresholdBackward(void* workspace, uint64_t workspaceSize, aclO
171 171 
172#ifdef __cplusplus172#ifdef __cplusplus
173}173}
174-#endif174+#endif
@@ -15,7 +15,7 @@
15#include "aclnn_kernels/reshape.h"15#include "aclnn_kernels/reshape.h"
16#include "aclnn_kernels/transpose.h"16#include "aclnn_kernels/transpose.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18-#include "op_api/op_api_def.h"18+#include "op_api/op_api_def_nn.h"
19#include "op_api/aclnn_util.h"19#include "op_api/aclnn_util.h"
20#include "opdev/common_types.h"20#include "opdev/common_types.h"
21#include "opdev/data_type_utils.h"21#include "opdev/data_type_utils.h"
@@ -18,7 +18,7 @@
18#include "aclnn_kernels/contiguous.h"18#include "aclnn_kernels/contiguous.h"
19#include "aclnn_kernels/cast.h"19#include "aclnn_kernels/cast.h"
20#include "aclnn_kernels/transdata.h"20#include "aclnn_kernels/transdata.h"
21-#include "op_api/op_api_def.h"21+#include "op_api/op_api_def_nn.h"
22#include "op_api/aclnn_util.h"22#include "op_api/aclnn_util.h"
23#include "opdev/common_types.h"23#include "opdev/common_types.h"
24#include "opdev/data_type_utils.h"24#include "opdev/data_type_utils.h"
@@ -14,7 +14,7 @@
14#include "../../../op_host/op_api/aclnn_binary_cross_entropy_with_logits_backward.h"14#include "../../../op_host/op_api/aclnn_binary_cross_entropy_with_logits_backward.h"
15#include "op_api_ut_common/op_api_ut.h"15#include "op_api_ut_common/op_api_ut.h"
16#include "op_api_ut_common/tensor_desc.h"16#include "op_api_ut_common/tensor_desc.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/platform.h"18#include "opdev/platform.h"
19 19 
20using namespace std;20using namespace std;
@@ -27,7 +27,7 @@
27#include "opdev/op_executor.h"27#include "opdev/op_executor.h"
28#include "opdev/op_log.h"28#include "opdev/op_log.h"
29#include "opdev/tensor_view_utils.h"29#include "opdev/tensor_view_utils.h"
30-#include "op_api/op_api_def.h"30+#include "op_api/op_api_def_nn.h"
31#include "aclnn_kernels/common/op_error_check.h"31#include "aclnn_kernels/common/op_error_check.h"
32 32 
33using namespace op;33using namespace op;
@@ -14,7 +14,7 @@
14 */14 */
15 15 
16#include "aclnn_smooth_l1_loss_backward.h"16#include "aclnn_smooth_l1_loss_backward.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19#include "aclnn_kernels/cast.h"19#include "aclnn_kernels/cast.h"
20#include "aclnn_kernels/contiguous.h"20#include "aclnn_kernels/contiguous.h"
@@ -267,4 +267,4 @@ aclnnStatus aclnnSmoothL1LossBackward(void* workspace, uint64_t workspaceSize, a
267 267 
268#ifdef __cplusplus268#ifdef __cplusplus
269}269}
270-#endif270+#endif
@@ -24,7 +24,7 @@
24#include "opdev/shape_utils.h"24#include "opdev/shape_utils.h"
25#include "opdev/tensor_view_utils.h"25#include "opdev/tensor_view_utils.h"
26#include "platform/soc_spec.h"26#include "platform/soc_spec.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "op_api/aclnn_util.h"28#include "op_api/aclnn_util.h"
29 29 
30using namespace op;30using namespace op;
@@ -334,4 +334,4 @@ aclnnStatus aclnnSmoothL1Loss(void* workspace, uint64_t workspaceSize, aclOpExec
334 334 
335#ifdef __cplusplus335#ifdef __cplusplus
336}336}
337-#endif337+#endif
@@ -14,7 +14,7 @@
14#include "level0/broadcast_to.h"14#include "level0/broadcast_to.h"
15#include "soft_margin_loss_grad.h"15#include "soft_margin_loss_grad.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/common_types.h"18#include "opdev/common_types.h"
19#include "opdev/data_type_utils.h"19#include "opdev/data_type_utils.h"
20#include "opdev/format_utils.h"20#include "opdev/format_utils.h"
@@ -12,7 +12,7 @@
12#include "gtest/gtest.h"12#include "gtest/gtest.h"
13 13 
14#include "../../../op_api/aclnn_fused_matmul_gelu.h"14#include "../../../op_api/aclnn_fused_matmul_gelu.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api_ut_common/op_api_ut.h"16#include "op_api_ut_common/op_api_ut.h"
17#include "op_api_ut_common/tensor_desc.h"17#include "op_api_ut_common/tensor_desc.h"
18 18 
@@ -14,7 +14,7 @@
14#include "aclnn_kernels/common/op_error_check.h"14#include "aclnn_kernels/common/op_error_check.h"
15#include "level0/ones_like.h"15#include "level0/ones_like.h"
16#include "level0/zero_op.h"16#include "level0/zero_op.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "op_api/level2_base.h"18#include "op_api/level2_base.h"
19#include "opdev/data_type_utils.h"19#include "opdev/data_type_utils.h"
20#include "opdev/format_utils.h"20#include "opdev/format_utils.h"
@@ -16,7 +16,7 @@
16#include "level0/reduce_sum_op.h"16#include "level0/reduce_sum_op.h"
17#include "level0/unsqueeze.h"17#include "level0/unsqueeze.h"
18#include "aclnn/aclnn_base.h"18#include "aclnn/aclnn_base.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "opdev/common_types.h"20#include "opdev/common_types.h"
21#include "opdev/data_type_utils.h"21#include "opdev/data_type_utils.h"
22#include "opdev/format_utils.h"22#include "opdev/format_utils.h"
@@ -13,7 +13,7 @@
13#include "op_api_ut_common/op_api_ut.h"13#include "op_api_ut_common/op_api_ut.h"
14#include "op_api_ut_common/tensor_desc.h"14#include "op_api_ut_common/tensor_desc.h"
15#include "opdev/platform.h"15#include "opdev/platform.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17 17 
18class l2BatchNormElemtBackwardTest : public testing::Test {18class l2BatchNormElemtBackwardTest : public testing::Test {
19protected:19protected:
@@ -14,7 +14,7 @@
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15#include "level0/mul.h"15#include "level0/mul.h"
16#include "level0/reduce_sum_op.h"16#include "level0/reduce_sum_op.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19#include "opdev/op_log.h"19#include "opdev/op_log.h"
20#include "opdev/op_dfx.h"20#include "opdev/op_dfx.h"
@@ -16,7 +16,7 @@
16#include "aclnn_kernels/contiguous.h"16#include "aclnn_kernels/contiguous.h"
17#include "aclnn_kernels/transdata.h"17#include "aclnn_kernels/transdata.h"
18#include "max_pool3_d.h"18#include "max_pool3_d.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "opdev/common_types.h"20#include "opdev/common_types.h"
21#include "opdev/make_op_executor.h"21#include "opdev/make_op_executor.h"
22#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
@@ -24,7 +24,7 @@
24#include "opdev/platform.h"24#include "opdev/platform.h"
25#include "opdev/shape_utils.h"25#include "opdev/shape_utils.h"
26#include "opdev/tensor_view_utils.h"26#include "opdev/tensor_view_utils.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "op_api/level2_base_caculation.h"28#include "op_api/level2_base_caculation.h"
29 29 
30using namespace op;30using namespace op;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/contiguous.h"12#include "aclnn_kernels/contiguous.h"
13#include "aclnn_kernels/reshape.h"13#include "aclnn_kernels/reshape.h"
14#include "aclnn_kernels/common/op_error_check.h"14#include "aclnn_kernels/common/op_error_check.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn/aclnn_base.h"16#include "aclnn/aclnn_base.h"
17#include "opdev/common_types.h"17#include "opdev/common_types.h"
18#include "opdev/shape_utils.h"18#include "opdev/shape_utils.h"
@@ -12,7 +12,7 @@
12#include "foreach_add_list_v2.h"12#include "foreach_add_list_v2.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "opdev/op_dfx.h"17#include "opdev/op_dfx.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
@@ -17,7 +17,7 @@
17#include "foreach_add_list_v2.h"17#include "foreach_add_list_v2.h"
18#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"18#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
19#include "aclnn_kernels/contiguous.h"19#include "aclnn_kernels/contiguous.h"
20-#include "op_api/op_api_def.h"20+#include "op_api/op_api_def_nn.h"
21#include "aclnn_kernels/common/op_error_check.h"21#include "aclnn_kernels/common/op_error_check.h"
22#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
23#include "opdev/make_op_executor.h"23#include "opdev/make_op_executor.h"
@@ -17,7 +17,7 @@
17#include <iostream>17#include <iostream>
18#include "foreach_add_scalar_v2.h"18#include "foreach_add_scalar_v2.h"
19#include "aclnn_kernels/contiguous.h"19#include "aclnn_kernels/contiguous.h"
20-#include "op_api/op_api_def.h"20+#include "op_api/op_api_def_nn.h"
21#include "op_api/aclnn_util.h"21#include "op_api/aclnn_util.h"
22#include "aclnn_kernels/common/op_error_check.h"22#include "aclnn_kernels/common/op_error_check.h"
23#include "opdev/op_dfx.h"23#include "opdev/op_dfx.h"
@@ -12,7 +12,7 @@
12#include "foreach_addcdiv_scalar_v2.h"12#include "foreach_addcdiv_scalar_v2.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18#include "opdev/make_op_executor.h"18#include "opdev/make_op_executor.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "aclnn_foreach_addcdiv_scalar_v2.h"16#include "aclnn_foreach_addcdiv_scalar_v2.h"
17#include "foreach_addcdiv_scalar_v2.h"17#include "foreach_addcdiv_scalar_v2.h"
18#include "aclnn_kernels/contiguous.h"18#include "aclnn_kernels/contiguous.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "aclnn_kernels/common/op_error_check.h"20#include "aclnn_kernels/common/op_error_check.h"
21#include "opdev/op_dfx.h"21#include "opdev/op_dfx.h"
22#include "opdev/make_op_executor.h"22#include "opdev/make_op_executor.h"
@@ -257,4 +257,4 @@ aclnnStatus aclnnForeachAddcdivScalarV2(void* workspace, uint64_t workspaceSize,
257 257 
258#ifdef __cplusplus258#ifdef __cplusplus
259}259}
260-#endif260+#endif
@@ -12,7 +12,7 @@
12#include "foreach_addcdiv_scalar_list.h"12#include "foreach_addcdiv_scalar_list.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "opdev/op_dfx.h"16#include "opdev/op_dfx.h"
17#include "opdev/make_op_executor.h"17#include "opdev/make_op_executor.h"
18#include "op_api/aclnn_util.h"18#include "op_api/aclnn_util.h"
@@ -1,12 +1,11 @@
1/**1/**
2- * This program is free software, you can redistribute it and/or modify.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3- * 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- * This file is a part of the CANN Open Software.4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Licensed under CANN Open Software License Agreement Version 2.0 (the "License").
6 * Please refer to the License for details. You may not use this file except in compliance with the License.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
7- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8- * BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. See LICENSE in the root of7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9- * the software repository for the full text of the License.8+ * See LICENSE in the root of the software repository for the full text of the License.
10 */9 */
11 10 
12/*!11/*!
@@ -17,7 +16,7 @@
17#include "aclnn_foreach_addcmul_scalar_v2.h"16#include "aclnn_foreach_addcmul_scalar_v2.h"
18#include "foreach_addcmul_scalar_v2.h"17#include "foreach_addcmul_scalar_v2.h"
19#include "aclnn_kernels/contiguous.h"18#include "aclnn_kernels/contiguous.h"
20-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
21#include "aclnn_kernels/common/op_error_check.h"20#include "aclnn_kernels/common/op_error_check.h"
22#include "op_api/aclnn_util.h"21#include "op_api/aclnn_util.h"
23#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
@@ -13,7 +13,7 @@
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15#include "op_api/aclnn_util.h"15#include "op_api/aclnn_util.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17#include "opdev/op_dfx.h"17#include "opdev/op_dfx.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19#include "opdev/make_op_executor.h"19#include "opdev/make_op_executor.h"
@@ -11,7 +11,7 @@
11#include "aclnn_foreach_div_scalar.h"11#include "aclnn_foreach_div_scalar.h"
12#include "foreach_div_scalar_v2.h"12#include "foreach_div_scalar_v2.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "aclnn_kernels/contiguous.h"15#include "aclnn_kernels/contiguous.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "foreach_div_scalar_v2.h"12#include "foreach_div_scalar_v2.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18#include "opdev/op_dfx.h"18#include "opdev/op_dfx.h"
@@ -12,7 +12,7 @@
12#include "foreach_lerp_list.h"12#include "foreach_lerp_list.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18#include "opdev/op_dfx.h"18#include "opdev/op_dfx.h"
@@ -12,7 +12,7 @@
12#include "foreach_lerp_scalar.h"12#include "foreach_lerp_scalar.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "op_api/aclnn_util.h"17#include "op_api/aclnn_util.h"
18#include "opdev/op_dfx.h"18#include "opdev/op_dfx.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#include "aclnn_foreach_maximum_scalar_v2.h"11#include "aclnn_foreach_maximum_scalar_v2.h"
12#include "foreach_maximum_scalar_v2.h"12#include "foreach_maximum_scalar_v2.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "opdev/platform.h"15#include "opdev/platform.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#include "aclnn_foreach_minimum_scalar_v2.h"11#include "aclnn_foreach_minimum_scalar_v2.h"
12#include "foreach_minimum_scalar_v2.h"12#include "foreach_minimum_scalar_v2.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "aclnn_kernels/common/op_error_check.h"15#include "aclnn_kernels/common/op_error_check.h"
16#include "opdev/op_dfx.h"16#include "opdev/op_dfx.h"
17#include "op_api/aclnn_util.h"17#include "op_api/aclnn_util.h"
@@ -247,4 +247,4 @@ aclnnStatus aclnnForeachMinimumScalarV2(void* workspace, uint64_t workspaceSize,
247 247 
248#ifdef __cplusplus248#ifdef __cplusplus
249}249}
250-#endif250+#endif
@@ -12,7 +12,7 @@
12#include "foreach_mul_list.h"12#include "foreach_mul_list.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "op_api/aclnn_util.h"17#include "op_api/aclnn_util.h"
18#include "opdev/op_dfx.h"18#include "opdev/op_dfx.h"
@@ -12,7 +12,7 @@
12#include "foreach_mul_scalar_v2.h"12#include "foreach_mul_scalar_v2.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14#include "op_api/aclnn_util.h"14#include "op_api/aclnn_util.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/op_dfx.h"17#include "opdev/op_dfx.h"
18#include "opdev/make_op_executor.h"18#include "opdev/make_op_executor.h"
@@ -207,4 +207,4 @@ aclnnStatus aclnnForeachMulScalarV2(void* workspace, uint64_t workspaceSize, acl
207 207 
208#ifdef __cplusplus208#ifdef __cplusplus
209}209}
210-#endif210+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#include "aclnn_foreach_pow_scalar_v2.h"11#include "aclnn_foreach_pow_scalar_v2.h"
12#include "foreach_pow_scalar_v2.h"12#include "foreach_pow_scalar_v2.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "op_api/aclnn_util.h"15#include "op_api/aclnn_util.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/platform.h"17#include "opdev/platform.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "aclnn_foreach_round_off_number_v2.h"16#include "aclnn_foreach_round_off_number_v2.h"
17#include "foreach_round_off_number_v2.h"17#include "foreach_round_off_number_v2.h"
18#include "aclnn_kernels/contiguous.h"18#include "aclnn_kernels/contiguous.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/aclnn_util.h"20#include "op_api/aclnn_util.h"
21#include "aclnn_kernels/common/op_error_check.h"21#include "aclnn_kernels/common/op_error_check.h"
22#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
@@ -12,7 +12,7 @@
12#include "foreach_sqrt.h"12#include "foreach_sqrt.h"
13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"13#include "../../foreach_utils/op_host/foreach_contiguous_helper.h"
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "op_api/aclnn_util.h"16#include "op_api/aclnn_util.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18#include "opdev/op_dfx.h"18#include "opdev/op_dfx.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "aclnn_foreach_sub_list_v2.h"16#include "aclnn_foreach_sub_list_v2.h"
17#include "foreach_sub_list_v2.h"17#include "foreach_sub_list_v2.h"
18#include "aclnn_kernels/contiguous.h"18#include "aclnn_kernels/contiguous.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/aclnn_util.h"20#include "op_api/aclnn_util.h"
21#include "aclnn_kernels/common/op_error_check.h"21#include "aclnn_kernels/common/op_error_check.h"
22#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "aclnn_foreach_sub_scalar_v2.h"16#include "aclnn_foreach_sub_scalar_v2.h"
17#include "foreach_sub_scalar_v2.h"17#include "foreach_sub_scalar_v2.h"
18#include "aclnn_kernels/contiguous.h"18#include "aclnn_kernels/contiguous.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/aclnn_util.h"20#include "op_api/aclnn_util.h"
21#include "aclnn_kernels/common/op_error_check.h"21#include "aclnn_kernels/common/op_error_check.h"
22#include "opdev/op_dfx.h"22#include "opdev/op_dfx.h"
@@ -24,7 +24,7 @@
24#include "aclnn_kernels/cast.h"24#include "aclnn_kernels/cast.h"
25#include "aclnn_kernels/reshape.h"25#include "aclnn_kernels/reshape.h"
26#include "aclnn_kernels/common/op_error_check.h"26#include "aclnn_kernels/common/op_error_check.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "op_api/aclnn_util.h"28#include "op_api/aclnn_util.h"
29#include "aclnn/aclnn_base.h"29#include "aclnn/aclnn_base.h"
30#include "opdev/common_types.h"30#include "opdev/common_types.h"
@@ -29,7 +29,7 @@
29#include "opdev/tensor_view_utils.h"29#include "opdev/tensor_view_utils.h"
30#include "opdev/small_vector.h"30#include "opdev/small_vector.h"
31#include "aclnn_kernels/common/op_error_check.h"31#include "aclnn_kernels/common/op_error_check.h"
32-#include "op_api/op_api_def.h"32+#include "op_api/op_api_def_nn.h"
33#include "op_api/aclnn_util.h"33#include "op_api/aclnn_util.h"
34#include "util/math_util.h"34#include "util/math_util.h"
35 35 
@@ -32,7 +32,7 @@
32#include "aclnn_kernels/transpose.h"32#include "aclnn_kernels/transpose.h"
33#include "opdev/common_types.h"33#include "opdev/common_types.h"
34#include "aclnn_kernels/common/op_error_check.h"34#include "aclnn_kernels/common/op_error_check.h"
35-#include "op_api/op_api_def.h"35+#include "op_api/op_api_def_nn.h"
36#include "op_api/aclnn_util.h"36#include "op_api/aclnn_util.h"
37#include "opdev/data_type_utils.h"37#include "opdev/data_type_utils.h"
38#include "opdev/format_utils.h"38#include "opdev/format_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
17#include "aclnn_kernels/contiguous.h"17#include "aclnn_kernels/contiguous.h"
18#include "aclnn_kernels/transpose.h"18#include "aclnn_kernels/transpose.h"
19#include "aclnn_kernels/common/op_error_check.h"19#include "aclnn_kernels/common/op_error_check.h"
20-#include "op_api/op_api_def.h"20+#include "op_api/op_api_def_nn.h"
21#include "aclnn/aclnn_base.h"21#include "aclnn/aclnn_base.h"
22#include "opdev/common_types.h"22#include "opdev/common_types.h"
23#include "opdev/data_type_utils.h"23#include "opdev/data_type_utils.h"
@@ -572,4 +572,4 @@ aclnnStatus aclnnIndex(void* workspace, uint64_t workspaceSize, aclOpExecutor* e
572 572 
573#ifdef __cplusplus573#ifdef __cplusplus
574}574}
575-#endif575+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
27#include "aclnn_kernels/contiguous.h"27#include "aclnn_kernels/contiguous.h"
28#include "aclnn_kernels/reshape.h"28#include "aclnn_kernels/reshape.h"
29#include "aclnn_kernels/common/op_error_check.h"29#include "aclnn_kernels/common/op_error_check.h"
30-#include "op_api/op_api_def.h"30+#include "op_api/op_api_def_nn.h"
31#include "aclnn/aclnn_base.h"31#include "aclnn/aclnn_base.h"
32#include "opdev/common_types.h"32#include "opdev/common_types.h"
33#include "opdev/data_type_utils.h"33#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
27#include "opdev/tensor_view_utils.h"27#include "opdev/tensor_view_utils.h"
28#include "opdev/platform.h"28#include "opdev/platform.h"
29#include "aclnn_kernels/common/op_error_check.h"29#include "aclnn_kernels/common/op_error_check.h"
30-#include "op_api/op_api_def.h"30+#include "op_api/op_api_def_nn.h"
31 31 
32using namespace op;32using namespace op;
33#ifdef __cplusplus33#ifdef __cplusplus
@@ -18,7 +18,7 @@
18#include "aclnn_kernels/transpose.h"18#include "aclnn_kernels/transpose.h"
19 19 
20#include "aclnn_kernels/common/op_error_check.h"20#include "aclnn_kernels/common/op_error_check.h"
21-#include "op_api/op_api_def.h"21+#include "op_api/op_api_def_nn.h"
22#include "op_api/aclnn_util.h"22#include "op_api/aclnn_util.h"
23#include "opdev/op_dfx.h"23#include "opdev/op_dfx.h"
24#include "opdev/op_executor.h"24#include "opdev/op_executor.h"
@@ -1,11 +1,10 @@
1/**1/**
2- * This program is free software, you can redistribute it and/or modify it.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3- * 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- * This file is a part of the CANN Open Software.4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Licensed under CANN Open Software License Agreement Version 2.0 (the "License").
6 * Please refer to the License for details. You may not use this file except in compliance with the License.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
7- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8- * BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
10 */9 */
11 10 
@@ -25,7 +24,7 @@
25#include "opdev/shape_utils.h"24#include "opdev/shape_utils.h"
26#include "opdev/tensor_view_utils.h"25#include "opdev/tensor_view_utils.h"
27#include "aclnn_kernels/common/op_error_check.h"26#include "aclnn_kernels/common/op_error_check.h"
28-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
29#include "op_api/level2_base.h"28#include "op_api/level2_base.h"
30 29 
31using namespace op;30using namespace op;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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")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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
29#include "aclnn_kernels/common/op_error_check.h"29#include "aclnn_kernels/common/op_error_check.h"
30#include "op_api/aclnn_util.h"30#include "op_api/aclnn_util.h"
31#include "op_api/level2_base.h"31#include "op_api/level2_base.h"
32-#include "op_api/op_api_def.h"32+#include "op_api/op_api_def_nn.h"
33 33 
34using namespace op;34using namespace op;
35#ifdef __cplusplus35#ifdef __cplusplus
@@ -27,7 +27,7 @@
27#include "opdev/op_log.h"27#include "opdev/op_log.h"
28#include "opdev/tensor_view_utils.h"28#include "opdev/tensor_view_utils.h"
29#include "aclnn_kernels/common/op_error_check.h"29#include "aclnn_kernels/common/op_error_check.h"
30-#include "op_api/op_api_def.h"30+#include "op_api/op_api_def_nn.h"
31#include "op_api/aclnn_util.h"31#include "op_api/aclnn_util.h"
32#include "op_api/level2_base.h"32#include "op_api/level2_base.h"
33 33 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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")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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@
35#include "aclnn_kernels/reshape.h"35#include "aclnn_kernels/reshape.h"
36 36 
37#include "aclnn_kernels/common/op_error_check.h"37#include "aclnn_kernels/common/op_error_check.h"
38-#include "op_api/op_api_def.h"38+#include "op_api/op_api_def_nn.h"
39#include "opdev/make_op_executor.h"39#include "opdev/make_op_executor.h"
40#include "opdev/op_dfx.h"40#include "opdev/op_dfx.h"
41#include "opdev/op_executor.h"41#include "opdev/op_executor.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14 14 
15#include "aclnn/aclnn_base.h"15#include "aclnn/aclnn_base.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/common_types.h"18#include "opdev/common_types.h"
19#include "opdev/data_type_utils.h"19#include "opdev/data_type_utils.h"
20#include "opdev/shape_utils.h"20#include "opdev/shape_utils.h"
@@ -18,7 +18,7 @@
18#include "aclnn_kernels/contiguous.h"18#include "aclnn_kernels/contiguous.h"
19#include "aclnn_kernels/transdata.h"19#include "aclnn_kernels/transdata.h"
20#include "aclnn_kernels/cast.h"20#include "aclnn_kernels/cast.h"
21-#include "op_api/op_api_def.h"21+#include "op_api/op_api_def_nn.h"
22#include "aclnn_kernels/common/op_error_check.h"22#include "aclnn_kernels/common/op_error_check.h"
23#include "opdev/common_types.h"23#include "opdev/common_types.h"
24#include "opdev/data_type_utils.h"24#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#ifndef LEVEL2_BASE_LOSS_H_11#ifndef LEVEL2_BASE_LOSS_H_
12#define LEVEL2_BASE_LOSS_H_12#define LEVEL2_BASE_LOSS_H_
13 13 
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "aclnn/aclnn_base.h"15#include "aclnn/aclnn_base.h"
16#include "opdev/shape_utils.h"16#include "opdev/shape_utils.h"
17#include "level0/fill.h"17#include "level0/fill.h"
@@ -84,4 +84,4 @@ inline static bool CheckReductionMseLoss(int64_t reduction, int64_t REDUCTION_SU
84#ifdef __cplusplus84#ifdef __cplusplus
85}85}
86#endif86#endif
87-#endif // LEVEL2_BASE_LOSS_H_87+#endif // LEVEL2_BASE_LOSS_H_
@@ -15,7 +15,7 @@
15#include "aclnn_kernels/contiguous.h"15#include "aclnn_kernels/contiguous.h"
16#include "aclnn_kernels/cast.h"16#include "aclnn_kernels/cast.h"
17#include "aclnn_kernels/transdata.h"17#include "aclnn_kernels/transdata.h"
18-#include "op_api/op_api_def.h"18+#include "op_api/op_api_def_nn.h"
19#include "op_api/aclnn_util.h"19#include "op_api/aclnn_util.h"
20#include "opdev/common_types.h"20#include "opdev/common_types.h"
21#include "opdev/data_type_utils.h"21#include "opdev/data_type_utils.h"
@@ -14,7 +14,7 @@
14#include "../../../op_api/aclnn_binary_cross_entropy_with_logits_backward.h"14#include "../../../op_api/aclnn_binary_cross_entropy_with_logits_backward.h"
15#include "op_api_ut_common/op_api_ut.h"15#include "op_api_ut_common/op_api_ut.h"
16#include "op_api_ut_common/tensor_desc.h"16#include "op_api_ut_common/tensor_desc.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/platform.h"18#include "opdev/platform.h"
19 19 
20using namespace std;20using namespace std;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
26#include "opdev/op_executor.h"26#include "opdev/op_executor.h"
27#include "opdev/op_log.h"27#include "opdev/op_log.h"
28#include "opdev/tensor_view_utils.h"28#include "opdev/tensor_view_utils.h"
29-#include "op_api/op_api_def.h"29+#include "op_api/op_api_def_nn.h"
30#include "aclnn_kernels/common/op_error_check.h"30#include "aclnn_kernels/common/op_error_check.h"
31#include "op_api/aclnn_util.h"31#include "op_api/aclnn_util.h"
32 32 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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")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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14 */14 */
15 15 
16#include "aclnn_smooth_l1_loss_backward.h"16#include "aclnn_smooth_l1_loss_backward.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19#include "aclnn_kernels/cast.h"19#include "aclnn_kernels/cast.h"
20#include "aclnn_kernels/contiguous.h"20#include "aclnn_kernels/contiguous.h"
@@ -267,4 +267,4 @@ aclnnStatus aclnnSmoothL1LossBackward(void* workspace, uint64_t workspaceSize, a
267 267 
268#ifdef __cplusplus268#ifdef __cplusplus
269}269}
270-#endif270+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
24#include "opdev/op_log.h"24#include "opdev/op_log.h"
25#include "opdev/shape_utils.h"25#include "opdev/shape_utils.h"
26#include "opdev/tensor_view_utils.h"26#include "opdev/tensor_view_utils.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "op_api/aclnn_util.h"28#include "op_api/aclnn_util.h"
29 29 
30using namespace op;30using namespace op;
@@ -330,4 +330,4 @@ aclnnStatus aclnnSmoothL1Loss(void* workspace, uint64_t workspaceSize, aclOpExec
330 330 
331#ifdef __cplusplus331#ifdef __cplusplus
332}332}
333-#endif333+#endif
@@ -22,7 +22,7 @@
22#include "opdev/shape_utils.h"22#include "opdev/shape_utils.h"
23#include "opdev/tensor_view_utils.h"23#include "opdev/tensor_view_utils.h"
24#include "aclnn_kernels/common/op_error_check.h"24#include "aclnn_kernels/common/op_error_check.h"
25-#include "op_api/op_api_def.h"25+#include "op_api/op_api_def_nn.h"
26#include "loss/common/level2_base_loss.h"26#include "loss/common/level2_base_loss.h"
27 27 
28using namespace op;28using namespace op;
@@ -14,7 +14,7 @@
14#include "level0/broadcast_to.h"14#include "level0/broadcast_to.h"
15#include "soft_margin_loss_grad.h"15#include "soft_margin_loss_grad.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/common_types.h"18#include "opdev/common_types.h"
19#include "opdev/data_type_utils.h"19#include "opdev/data_type_utils.h"
20#include "opdev/format_utils.h"20#include "opdev/format_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "gtest/gtest.h"12#include "gtest/gtest.h"
13 13 
14#include "../../../op_host/op_api/aclnn_addmv.h"14#include "../../../op_host/op_api/aclnn_addmv.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16 16 
17#include "op_api_ut_common/op_api_ut.h"17#include "op_api_ut_common/op_api_ut.h"
18#include "op_api_ut_common/scalar_desc.h"18#include "op_api_ut_common/scalar_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14#include "gtest/gtest.h"14#include "gtest/gtest.h"
15 15 
16#include "../../../op_host/op_api/aclnn_addbmm.h"16#include "../../../op_host/op_api/aclnn_addbmm.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/platform.h"18#include "opdev/platform.h"
19 19 
20#include "op_api_ut_common/tensor_desc.h"20#include "op_api_ut_common/tensor_desc.h"
@@ -1244,4 +1244,4 @@ TEST_F(l2_addbmm_test, addbmm_inplace_310_FP32_FP16_FP16FP32_KEEP_DTYPE)
1244 uint64_t workspace_size = 0;1244 uint64_t workspace_size = 0;
1245 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size);1245 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size);
1246 EXPECT_EQ(aclRet, ACLNN_ERR_PARAM_INVALID);1246 EXPECT_EQ(aclRet, ACLNN_ERR_PARAM_INVALID);
1247-}1247+}
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14#include "gtest/gtest.h"14#include "gtest/gtest.h"
15 15 
16#include "../../../op_host/op_api/aclnn_baddbmm.h"16#include "../../../op_host/op_api/aclnn_baddbmm.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/platform.h"18#include "opdev/platform.h"
19 19 
20#include "op_api_ut_common/tensor_desc.h"20#include "op_api_ut_common/tensor_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14 14 
15#include "../../../op_host/op_api/aclnn_batch_matmul.h"15#include "../../../op_host/op_api/aclnn_batch_matmul.h"
16#include "opdev/platform.h"16#include "opdev/platform.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "op_api_ut_common/op_api_ut.h"18#include "op_api_ut_common/op_api_ut.h"
19#include "op_api_ut_common/scalar_desc.h"19#include "op_api_ut_common/scalar_desc.h"
20#include "op_api_ut_common/tensor_desc.h"20#include "op_api_ut_common/tensor_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
17#include "op_api_ut_common/op_api_ut.h"17#include "op_api_ut_common/op_api_ut.h"
18#include "op_api_ut_common/scalar_desc.h"18#include "op_api_ut_common/scalar_desc.h"
19#include "op_api_ut_common/tensor_desc.h"19#include "op_api_ut_common/tensor_desc.h"
20-#include "op_api/op_api_def.h"20+#include "op_api/op_api_def_nn.h"
21 21 
22using namespace std;22using namespace std;
23using namespace op;23using namespace op;
@@ -225,4 +225,4 @@ TEST_F(l2_batch_matmul_weight_nz_test, batch_matmul_NZ_310_FP32_FP16_FP16FP32_KE
225 TensorDesc b_desc = TensorDesc({2, 32, 32}, ACL_FLOAT16, ACL_FORMAT_FRACTAL_NZ, {}, 0, {2, 2, 2, 16, 16});225 TensorDesc b_desc = TensorDesc({2, 32, 32}, ACL_FLOAT16, ACL_FORMAT_FRACTAL_NZ, {}, 0, {2, 2, 2, 16, 16});
226 TensorDesc out_desc = TensorDesc({2, 32, 32}, ACL_FLOAT, ACL_FORMAT_ND);226 TensorDesc out_desc = TensorDesc({2, 32, 32}, ACL_FLOAT, ACL_FORMAT_ND);
227 BatchMatMulCommonTest(a_desc, b_desc, out_desc, ACLNN_ERR_PARAM_INVALID, FP16FP32_KEEP_DTYPE);227 BatchMatMulCommonTest(a_desc, b_desc, out_desc, ACLNN_ERR_PARAM_INVALID, FP16FP32_KEEP_DTYPE);
228-}228+}
@@ -14,7 +14,7 @@
14#include "aclnn_kernels/common/op_error_check.h"14#include "aclnn_kernels/common/op_error_check.h"
15#include "aclnn_kernels/contiguous.h"15#include "aclnn_kernels/contiguous.h"
16#include "aclnn_kernels/reshape.h"16#include "aclnn_kernels/reshape.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "matmul/common/op_host/op_api/matmul.h"18#include "matmul/common/op_host/op_api/matmul.h"
19#include "matmul/common/op_host/op_api/batch_matmul.h"19#include "matmul/common/op_host/op_api/batch_matmul.h"
20#include "level0/fill.h"20#include "level0/fill.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -10,7 +10,7 @@
10#pragma once10#pragma once
11 11 
12#include "aclnn/aclnn_base.h"12#include "aclnn/aclnn_base.h"
13-#include "op_api/op_api_def.h"13+#include "op_api/op_api_def_nn.h"
14#include "opdev/common_types.h"14#include "opdev/common_types.h"
15#include "opdev/platform.h"15#include "opdev/platform.h"
16 16 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
30#include "opdev/platform.h"30#include "opdev/platform.h"
31#include "opdev/op_log.h"31#include "opdev/op_log.h"
32#include "opdev/shape_utils.h"32#include "opdev/shape_utils.h"
33-#include "op_api/op_api_def.h"33+#include "op_api/op_api_def_nn.h"
34#include "matmul/common/op_host/math_util.h"34#include "matmul/common/op_host/math_util.h"
35 35 
36using namespace std;36using namespace std;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13#include "gtest/gtest.h"13#include "gtest/gtest.h"
14 14 
15#include "../../../op_api/aclnn_fused_linear_online_max_sum.h"15#include "../../../op_api/aclnn_fused_linear_online_max_sum.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17 17 
18#include "op_api_ut_common/op_api_ut.h"18#include "op_api_ut_common/op_api_ut.h"
19#include "op_api_ut_common/scalar_desc.h"19#include "op_api_ut_common/scalar_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "gtest/gtest.h"12#include "gtest/gtest.h"
13 13 
14#include "../../../op_host/op_api/aclnn_fused_matmul.h"14#include "../../../op_host/op_api/aclnn_fused_matmul.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16 16 
17#include "op_api_ut_common/op_api_ut.h"17#include "op_api_ut_common/op_api_ut.h"
18#include "op_api_ut_common/scalar_desc.h"18#include "op_api_ut_common/scalar_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13#include "gtest/gtest.h"13#include "gtest/gtest.h"
14 14 
15#include "../../../op_host/op_api/aclnn_gemm.h"15#include "../../../op_host/op_api/aclnn_gemm.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17 17 
18#include "op_api_ut_common/tensor_desc.h"18#include "op_api_ut_common/tensor_desc.h"
19#include "op_api_ut_common/scalar_desc.h"19#include "op_api_ut_common/scalar_desc.h"
@@ -35,7 +35,7 @@
35#include "matmul/common/op_host/op_api/cube_util.h"35#include "matmul/common/op_host/op_api/cube_util.h"
36#include "matmul/common/op_host/op_api/matmul_util.h"36#include "matmul/common/op_host/op_api/matmul_util.h"
37#include "matmul/common/op_host/op_api/batch_matmul_util.h"37#include "matmul/common/op_host/op_api/batch_matmul_util.h"
38-#include "op_api/op_api_def.h"38+#include "op_api/op_api_def_nn.h"
39 39 
40using Ops::Base::CeilDiv;40using Ops::Base::CeilDiv;
41using namespace Ops::NN;41using namespace Ops::NN;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14#include "gtest/gtest.h"14#include "gtest/gtest.h"
15 15 
16#include "../../../op_host/op_api/aclnn_addmm.h"16#include "../../../op_host/op_api/aclnn_addmm.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "opdev/platform.h"18#include "opdev/platform.h"
19 19 
20#include "op_api_ut_common/tensor_desc.h"20#include "op_api_ut_common/tensor_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "gtest/gtest.h"12#include "gtest/gtest.h"
13 13 
14#include "../../../op_host/op_api/aclnn_addmm.h"14#include "../../../op_host/op_api/aclnn_addmm.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "opdev/platform.h"16#include "opdev/platform.h"
17 17 
18#include "op_api_ut_common/op_api_ut.h"18#include "op_api_ut_common/op_api_ut.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13#include "gtest/gtest.h"13#include "gtest/gtest.h"
14 14 
15#include "../../../op_host/op_api/aclnn_matmul.h"15#include "../../../op_host/op_api/aclnn_matmul.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17#include "opdev/platform.h"17#include "opdev/platform.h"
18#include "op_api_ut_common/op_api_ut.h"18#include "op_api_ut_common/op_api_ut.h"
19#include "op_api_ut_common/scalar_desc.h"19#include "op_api_ut_common/scalar_desc.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13#include "gtest/gtest.h"13#include "gtest/gtest.h"
14 14 
15#include "../../../op_host/op_api/aclnn_matmul.h"15#include "../../../op_host/op_api/aclnn_matmul.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17#include "opdev/platform.h"17#include "opdev/platform.h"
18 18 
19#include "op_api_ut_common/op_api_ut.h"19#include "op_api_ut_common/op_api_ut.h"
@@ -231,4 +231,4 @@ TEST_F(l2_matmulWeightNz_test, matmul_NZ_310_FP32_FP16_FP16FP32_KEEP_DTYPE)
231 TensorDesc b_desc = TensorDesc({32, 32}, ACL_FLOAT16, ACL_FORMAT_FRACTAL_NZ, {}, 0, {2, 2, 16, 16});231 TensorDesc b_desc = TensorDesc({32, 32}, ACL_FLOAT16, ACL_FORMAT_FRACTAL_NZ, {}, 0, {2, 2, 16, 16});
232 TensorDesc out_desc = TensorDesc({32, 32}, ACL_FLOAT, ACL_FORMAT_ND);232 TensorDesc out_desc = TensorDesc({32, 32}, ACL_FLOAT, ACL_FORMAT_ND);
233 MatMulCommonTest(a_desc, b_desc, out_desc, ACLNN_ERR_PARAM_INVALID, FP16FP32_KEEP_DTYPE);233 MatMulCommonTest(a_desc, b_desc, out_desc, ACLNN_ERR_PARAM_INVALID, FP16FP32_KEEP_DTYPE);
234-}234+}
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13#include "gtest/gtest.h"13#include "gtest/gtest.h"
14 14 
15#include "../../../op_host/op_api/aclnn_mm.h"15#include "../../../op_host/op_api/aclnn_mm.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17#include "opdev/platform.h"17#include "opdev/platform.h"
18 18 
19#include "op_api_ut_common/op_api_ut.h"19#include "op_api_ut_common/op_api_ut.h"
@@ -1269,4 +1269,4 @@ TEST_F(l2_mm_test, mm_V2_BF16_BF16_FP32_KEEP_DTYPE)
1269 uint64_t workspace_size = 0;1269 uint64_t workspace_size = 0;
1270 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size);1270 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size);
1271 EXPECT_EQ(aclRet, ACL_SUCCESS);1271 EXPECT_EQ(aclRet, ACL_SUCCESS);
1272-}1272+}
@@ -13,7 +13,7 @@
13#include "gtest/gtest.h"13#include "gtest/gtest.h"
14 14 
15#include "../../../op_api/aclnn_matmul_compress.h"15#include "../../../op_api/aclnn_matmul_compress.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17 17 
18#include "op_api_ut_common/tensor_desc.h"18#include "op_api_ut_common/tensor_desc.h"
19#include "op_api_ut_common/scalar_desc.h"19#include "op_api_ut_common/scalar_desc.h"
@@ -48,4 +48,4 @@ TEST_F(l2_matmul_compress_test, test_fp16)
48 TensorDesc compressIndex_desc = TensorDesc({1024}, ACL_INT8, ACL_FORMAT_ND);48 TensorDesc compressIndex_desc = TensorDesc({1024}, ACL_INT8, ACL_FORMAT_ND);
49 TensorDesc out_desc = TensorDesc({1024, 1024}, ACL_FLOAT16, ACL_FORMAT_ND);49 TensorDesc out_desc = TensorDesc({1024, 1024}, ACL_FLOAT16, ACL_FORMAT_ND);
50 MatMulCompressTest(x_desc, weight_desc, bias_desc, compressIndex_desc, out_desc, ACL_SUCCESS);50 MatMulCompressTest(x_desc, weight_desc, bias_desc, compressIndex_desc, out_desc, ACL_SUCCESS);
51-}51+}
@@ -32,7 +32,7 @@
32 32 
33#include "matmul/common/op_host/op_api/cube_util.h"33#include "matmul/common/op_host/op_api/cube_util.h"
34#include "matmul/common/op_host/op_api/matmul_util.h"34#include "matmul/common/op_host/op_api/matmul_util.h"
35-#include "op_api/op_api_def.h"35+#include "op_api/op_api_def_nn.h"
36 36 
37using namespace std;37using namespace std;
38using namespace op;38using namespace op;
@@ -9,7 +9,7 @@
9 */9 */
10#include "aclnn_weight_quant_batch_matmul.h"10#include "aclnn_weight_quant_batch_matmul.h"
11 11 
12-#include "op_api/op_api_def.h"12+#include "op_api/op_api_def_nn.h"
13#include "aclnn_kernels/common/op_error_check.h"13#include "aclnn_kernels/common/op_error_check.h"
14#include "opdev/common_types.h"14#include "opdev/common_types.h"
15#include "opdev/op_dfx.h"15#include "opdev/op_dfx.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#include "add_layer_norm_quant.h"11#include "add_layer_norm_quant.h"
12#include "aclnn_kernels/cast.h"12#include "aclnn_kernels/cast.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "aclnn/aclnn_base.h"15#include "aclnn/aclnn_base.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/common_types.h"17#include "opdev/common_types.h"
@@ -11,7 +11,7 @@
11#include "add_layer_norm_quant_v2.h"11#include "add_layer_norm_quant_v2.h"
12#include "aclnn_kernels/cast.h"12#include "aclnn_kernels/cast.h"
13#include "aclnn_kernels/contiguous.h"13#include "aclnn_kernels/contiguous.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "aclnn/aclnn_base.h"15#include "aclnn/aclnn_base.h"
16#include "aclnn_kernels/common/op_error_check.h"16#include "aclnn_kernels/common/op_error_check.h"
17#include "opdev/common_types.h"17#include "opdev/common_types.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -8,7 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10#include "aclnn/aclnn_base.h"10#include "aclnn/aclnn_base.h"
11-#include "op_api/op_api_def.h"11+#include "op_api/op_api_def_nn.h"
12 12 
13#include "opdev/common_types.h"13#include "opdev/common_types.h"
14#include "opdev/data_type_utils.h"14#include "opdev/data_type_utils.h"
@@ -8,7 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10#include "aclnn/aclnn_base.h"10#include "aclnn/aclnn_base.h"
11-#include "op_api/op_api_def.h"11+#include "op_api/op_api_def_nn.h"
12 12 
13#include "opdev/common_types.h"13#include "opdev/common_types.h"
14#include "opdev/data_type_utils.h"14#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -8,7 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10#include "aclnn/aclnn_base.h"10#include "aclnn/aclnn_base.h"
11-#include "op_api/op_api_def.h"11+#include "op_api/op_api_def_nn.h"
12#include "opdev/common_types.h"12#include "opdev/common_types.h"
13#include "opdev/data_type_utils.h"13#include "opdev/data_type_utils.h"
14#include "opdev/format_utils.h"14#include "opdev/format_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -8,7 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10#include "aclnn/aclnn_base.h"10#include "aclnn/aclnn_base.h"
11-#include "op_api/op_api_def.h"11+#include "op_api/op_api_def_nn.h"
12 12 
13#include "opdev/common_types.h"13#include "opdev/common_types.h"
14#include "opdev/data_type_utils.h"14#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "aclnn_kernels/transdata.h"16#include "aclnn_kernels/transdata.h"
17#include "aclnn_kernels/contiguous.h"17#include "aclnn_kernels/contiguous.h"
18#include "aclnn/aclnn_base.h"18#include "aclnn/aclnn_base.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "aclnn_kernels/common/op_error_check.h"20#include "aclnn_kernels/common/op_error_check.h"
21#include "opdev/common_types.h"21#include "opdev/common_types.h"
22#include "opdev/data_type_utils.h"22#include "opdev/data_type_utils.h"
@@ -1,19 +1,18 @@
1/**1/**
2- * This program is free software, you can redistribute it and/or modify.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3- * 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- * This file is a part of the CANN Open Software.4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Licensed under CANN Open Software License Agreement Version 2.0 (the "License").
6 * Please refer to the License for details. You may not use this file except in compliance with the License.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
7- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8- * BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. See LICENSE in the root of7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9- * the software repository for the full text of the License.8+ * See LICENSE in the root of the software repository for the full text of the License.
10 */9 */
11 10 
12#include "gtest/gtest.h"11#include "gtest/gtest.h"
13#include "../../../../op_host/op_api/aclnn_fast_batch_norm_backward.h"12#include "../../../../op_host/op_api/aclnn_fast_batch_norm_backward.h"
14#include "op_api_ut_common/op_api_ut.h"13#include "op_api_ut_common/op_api_ut.h"
15#include "op_api_ut_common/tensor_desc.h"14#include "op_api_ut_common/tensor_desc.h"
16-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
17#include "opdev/platform.h"16#include "opdev/platform.h"
18 17 
19class l2FastBatchNormBackwardTest : public testing::Test {18class l2FastBatchNormBackwardTest : public testing::Test {
@@ -24,7 +24,7 @@
24#include "group_norm.h"24#include "group_norm.h"
25#include "aclnn_kernels/cast.h"25#include "aclnn_kernels/cast.h"
26#include "aclnn_kernels/common/op_error_check.h"26#include "aclnn_kernels/common/op_error_check.h"
27-#include "op_api/op_api_def.h"27+#include "op_api/op_api_def_nn.h"
28#include "aclnn/aclnn_base.h"28#include "aclnn/aclnn_base.h"
29#include "opdev/common_types.h"29#include "opdev/common_types.h"
30#include "opdev/data_type_utils.h"30#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@
39#include "opdev/platform.h"39#include "opdev/platform.h"
40#include "op_api/level2_base.h"40#include "op_api/level2_base.h"
41#include "op_api/aclnn_util.h"41#include "op_api/aclnn_util.h"
42-#include "op_api/op_api_def.h"42+#include "op_api/op_api_def_nn.h"
43#include "aclnn_group_norm_backward.h"43#include "aclnn_group_norm_backward.h"
44 44 
45using namespace op;45using namespace op;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "level0/fill.h"16#include "level0/fill.h"
17#include "aclnn_kernels/contiguous.h"17#include "aclnn_kernels/contiguous.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/aclnn_util.h"20#include "op_api/aclnn_util.h"
21#include "aclnn_group_norm_silu.h"21#include "aclnn_group_norm_silu.h"
22#include "aclnn/aclnn_base.h"22#include "aclnn/aclnn_base.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15#include "aclnn_kernels/cast.h"15#include "aclnn_kernels/cast.h"
16#include "level0/fill.h"16#include "level0/fill.h"
17#include "aclnn_kernels/common/op_error_check.h"17#include "aclnn_kernels/common/op_error_check.h"
18-#include "op_api/op_api_def.h"18+#include "op_api/op_api_def_nn.h"
19#include "aclnn_group_norm_silu_quant.h"19#include "aclnn_group_norm_silu_quant.h"
20#include "aclnn/aclnn_base.h"20#include "aclnn/aclnn_base.h"
21 21 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/cast.h"12#include "aclnn_kernels/cast.h"
13#include "aclnn_kernels/reshape.h"13#include "aclnn_kernels/reshape.h"
14#include "aclnn_kernels/common/op_error_check.h"14#include "aclnn_kernels/common/op_error_check.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn/aclnn_base.h"16#include "aclnn/aclnn_base.h"
17#include "opdev/common_types.h"17#include "opdev/common_types.h"
18#include "opdev/shape_utils.h"18#include "opdev/shape_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
17#include "lp_norm_v2.h"17#include "lp_norm_v2.h"
18#include "aclnn_kernels/cast.h"18#include "aclnn_kernels/cast.h"
19#include "aclnn_kernels/contiguous.h"19#include "aclnn_kernels/contiguous.h"
20-#include "op_api/op_api_def.h"20+#include "op_api/op_api_def_nn.h"
21#include "aclnn/aclnn_base.h"21#include "aclnn/aclnn_base.h"
22#include "opdev/common_types.h"22#include "opdev/common_types.h"
23#include "opdev/op_dfx.h"23#include "opdev/op_dfx.h"
@@ -16,7 +16,7 @@
16#include "opdev/op_log.h"16#include "opdev/op_log.h"
17#include "opdev/platform.h"17#include "opdev/platform.h"
18#include "opdev/shape_utils.h"18#include "opdev/shape_utils.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "opdev/tensor_view_utils.h"20#include "opdev/tensor_view_utils.h"
21#include "level0/broadcast_to.h"21#include "level0/broadcast_to.h"
22#include "aclnn_kernels/cast.h"22#include "aclnn_kernels/cast.h"
@@ -8,7 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10#include "aclnn/aclnn_base.h"10#include "aclnn/aclnn_base.h"
11-#include "op_api/op_api_def.h"11+#include "op_api/op_api_def_nn.h"
12 12 
13#include "opdev/common_types.h"13#include "opdev/common_types.h"
14#include "opdev/data_type_utils.h"14#include "opdev/data_type_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "level0/reduce_sum_op.h"16#include "level0/reduce_sum_op.h"
17#include "level0/unsqueeze.h"17#include "level0/unsqueeze.h"
18#include "aclnn/aclnn_base.h"18#include "aclnn/aclnn_base.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "opdev/common_types.h"20#include "opdev/common_types.h"
21#include "opdev/data_type_utils.h"21#include "opdev/data_type_utils.h"
22#include "opdev/format_utils.h"22#include "opdev/format_utils.h"
@@ -423,4 +423,4 @@ aclnnStatus aclnnBatchNormElemtBackward(void* workspace, uint64_t workspaceSize,
423 423 
424#ifdef __cplusplus424#ifdef __cplusplus
425}425}
426-#endif426+#endif
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13#include "op_api_ut_common/op_api_ut.h"13#include "op_api_ut_common/op_api_ut.h"
14#include "op_api_ut_common/tensor_desc.h"14#include "op_api_ut_common/tensor_desc.h"
15#include "opdev/platform.h"15#include "opdev/platform.h"
16-#include "op_api/op_api_def.h"16+#include "op_api/op_api_def_nn.h"
17 17 
18class l2BatchNormElemtBackwardTest : public testing::Test {18class l2BatchNormElemtBackwardTest : public testing::Test {
19protected:19protected:
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14#include "aclnn_kernels/contiguous.h"14#include "aclnn_kernels/contiguous.h"
15#include "level0/mul.h"15#include "level0/mul.h"
16#include "level0/reduce_sum_op.h"16#include "level0/reduce_sum_op.h"
17-#include "op_api/op_api_def.h"17+#include "op_api/op_api_def_nn.h"
18#include "aclnn_kernels/common/op_error_check.h"18#include "aclnn_kernels/common/op_error_check.h"
19#include "opdev/op_log.h"19#include "opdev/op_log.h"
20#include "opdev/op_dfx.h"20#include "opdev/op_dfx.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
22#include "sync_batch_norm_gather_stats_with_counts.h"22#include "sync_batch_norm_gather_stats_with_counts.h"
23#include "norm/sync_batch_norm_gather_stats_fused/op_host/op_api/sync_batch_norm_gather_stats_fused.h"23#include "norm/sync_batch_norm_gather_stats_fused/op_host/op_api/sync_batch_norm_gather_stats_fused.h"
24#include "aclnn/aclnn_base.h"24#include "aclnn/aclnn_base.h"
25-#include "op_api/op_api_def.h"25+#include "op_api/op_api_def_nn.h"
26#include "aclnn_kernels/common/op_error_check.h"26#include "aclnn_kernels/common/op_error_check.h"
27#include "opdev/op_dfx.h"27#include "opdev/op_dfx.h"
28#include "opdev/op_executor.h"28#include "opdev/op_executor.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
19#include "opdev/shape_utils.h"19#include "opdev/shape_utils.h"
20#include "opdev/tensor_view_utils.h"20#include "opdev/tensor_view_utils.h"
21#include "opdev/framework_op.h"21#include "opdev/framework_op.h"
22-#include "op_api/op_api_def.h"22+#include "op_api/op_api_def_nn.h"
23#include "aclnn_kernels/common/op_error_check.h"23#include "aclnn_kernels/common/op_error_check.h"
24#include "op_api/aclnn_util.h"24#include "op_api/aclnn_util.h"
25 25 
@@ -776,7 +776,7 @@ static aclnnStatus BuildAvgPool2dTo3dGraph(UniqueExecutor& uniqueExecutor, const
776 CHECK_RET(avgpoolIn != nullptr, ACLNN_ERR_INNER_NULLPTR);776 CHECK_RET(avgpoolIn != nullptr, ACLNN_ERR_INNER_NULLPTR);
777 }777 }
778 778 
779- //执行L0算子779+ // 执行L0算子
780 auto avgpoolOut = l0op::AvgPool3D(avgpoolIn, kernelSize, stride, pad, ceilMode, countIncludePad, divisorOverride,780 auto avgpoolOut = l0op::AvgPool3D(avgpoolIn, kernelSize, stride, pad, ceilMode, countIncludePad, divisorOverride,
781 dataFormat, uniqueExecutor.get());781 dataFormat, uniqueExecutor.get());
782 CHECK_RET(avgpoolOut != nullptr, ACLNN_ERR_INNER_NULLPTR);782 CHECK_RET(avgpoolOut != nullptr, ACLNN_ERR_INNER_NULLPTR);
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
18#include "op_api_ut_common/tensor_desc.h"18#include "op_api_ut_common/tensor_desc.h"
19#include "op_api_ut_common/scalar_desc.h"19#include "op_api_ut_common/scalar_desc.h"
20#include "op_api_ut_common/op_api_ut.h"20#include "op_api_ut_common/op_api_ut.h"
21-#include "op_api/op_api_def.h"21+#include "op_api/op_api_def_nn.h"
22 22 
23using namespace op;23using namespace op;
24using namespace std;24using namespace std;
@@ -1259,4 +1259,4 @@ TEST_F(l2_avgpool2d_test, test_avgpool2d_illegal_pad_value2)
1259 uint64_t workspace_size = 0;1259 uint64_t workspace_size = 0;
1260 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size); // check op graph1260 aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspace_size); // check op graph
1261 EXPECT_EQ(aclRet, ACLNN_ERR_PARAM_INVALID);1261 EXPECT_EQ(aclRet, ACLNN_ERR_PARAM_INVALID);
1262-}1262+}
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
18#include "op_api_ut_common/tensor_desc.h"18#include "op_api_ut_common/tensor_desc.h"
19#include "op_api_ut_common/scalar_desc.h"19#include "op_api_ut_common/scalar_desc.h"
20#include "op_api_ut_common/op_api_ut.h"20#include "op_api_ut_common/op_api_ut.h"
21-#include "op_api/op_api_def.h"21+#include "op_api/op_api_def_nn.h"
22 22 
23#include "opdev/platform.h"23#include "opdev/platform.h"
24 24 
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@
41#include "op_api/aclnn_util.h"41#include "op_api/aclnn_util.h"
42 42 
43#include "matmul/common/op_host/op_api/matmul_util.h"43#include "matmul/common/op_host/op_api/matmul_util.h"
44-#include "op_api/op_api_def.h"44+#include "op_api/op_api_def_nn.h"
45#include "avgpool2d_conv2d_backprop_input_util.h"45#include "avgpool2d_conv2d_backprop_input_util.h"
46#include "pooling/pool_3d_common/op_api/pool_3d_util.h"46#include "pooling/pool_3d_common/op_api/pool_3d_util.h"
47using namespace avgpool2d_conv2d_input_util;47using namespace avgpool2d_conv2d_input_util;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16#include "aclnn_kernels/reshape.h"16#include "aclnn_kernels/reshape.h"
17#include "aclnn_kernels/transpose.h"17#include "aclnn_kernels/transpose.h"
18#include "aclnn_kernels/transdata.h"18#include "aclnn_kernels/transdata.h"
19-#include "op_api/op_api_def.h"19+#include "op_api/op_api_def_nn.h"
20#include "op_api/dilation.h"20#include "op_api/dilation.h"
21#include "level0/fill.h"21#include "level0/fill.h"
22#include "level0/reduce_sum_op.h"22#include "level0/reduce_sum_op.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
12#include "aclnn_kernels/contiguous.h"12#include "aclnn_kernels/contiguous.h"
13#include "aclnn_kernels/reshape.h"13#include "aclnn_kernels/reshape.h"
14#include "aclnn_kernels/common/op_error_check.h"14#include "aclnn_kernels/common/op_error_check.h"
15-#include "op_api/op_api_def.h"15+#include "op_api/op_api_def_nn.h"
16#include "aclnn/aclnn_base.h"16#include "aclnn/aclnn_base.h"
17#include "opdev/common_types.h"17#include "opdev/common_types.h"
18#include "opdev/shape_utils.h"18#include "opdev/shape_utils.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
11#define OP_API_SRC_LEVEL2_QUANT_UTIL_H_11#define OP_API_SRC_LEVEL2_QUANT_UTIL_H_
12 12 
13#include "aclnn/aclnn_base.h"13#include "aclnn/aclnn_base.h"
14-#include "op_api/op_api_def.h"14+#include "op_api/op_api_def_nn.h"
15#include "opdev/common_types.h"15#include "opdev/common_types.h"
16#include "opdev/platform.h"16#include "opdev/platform.h"
17 17 
@@ -29,4 +29,4 @@ aclnnStatus TransQuantOffsetToToM1(const float* offsetArray, uint64_t offsetSize
29}29}
30#endif30#endif
31 31 
32-#endif // OP_API_SRC_LEVEL2_QUANT_UTIL_H_32+#endif // OP_API_SRC_LEVEL2_QUANT_UTIL_H_
@@ -22,7 +22,7 @@
22#include "op_api_ut_common/tensor_desc.h"22#include "op_api_ut_common/tensor_desc.h"
23#include "op_api_ut_common/scalar_desc.h"23#include "op_api_ut_common/scalar_desc.h"
24#include "op_api_ut_common/op_api_ut.h"24#include "op_api_ut_common/op_api_ut.h"
25-#include "op_api/op_api_def.h"25+#include "op_api/op_api_def_nn.h"
26 26 
27#include "opdev/platform.h"27#include "opdev/platform.h"
28 28 
@@ -22,7 +22,7 @@
22#include "op_api_ut_common/tensor_desc.h"22#include "op_api_ut_common/tensor_desc.h"
23#include "op_api_ut_common/scalar_desc.h"23#include "op_api_ut_common/scalar_desc.h"
24#include "op_api_ut_common/op_api_ut.h"24#include "op_api_ut_common/op_api_ut.h"
25-#include "op_api/op_api_def.h"25+#include "op_api/op_api_def_nn.h"
26 26 
27#include "opdev/platform.h"27#include "opdev/platform.h"
28 28