已合并
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
已合并
共 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 of | 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"). | 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 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | -#include "op_api/op_api_def.h" | 21 | +#include "op_api/op_api_def_nn.h" |
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | using namespace op; | 24 | using namespace op; |
| @@ -145,4 +145,4 @@ aclnnStatus aclnnFastGelu(void* workspace, uint64_t workspaceSize, aclOpExecutor | |||
| 145 | 145 | ||
| 146 | 146 | ||
| 147 | } | 147 | } |
| 148 | -#endif | 148 | +#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 of | 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"). | 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 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | -#include "op_api/op_api_def.h" | 20 | +#include "op_api/op_api_def_nn.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | using namespace op; | 23 | using namespace op; |
| @@ -159,4 +159,4 @@ aclnnStatus aclnnFastGeluBackward(void* workspace, uint64_t workspaceSize, aclOp | |||
| 159 | 159 | ||
| 160 | 160 | ||
| 161 | } | 161 | } |
| 162 | -#endif | 162 | +#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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -252,4 +252,4 @@ aclnnStatus aclnnGeGluV3(void* workspace, uint64_t workspaceSize, aclOpExecutor* | |||
| 252 | 252 | ||
| 253 | 253 | ||
| 254 | } | 254 | } |
| 255 | -#endif | 255 | +#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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -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 of | 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"). | 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 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | -#include "op_api/op_api_def.h" | 24 | +#include "op_api/op_api_def_nn.h" |
| 25 | 25 | ||
| 26 | 26 | ||
| 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 of | 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"). | 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 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | -#include "op_api/op_api_def.h" | 28 | +#include "op_api/op_api_def_nn.h" |
| 29 | 29 | ||
| 30 | 30 | ||
| 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 of | 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"). | 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 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | -#include "op_api/op_api_def.h" | 23 | +#include "op_api/op_api_def_nn.h" |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | using namespace op; | 26 | using 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 of | 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"). | 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 | 23 | ||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | -#include "op_api/op_api_def.h" | 26 | +#include "op_api/op_api_def_nn.h" |
| 27 | 27 | ||
| 28 | using namespace op; | 28 | using namespace op; |
| 29 | static constexpr const char* ACLNN_HARD_SIGMOID_NAME = "aclnnHardsigmoid"; | 29 | static 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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -140,4 +140,4 @@ aclnnStatus aclnnHardswishBackward(void* workspace, uint64_t workspaceSize, aclO | |||
| 140 | 140 | ||
| 141 | 141 | ||
| 142 | } | 142 | } |
| 143 | -#endif | 143 | +#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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -142,4 +142,4 @@ aclnnStatus aclnnHardswishBackwardV2(void* workspace, uint64_t workspaceSize, ac | |||
| 142 | 142 | ||
| 143 | 143 | ||
| 144 | } | 144 | } |
| 145 | -#endif | 145 | +#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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | -#include "op_api/op_api_def.h" | 18 | +#include "op_api/op_api_def_nn.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -127,4 +127,4 @@ aclnnStatus aclnnInplaceMish(void* workspace, uint64_t workspaceSize, aclOpExecu | |||
| 127 | 127 | ||
| 128 | 128 | ||
| 129 | } | 129 | } |
| 130 | -#endif | 130 | +#endif |
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -215,4 +215,4 @@ aclnnStatus aclnnMishBackward(void* workspace, uint64_t workspaceSize, aclOpExec | |||
| 215 | 215 | ||
| 216 | 216 | ||
| 217 | } | 217 | } |
| 218 | -#endif | 218 | +#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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | -#include "op_api/op_api_def.h" | 18 | +#include "op_api/op_api_def_nn.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | -#include "op_api/op_api_def.h" | 13 | +#include "op_api/op_api_def_nn.h" |
| 14 | 14 | ||
| 15 | 15 | ||
| 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 of | 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"). | 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 | 10 | ||
| 11 | 11 | ||
| 12 | -#include "op_api/op_api_def.h" | 12 | +#include "op_api/op_api_def_nn.h" |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| @@ -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 of | 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") | 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 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 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 of | 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"). | 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 | 10 | ||
| 11 | -#include "op_api/op_api_def.h" | 11 | +#include "op_api/op_api_def_nn.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| @@ -190,8 +190,8 @@ aclnnStatus aclnnSoftshrinkBackwardGetWorkspaceSize(const aclTensor* gradOutput, | |||
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | // 调用SoftShrinkGrad算子kernel | 192 | // 调用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可能是非连续的tensor | 197 | // 固定写法,将计算结果拷贝到输出gradInput上,gradInput可能是非连续的tensor |
Mactivation/softmax_cross_entropy_with_logits/op_api/aclnn_softmax_cross_entropy_with_logits.cpp+2-2
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | -#include "op_api/op_api_def.h" | 23 | +#include "op_api/op_api_def_nn.h" |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | using namespace op; | 26 | using namespace op; |
| @@ -163,4 +163,4 @@ aclnnStatus aclnnSoftplus(void* workspace, uint64_t workspaceSize, aclOpExecutor | |||
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | } | 165 | } |
| 166 | -#endif | 166 | +#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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | using namespace op; | 22 | using namespace op; |
| @@ -193,4 +193,4 @@ aclnnStatus aclnnSoftplusBackward(void* workspace, uint64_t workspaceSize, aclOp | |||
| 193 | 193 | ||
| 194 | 194 | ||
| 195 | } | 195 | } |
| 196 | -#endif | 196 | +#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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | -#include "op_api/op_api_def.h" | 28 | +#include "op_api/op_api_def_nn.h" |
| 29 | 29 | ||
| 30 | using namespace op; | 30 | using 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 of | 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"). | 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 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | using namespace op; | 30 | using 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 of | 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"). | 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 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 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 of | 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"). | 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 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | -#include "op_api/op_api_def.h" | 23 | +#include "op_api/op_api_def_nn.h" |
| 24 | 24 | ||
| 25 | 25 | ||
| 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 of | 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"). | 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 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | -#include "op_api/op_api_def.h" | 25 | +#include "op_api/op_api_def_nn.h" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | using namespace op; | 28 | using namespace op; |
| @@ -172,4 +172,4 @@ aclnnStatus aclnnThresholdBackward(void* workspace, uint64_t workspaceSize, aclO | |||
| 172 | 172 | ||
| 173 | 173 | ||
| 174 | } | 174 | } |
| 175 | -#endif | 175 | +#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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -259,4 +259,4 @@ static inline op::Shape ReduceShapeGetWithVar(const aclTensor* self, const aclIn | |||
| 259 | 259 | ||
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | -#endif // LEVEL2_BASE_CALCULATION_H_ | 262 | +#endif // LEVEL2_BASE_CALCULATION_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 of | 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"). | 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 | ||
| 14 | namespace op { | 14 | namespace op { |
| 15 | constexpr size_t BN_MIN_SUPPORT_DIMS_NUMS = 2; | 15 | constexpr size_t BN_MIN_SUPPORT_DIMS_NUMS = 2; |
| @@ -22,4 +22,4 @@ constexpr int8_t USE_HF32 = 3; | |||
| 22 | constexpr int8_t USE_FP32_ADD = 4; | 22 | constexpr int8_t USE_FP32_ADD = 4; |
| 23 | constexpr size_t MAX_MASK_LEN64 = 64; | 23 | constexpr size_t MAX_MASK_LEN64 = 64; |
| 24 | } // namespace op | 24 | } // 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 of | 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"). | 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 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | -#include "op_api/op_api_def.h" | 13 | +#include "op_api/op_api_def_nn.h" |
| 14 | 14 | ||
| 15 | 15 | ||
| 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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | -#include "op_api/op_api_def.h" | 13 | +#include "op_api/op_api_def_nn.h" |
| 14 | 14 | ||
| 15 | 15 | ||
| 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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | -#include "op_api/op_api_def.h" | 13 | +#include "op_api/op_api_def_nn.h" |
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| @@ -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 | -} // namespace | 731 | +} // namespace |
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -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 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | -#include "op_api/op_api_def.h" | 24 | +#include "op_api/op_api_def_nn.h" |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | using namespace op; | 27 | using 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 of | 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"). | 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 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | 25 | ||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -127,4 +127,4 @@ aclnnStatus aclnnInplaceMish(void* workspace, uint64_t workspaceSize, aclOpExecu | |||
| 127 | 127 | ||
| 128 | 128 | ||
| 129 | } | 129 | } |
| 130 | -#endif | 130 | +#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 of | 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"). | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 | - | ||
| 11 | - | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - | ||
| 21 | - | ||
| 22 | - | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - | ||
| 26 | - | ||
| 27 | - | ||
| 28 | -using namespace op; | ||
| 29 | - | ||
| 30 | -extern "C" { | ||
| 31 | - | ||
| 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 | - | ||
| 174 | -} | ||
| 175 | - | ||
| @@ -9,7 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | -#include "op_api/op_api_def.h" | 12 | +#include "op_api/op_api_def_nn.h" |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | 25 | ||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | -#include "op_api/op_api_def.h" | 23 | +#include "op_api/op_api_def_nn.h" |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | using namespace op; | 26 | using namespace op; |
| @@ -163,4 +163,4 @@ aclnnStatus aclnnSoftplus(void* workspace, uint64_t workspaceSize, aclOpExecutor | |||
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | } | 165 | } |
| 166 | -#endif | 166 | +#endif |
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -173,4 +173,4 @@ aclnnStatus aclnnSoftplusBackward(void* workspace, uint64_t workspaceSize, aclOp | |||
| 173 | 173 | ||
| 174 | 174 | ||
| 175 | } | 175 | } |
| 176 | -#endif | 176 | +#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 | 10 | ||
| 11 | -#include "op_api/op_api_def.h" | 11 | +#include "op_api/op_api_def_nn.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | -#include "op_api/op_api_def.h" | 23 | +#include "op_api/op_api_def_nn.h" |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | using namespace op; | 30 | using namespace op; |
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | using namespace op; | 30 | using 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 of | 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"). | 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 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | 25 | ||
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | -#include "op_api/op_api_def.h" | 25 | +#include "op_api/op_api_def_nn.h" |
| 26 | 26 | ||
| 27 | using namespace op; | 27 | using namespace op; |
| 28 | 28 | ||
| @@ -171,4 +171,4 @@ aclnnStatus aclnnThresholdBackward(void* workspace, uint64_t workspaceSize, aclO | |||
| 171 | 171 | ||
| 172 | 172 | ||
| 173 | } | 173 | } |
| 174 | -#endif | 174 | +#endif |
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | -#include "op_api/op_api_def.h" | 18 | +#include "op_api/op_api_def_nn.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| @@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | -#include "op_api/op_api_def.h" | 21 | +#include "op_api/op_api_def_nn.h" |
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | using namespace std; | 20 | using namespace std; |
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | -#include "op_api/op_api_def.h" | 30 | +#include "op_api/op_api_def_nn.h" |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | using namespace op; | 33 | using namespace op; |
| @@ -14,7 +14,7 @@ | |||
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -267,4 +267,4 @@ aclnnStatus aclnnSmoothL1LossBackward(void* workspace, uint64_t workspaceSize, a | |||
| 267 | 267 | ||
| 268 | 268 | ||
| 269 | } | 269 | } |
| 270 | -#endif | 270 | +#endif |
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | using namespace op; | 30 | using namespace op; |
| @@ -334,4 +334,4 @@ aclnnStatus aclnnSmoothL1Loss(void* workspace, uint64_t workspaceSize, aclOpExec | |||
| 334 | 334 | ||
| 335 | 335 | ||
| 336 | } | 336 | } |
| 337 | -#endif | 337 | +#endif |
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
Mexperimental/norm/sync_batch_norm_backward_elemt/op_host/op_api/aclnn_batch_norm_elemt_backward.cpp+1-1
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | class l2BatchNormElemtBackwardTest : public testing::Test { | 18 | class l2BatchNormElemtBackwardTest : public testing::Test { |
| 19 | protected: | 19 | protected: |
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | using namespace op; | 30 | using 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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | -#include "op_api/op_api_def.h" | 20 | +#include "op_api/op_api_def_nn.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | -#include "op_api/op_api_def.h" | 20 | +#include "op_api/op_api_def_nn.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -257,4 +257,4 @@ aclnnStatus aclnnForeachAddcdivScalarV2(void* workspace, uint64_t workspaceSize, | |||
| 257 | 257 | ||
| 258 | 258 | ||
| 259 | } | 259 | } |
| 260 | -#endif | 260 | +#endif |
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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, INCLUDING | 6 | + * 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 of | 7 | + * 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 | 16 | ||
| 18 | 17 | ||
| 19 | 18 | ||
| 20 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 21 | 20 | ||
| 22 | 21 | ||
| 23 | 22 | ||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -247,4 +247,4 @@ aclnnStatus aclnnForeachMinimumScalarV2(void* workspace, uint64_t workspaceSize, | |||
| 247 | 247 | ||
| 248 | 248 | ||
| 249 | } | 249 | } |
| 250 | -#endif | 250 | +#endif |
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -207,4 +207,4 @@ aclnnStatus aclnnForeachMulScalarV2(void* workspace, uint64_t workspaceSize, acl | |||
| 207 | 207 | ||
| 208 | 208 | ||
| 209 | } | 209 | } |
| 210 | -#endif | 210 | +#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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | 30 | ||
| @@ -29,7 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | -#include "op_api/op_api_def.h" | 32 | +#include "op_api/op_api_def_nn.h" |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | 35 | ||
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | -#include "op_api/op_api_def.h" | 35 | +#include "op_api/op_api_def_nn.h" |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | 38 | ||
| @@ -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 of | 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"). | 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 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | -#include "op_api/op_api_def.h" | 20 | +#include "op_api/op_api_def_nn.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| @@ -572,4 +572,4 @@ aclnnStatus aclnnIndex(void* workspace, uint64_t workspaceSize, aclOpExecutor* e | |||
| 572 | 572 | ||
| 573 | 573 | ||
| 574 | } | 574 | } |
| 575 | -#endif | 575 | +#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 of | 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"). | 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 | 27 | ||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | -#include "op_api/op_api_def.h" | 30 | +#include "op_api/op_api_def_nn.h" |
| 31 | 31 | ||
| 32 | 32 | ||
| 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 of | 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"). | 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 | 27 | ||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | -#include "op_api/op_api_def.h" | 30 | +#include "op_api/op_api_def_nn.h" |
| 31 | 31 | ||
| 32 | using namespace op; | 32 | using namespace op; |
| 33 | 33 | ||
| @@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | -#include "op_api/op_api_def.h" | 21 | +#include "op_api/op_api_def_nn.h" |
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| @@ -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, INCLUDING | 6 | + * 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 | 24 | ||
| 26 | 25 | ||
| 27 | 26 | ||
| 28 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 29 | 28 | ||
| 30 | 29 | ||
| 31 | using namespace op; | 30 | using 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 of | 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") | 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 | 29 | ||
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | -#include "op_api/op_api_def.h" | 32 | +#include "op_api/op_api_def_nn.h" |
| 33 | 33 | ||
| 34 | using namespace op; | 34 | using namespace op; |
| 35 | 35 | ||
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | -#include "op_api/op_api_def.h" | 30 | +#include "op_api/op_api_def_nn.h" |
| 31 | 31 | ||
| 32 | 32 | ||
| 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 of | 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") | 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 | 35 | ||
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | -#include "op_api/op_api_def.h" | 38 | +#include "op_api/op_api_def_nn.h" |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | 41 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | -#include "op_api/op_api_def.h" | 21 | +#include "op_api/op_api_def_nn.h" |
| 22 | 22 | ||
| 23 | 23 | ||
| 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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -84,4 +84,4 @@ inline static bool CheckReductionMseLoss(int64_t reduction, int64_t REDUCTION_SU | |||
| 84 | 84 | ||
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | -#endif // LEVEL2_BASE_LOSS_H_ | 87 | +#endif // LEVEL2_BASE_LOSS_H_ |
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | -#include "op_api/op_api_def.h" | 18 | +#include "op_api/op_api_def_nn.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | using namespace std; | 20 | using 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 of | 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"). | 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 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | -#include "op_api/op_api_def.h" | 29 | +#include "op_api/op_api_def_nn.h" |
| 30 | 30 | ||
| 31 | 31 | ||
| 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 of | 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") | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -267,4 +267,4 @@ aclnnStatus aclnnSmoothL1LossBackward(void* workspace, uint64_t workspaceSize, a | |||
| 267 | 267 | ||
| 268 | 268 | ||
| 269 | } | 269 | } |
| 270 | -#endif | 270 | +#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 of | 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"). | 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 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | using namespace op; | 30 | using namespace op; |
| @@ -330,4 +330,4 @@ aclnnStatus aclnnSmoothL1Loss(void* workspace, uint64_t workspaceSize, aclOpExec | |||
| 330 | 330 | ||
| 331 | 331 | ||
| 332 | } | 332 | } |
| 333 | -#endif | 333 | +#endif |
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | -#include "op_api/op_api_def.h" | 25 | +#include "op_api/op_api_def_nn.h" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | using namespace op; | 28 | using namespace op; |
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 of | 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"). | 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 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | -#include "op_api/op_api_def.h" | 20 | +#include "op_api/op_api_def_nn.h" |
| 21 | 21 | ||
| 22 | using namespace std; | 22 | using namespace std; |
| 23 | using namespace op; | 23 | using 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 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | -#include "op_api/op_api_def.h" | 13 | +#include "op_api/op_api_def_nn.h" |
| 14 | 14 | ||
| 15 | 15 | ||
| 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 of | 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"). | 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 | 30 | ||
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | -#include "op_api/op_api_def.h" | 33 | +#include "op_api/op_api_def_nn.h" |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | using namespace std; | 36 | using 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 of | 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"). | 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 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -35,7 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | -#include "op_api/op_api_def.h" | 38 | +#include "op_api/op_api_def_nn.h" |
| 39 | 39 | ||
| 40 | using Ops::Base::CeilDiv; | 40 | using Ops::Base::CeilDiv; |
| 41 | using namespace Ops::NN; | 41 | using 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 of | 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"). | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -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 of | 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"). | 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 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -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 of | 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"). | 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 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -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 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| @@ -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 | 33 | ||
| 34 | 34 | ||
| 35 | -#include "op_api/op_api_def.h" | 35 | +#include "op_api/op_api_def_nn.h" |
| 36 | 36 | ||
| 37 | using namespace std; | 37 | using namespace std; |
| 38 | using namespace op; | 38 | using namespace op; |
| @@ -9,7 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | -#include "op_api/op_api_def.h" | 12 | +#include "op_api/op_api_def_nn.h" |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| @@ -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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -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 of | 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"). | 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 | 10 | ||
| 11 | -#include "op_api/op_api_def.h" | 11 | +#include "op_api/op_api_def_nn.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| @@ -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 | 10 | ||
| 11 | -#include "op_api/op_api_def.h" | 11 | +#include "op_api/op_api_def_nn.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| @@ -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 of | 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"). | 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 | 10 | ||
| 11 | -#include "op_api/op_api_def.h" | 11 | +#include "op_api/op_api_def_nn.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| @@ -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 of | 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"). | 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 | 10 | ||
| 11 | -#include "op_api/op_api_def.h" | 11 | +#include "op_api/op_api_def_nn.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -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, INCLUDING | 6 | + * 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 of | 7 | + * 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 | ||
| 13 | 12 | ||
| 14 | 13 | ||
| 15 | 14 | ||
| 16 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 17 | 16 | ||
| 18 | 17 | ||
| 19 | class l2FastBatchNormBackwardTest : public testing::Test { | 18 | class l2FastBatchNormBackwardTest : public testing::Test { |
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -#include "op_api/op_api_def.h" | 27 | +#include "op_api/op_api_def_nn.h" |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | 30 | ||
| @@ -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 of | 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"). | 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 | 39 | ||
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | -#include "op_api/op_api_def.h" | 42 | +#include "op_api/op_api_def_nn.h" |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | using namespace op; | 45 | using 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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | -#include "op_api/op_api_def.h" | 18 | +#include "op_api/op_api_def_nn.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | -#include "op_api/op_api_def.h" | 20 | +#include "op_api/op_api_def_nn.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -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 | 10 | ||
| 11 | -#include "op_api/op_api_def.h" | 11 | +#include "op_api/op_api_def_nn.h" |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -423,4 +423,4 @@ aclnnStatus aclnnBatchNormElemtBackward(void* workspace, uint64_t workspaceSize, | |||
| 423 | 423 | ||
| 424 | 424 | ||
| 425 | } | 425 | } |
| 426 | -#endif | 426 | +#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 of | 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"). | 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 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "op_api/op_api_def.h" | 16 | +#include "op_api/op_api_def_nn.h" |
| 17 | 17 | ||
| 18 | class l2BatchNormElemtBackwardTest : public testing::Test { | 18 | class l2BatchNormElemtBackwardTest : public testing::Test { |
| 19 | protected: | 19 | protected: |
| @@ -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 of | 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"). | 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 | 16 | ||
| 17 | -#include "op_api/op_api_def.h" | 17 | +#include "op_api/op_api_def_nn.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -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 of | 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"). | 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 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | -#include "op_api/op_api_def.h" | 25 | +#include "op_api/op_api_def_nn.h" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| @@ -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 of | 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"). | 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 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | -#include "op_api/op_api_def.h" | 22 | +#include "op_api/op_api_def_nn.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 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 of | 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"). | 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 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | -#include "op_api/op_api_def.h" | 21 | +#include "op_api/op_api_def_nn.h" |
| 22 | 22 | ||
| 23 | using namespace op; | 23 | using namespace op; |
| 24 | using namespace std; | 24 | using 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 graph | 1260 | 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 of | 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"). | 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 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | -#include "op_api/op_api_def.h" | 21 | +#include "op_api/op_api_def_nn.h" |
| 22 | 22 | ||
| 23 | 23 | ||
| 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 of | 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"). | 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 | 41 | ||
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | -#include "op_api/op_api_def.h" | 44 | +#include "op_api/op_api_def_nn.h" |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | using namespace avgpool2d_conv2d_input_util; | 47 | using 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 of | 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"). | 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 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "op_api/op_api_def.h" | 19 | +#include "op_api/op_api_def_nn.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -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 of | 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"). | 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 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "op_api/op_api_def.h" | 15 | +#include "op_api/op_api_def_nn.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -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 of | 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"). | 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 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | -#include "op_api/op_api_def.h" | 14 | +#include "op_api/op_api_def_nn.h" |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -29,4 +29,4 @@ aclnnStatus TransQuantOffsetToToM1(const float* offsetArray, uint64_t offsetSize | |||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 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 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | -#include "op_api/op_api_def.h" | 25 | +#include "op_api/op_api_def_nn.h" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | -#include "op_api/op_api_def.h" | 25 | +#include "op_api/op_api_def_nn.h" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||