已合并
refactor: 将 op_api 目录移动至算子根目录并统一构建配置 #8840
Nice try创建于 22 天前
refactor: 将 op_api 目录移动至算子根目录并统一构建配置 #8840
已合并
共 51 个文件变更+35-172
| @@ -2379,7 +2379,7 @@ VC8@ops-nn: | |||
| 2379 | - ops/ops-nn/index/scatter_nd_update/op_kernel/ | 2379 | - ops/ops-nn/index/scatter_nd_update/op_kernel/ |
| 2380 | - ops/ops-nn/index/scatter_update/op_host/ | 2380 | - ops/ops-nn/index/scatter_update/op_host/ |
| 2381 | - ops/ops-nn/index/scatter_update/op_kernel/ | 2381 | - ops/ops-nn/index/scatter_update/op_kernel/ |
| 2382 | - - ops/ops-nn/index/linear_index_v2/op_host/op_api/ | 2382 | + - ops/ops-nn/index/linear_index_v2/op_api/ |
| 2383 | - ops/ops-nn/index/linear_index_v2/op_host/linear_index_v2_def.cpp | 2383 | - ops/ops-nn/index/linear_index_v2/op_host/linear_index_v2_def.cpp |
| 2384 | - ops/ops-nn/index/linear_index_v2/op_kernel/ | 2384 | - ops/ops-nn/index/linear_index_v2/op_kernel/ |
| 2385 | - ops/ops-nn/index/sparse_to_dense/op_host/sparse_to_dense_def.cpp | 2385 | - ops/ops-nn/index/sparse_to_dense/op_host/sparse_to_dense_def.cpp |
| @@ -1,20 +1,11 @@ | |||
| 1 | # ---------------------------------------------------------------------------- | 1 | # ---------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. | 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 | 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. |
| 6 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | 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. | 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. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | -message(STATUS "=== Debug: start ops.index.apply_top_k_top_p_with_sorted.CMakeLists.txt ") | 11 | +add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE apply_top_k_top_p_with_sorted ACLNNTYPE aclnn_exclude) |
| 12 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | ||
| 13 | -if(NOT ENABLE_TEST AND NOT BENCHMARK) | ||
| 14 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 15 | -endif() | ||
| 16 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 17 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 18 | - add_subdirectory(${SUB_DIR}) | ||
| 19 | - endif() | ||
| 20 | -endforeach() | ||
Rindex/apply_top_k_top_p_with_sorted/op_host/op_api/aclnn_apply_top_k_top_p.cpp→index/apply_top_k_top_p_with_sorted/op_api/aclnn_apply_top_k_top_p.cpp+0-0
文件重命名但无更改。
Rindex/apply_top_k_top_p_with_sorted/op_host/op_api/aclnn_apply_top_k_top_p.h→index/apply_top_k_top_p_with_sorted/op_api/aclnn_apply_top_k_top_p.h+0-0
文件重命名但无更改。
Rindex/apply_top_k_top_p_with_sorted/op_host/op_api/apply_top_k_top_p_with_sorted.cpp→index/apply_top_k_top_p_with_sorted/op_api/apply_top_k_top_p_with_sorted.cpp+0-0
文件重命名但无更改。
Rindex/apply_top_k_top_p_with_sorted/op_host/op_api/apply_top_k_top_p_with_sorted.h→index/apply_top_k_top_p_with_sorted/op_api/apply_top_k_top_p_with_sorted.h+0-0
文件重命名但无更改。
| @@ -1,13 +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 | -message(STATUS "=== Debug: start ops.index.apply_top_k_top_p_with_sorted.op_host.CMakeLists.txt ") | ||
| 12 | - | ||
| 13 | -add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE apply_top_k_top_p_with_sorted ACLNNTYPE aclnn_exclude) | ||
| @@ -14,7 +14,7 @@ | |||
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -#include "../../../op_host/op_api/aclnn_apply_top_k_top_p.h" | 17 | +#include "../../../op_api/aclnn_apply_top_k_top_p.h" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| @@ -1,20 +1,11 @@ | |||
| 1 | # ---------------------------------------------------------------------------- | 1 | # ---------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. | 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 | 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. |
| 6 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | 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. | 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. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | -message(STATUS "=== Debug: start ops.index.embedding_bag.CMakeLists.txt ") | 11 | +add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE embedding_bag ACLNNTYPE aclnn_exclude) |
| 12 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | ||
| 13 | -if(NOT ENABLE_TEST AND NOT BENCHMARK) | ||
| 14 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 15 | -endif() | ||
| 16 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 17 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 18 | - add_subdirectory(${SUB_DIR}) | ||
| 19 | - endif() | ||
| 20 | -endforeach() | ||
Rindex/embedding_bag/op_host/op_api/aclnn_embedding_bag.cpp→index/embedding_bag/op_api/aclnn_embedding_bag.cpp+0-0
文件重命名但无更改。
Rindex/embedding_bag/op_host/op_api/aclnn_embedding_bag.h→index/embedding_bag/op_api/aclnn_embedding_bag.h+0-0
文件重命名但无更改。
Rindex/embedding_bag/op_host/op_api/embedding_bag.cpp→index/embedding_bag/op_api/embedding_bag.cpp+3-3
| @@ -33,7 +33,7 @@ static const std::initializer_list<op::DataType> WEIGHT_DTYPE_SUPPORT_LIST = { | |||
| 33 | static const std::initializer_list<op::DataType> INT_DTYPE_SUPPORT_LIST = {op::DataType::DT_INT32, | 33 | static const std::initializer_list<op::DataType> INT_DTYPE_SUPPORT_LIST = {op::DataType::DT_INT32, |
| 34 | op::DataType::DT_INT64}; | 34 | op::DataType::DT_INT64}; |
| 35 | 35 | ||
| 36 | -//根据dtype判断算子是否支持aicore | 36 | +// 根据dtype判断算子是否支持aicore |
| 37 | static inline bool IsAiCoreSupport(const aclTensor* weight, const aclTensor* indices, const aclTensor* offsets, | 37 | static inline bool IsAiCoreSupport(const aclTensor* weight, const aclTensor* indices, const aclTensor* offsets, |
| 38 | const aclTensor* perSampleWeights) | 38 | const aclTensor* perSampleWeights) |
| 39 | { | 39 | { |
| @@ -105,7 +105,7 @@ const std::tuple<aclTensor*, aclTensor*, aclTensor*, aclTensor*> EmbeddingBag( | |||
| 105 | op::DataType indicesDtype = indices->GetDataType(); | 105 | op::DataType indicesDtype = indices->GetDataType(); |
| 106 | op::DataType offsetsDtype = offsets->GetDataType(); | 106 | op::DataType offsetsDtype = offsets->GetDataType(); |
| 107 | op::DataType indexPromoteDtype = (indicesDtype == offsetsDtype) ? indicesDtype : op::DataType::DT_INT64; | 107 | op::DataType indexPromoteDtype = (indicesDtype == offsetsDtype) ? indicesDtype : op::DataType::DT_INT64; |
| 108 | - //申请output_tensor的Tensor | 108 | + // 申请output_tensor的Tensor |
| 109 | auto outputShape = GetOutPutShape(weight, offsets, includeLastOffset); | 109 | auto outputShape = GetOutPutShape(weight, offsets, includeLastOffset); |
| 110 | auto outputTensor = executor->AllocTensor(outputShape, weight->GetDataType()); | 110 | auto outputTensor = executor->AllocTensor(outputShape, weight->GetDataType()); |
| 111 | aclTensor* offset2bag = nullptr; | 111 | aclTensor* offset2bag = nullptr; |
| @@ -143,4 +143,4 @@ const std::tuple<aclTensor*, aclTensor*, aclTensor*, aclTensor*> EmbeddingBag( | |||
| 143 | } | 143 | } |
| 144 | return std::tuple<aclTensor*, aclTensor*, aclTensor*, aclTensor*>(outputTensor, offset2bag, bagSize, maxIndices); | 144 | return std::tuple<aclTensor*, aclTensor*, aclTensor*, aclTensor*>(outputTensor, offset2bag, bagSize, maxIndices); |
| 145 | } | 145 | } |
| 146 | -} // namespace l0op | 146 | +} // namespace l0op |
| @@ -1,12 +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 | -#optiling and opapi | ||
| 11 | -message(STATUS "=== Debug: start ops.index.embedding_bag.CMakeLists.txt ") | ||
| 12 | -add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE embedding_bag ACLNNTYPE aclnn_exclude) | ||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | -#include "../../../op_host/op_api/aclnn_embedding_bag.h" | 18 | +#include "../../../op_api/aclnn_embedding_bag.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| @@ -100,4 +100,4 @@ TEST_F(l2_embedding_bag_test, case_2) | |||
| 100 | uint64_t workspaceSize = 0; | 100 | uint64_t workspaceSize = 0; |
| 101 | aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspaceSize); | 101 | aclnnStatus aclRet = ut.TestGetWorkspaceSize(&workspaceSize); |
| 102 | EXPECT_EQ(aclRet, ACL_SUCCESS); | 102 | EXPECT_EQ(aclRet, ACL_SUCCESS); |
| 103 | -} | 103 | +} |
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -#include "index/linear_index_v2/op_host/op_api/linear_index_v2.h" | 19 | +#include "index/linear_index_v2/op_api/linear_index_v2.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| @@ -1,18 +1,10 @@ | |||
| 1 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. | 1 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. |
| 2 | -# This program is free software, you can redistribute it and/or modify it under the terms and conditions of | 2 | +# This program is free software, you can redistribute it and/or modify it under the terms and conditions of |
| 3 | # CANN Open Software License Agreement Version 2.0 (the "License"). | 3 | # CANN Open Software License Agreement Version 2.0 (the "License"). |
| 4 | # Please refer to the License for details. You may not use this file except in compliance with the License. | 4 | # Please refer to the License for details. You may not use this file except in compliance with the License. |
| 5 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | 5 | +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, |
| 6 | # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | 6 | # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. |
| 7 | # See LICENSE in the root of the software repository for the full text of the License. | 7 | # See LICENSE in the root of the software repository for the full text of the License. |
| 8 | # ============================================================================ | 8 | # ============================================================================ |
| 9 | 9 | ||
| 10 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | 10 | +add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE linear_index ACLNNTYPE aclnn_exclude) |
| 11 | -if(NOT ENABLE_TEST AND NOT BENCHMARK) | ||
| 12 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 13 | -endif() | ||
| 14 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 15 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 16 | - add_subdirectory(${SUB_DIR}) | ||
| 17 | - endif() | ||
| 18 | -endforeach() | ||
| @@ -1,10 +0,0 @@ | |||
| 1 | -# Copyright (c) 2025 Huawei Technologies Co., Ltd. | ||
| 2 | -# This program is free software, you can redistribute it and/or modify it under the terms and conditions of | ||
| 3 | -# CANN Open Software License Agreement Version 2.0 (the "License"). | ||
| 4 | -# Please refer to the License for details. You may not use this file except in compliance with the License. | ||
| 5 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | ||
| 6 | -# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | ||
| 7 | -# See LICENSE in the root of the software repository for the full text of the License. | ||
| 8 | -# ============================================================================ | ||
| 9 | - | ||
| 10 | -add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE linear_index ACLNNTYPE aclnn_exclude) | ||
| @@ -1,18 +1,10 @@ | |||
| 1 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. | 1 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. |
| 2 | -# This program is free software, you can redistribute it and/or modify it under the terms and conditions of | 2 | +# This program is free software, you can redistribute it and/or modify it under the terms and conditions of |
| 3 | # CANN Open Software License Agreement Version 2.0 (the "License"). | 3 | # CANN Open Software License Agreement Version 2.0 (the "License"). |
| 4 | # Please refer to the License for details. You may not use this file except in compliance with the License. | 4 | # Please refer to the License for details. You may not use this file except in compliance with the License. |
| 5 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | 5 | +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, |
| 6 | # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | 6 | # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. |
| 7 | # See LICENSE in the root of the software repository for the full text of the License. | 7 | # See LICENSE in the root of the software repository for the full text of the License. |
| 8 | # ============================================================================ | 8 | # ============================================================================ |
| 9 | 9 | ||
| 10 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | 10 | +add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE linear_index_v2 ACLNNTYPE aclnn_exclude) |
| 11 | -if(NOT ENABLE_TEST AND NOT BENCHMARK) | ||
| 12 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 13 | -endif() | ||
| 14 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 15 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 16 | - add_subdirectory(${SUB_DIR}) | ||
| 17 | - endif() | ||
| 18 | -endforeach() | ||
Rindex/linear_index_v2/op_host/op_api/linear_index_v2.cpp→index/linear_index_v2/op_api/linear_index_v2.cpp+0-0
文件重命名但无更改。
Rindex/linear_index_v2/op_host/op_api/linear_index_v2.h→index/linear_index_v2/op_api/linear_index_v2.h+1-1
| @@ -22,4 +22,4 @@ const aclTensor* LinearIndexV2(const aclTensorList* indicesList, const aclTensor | |||
| 22 | aclOpExecutor* executor); | 22 | aclOpExecutor* executor); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | -#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_LINEAR_INDEX_V2_H_ | 25 | +#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_LINEAR_INDEX_V2_H_ |
| @@ -1,10 +0,0 @@ | |||
| 1 | -# Copyright (c) 2025 Huawei Technologies Co., Ltd. | ||
| 2 | -# This program is free software, you can redistribute it and/or modify it under the terms and conditions of | ||
| 3 | -# CANN Open Software License Agreement Version 2.0 (the "License"). | ||
| 4 | -# Please refer to the License for details. You may not use this file except in compliance with the License. | ||
| 5 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | ||
| 6 | -# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | ||
| 7 | -# See LICENSE in the root of the software repository for the full text of the License. | ||
| 8 | -# ============================================================================ | ||
| 9 | - | ||
| 10 | -add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE linear_index_v2 ACLNNTYPE aclnn_exclude) | ||
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | -#include "../../linear_index/op_host/op_api/linear_index.h" | 31 | +#include "../../linear_index/op_api/linear_index.h" |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | 34 | ||
| @@ -1,19 +1,11 @@ | |||
| 1 | # ---------------------------------------------------------------------------- | 1 | # ---------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. | 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 | 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. |
| 6 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | 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. | 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. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | 11 | +add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE fused_cross_entropy_loss_with_max_sum ACLNNTYPE aclnn_exclude) |
| 12 | -if(NOT ENABLE_TEST AND NOT BENCHMARK) | ||
| 13 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 14 | -endif() | ||
| 15 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 16 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 17 | - add_subdirectory(${SUB_DIR}) | ||
| 18 | - endif() | ||
| 19 | -endforeach() | ||
Rloss/fused_cross_entropy_loss_with_max_sum/op_host/op_api/aclnn_fused_cross_entropy_loss_with_max_sum.cpp→loss/fused_cross_entropy_loss_with_max_sum/op_api/aclnn_fused_cross_entropy_loss_with_max_sum.cpp+0-0
文件重命名但无更改。
Rloss/fused_cross_entropy_loss_with_max_sum/op_host/op_api/aclnn_fused_cross_entropy_loss_with_max_sum.h→loss/fused_cross_entropy_loss_with_max_sum/op_api/aclnn_fused_cross_entropy_loss_with_max_sum.h+0-0
文件重命名但无更改。
Rloss/fused_cross_entropy_loss_with_max_sum/op_host/op_api/fused_cross_entropy_loss_with_max_sum.cpp→loss/fused_cross_entropy_loss_with_max_sum/op_api/fused_cross_entropy_loss_with_max_sum.cpp+0-0
文件重命名但无更改。
Rloss/fused_cross_entropy_loss_with_max_sum/op_host/op_api/fused_cross_entropy_loss_with_max_sum.h→loss/fused_cross_entropy_loss_with_max_sum/op_api/fused_cross_entropy_loss_with_max_sum.h+0-0
文件重命名但无更改。
| @@ -1,11 +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 | -#optiling and opapi | ||
| 11 | -add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE fused_cross_entropy_loss_with_max_sum ACLNNTYPE aclnn_exclude) | ||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | -#include "../../../op_host/op_api/aclnn_fused_cross_entropy_loss_with_max_sum.h" | 18 | +#include "../../../op_api/aclnn_fused_cross_entropy_loss_with_max_sum.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
| @@ -1,19 +1,11 @@ | |||
| 1 | # ---------------------------------------------------------------------------- | 1 | # ---------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2025 Huawei Technologies Co., Ltd. | 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 | 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. |
| 6 | -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | 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. | 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. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | 11 | +add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE fake_quant_affine_cachemask ACLNNTYPE aclnn_exclude) |
| 12 | -if(NOT ENABLE_TEST AND NOT BENCHMARK) | ||
| 13 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 14 | -endif() | ||
| 15 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 16 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 17 | - add_subdirectory(${SUB_DIR}) | ||
| 18 | - endif() | ||
| 19 | -endforeach() | ||
Rquant/fake_quant_affine_cachemask/op_host/op_api/aclnn_fake_quant_per_channel_affine_cachemask.cpp→quant/fake_quant_affine_cachemask/op_api/aclnn_fake_quant_per_channel_affine_cachemask.cpp+0-0
文件重命名但无更改。
Rquant/fake_quant_affine_cachemask/op_host/op_api/aclnn_fake_quant_per_channel_affine_cachemask.h→quant/fake_quant_affine_cachemask/op_api/aclnn_fake_quant_per_channel_affine_cachemask.h+0-0
文件重命名但无更改。
Rquant/fake_quant_affine_cachemask/op_host/op_api/aclnn_fake_quant_per_tensor_affine_cachemask.cpp→quant/fake_quant_affine_cachemask/op_api/aclnn_fake_quant_per_tensor_affine_cachemask.cpp+0-0
文件重命名但无更改。
Rquant/fake_quant_affine_cachemask/op_host/op_api/aclnn_fake_quant_per_tensor_affine_cachemask.h→quant/fake_quant_affine_cachemask/op_api/aclnn_fake_quant_per_tensor_affine_cachemask.h+0-0
文件重命名但无更改。
Rquant/fake_quant_affine_cachemask/op_host/op_api/fake_quant_affine_cachemask.cpp→quant/fake_quant_affine_cachemask/op_api/fake_quant_affine_cachemask.cpp+0-0
文件重命名但无更改。
Rquant/fake_quant_affine_cachemask/op_host/op_api/fake_quant_affine_cachemask.h→quant/fake_quant_affine_cachemask/op_api/fake_quant_affine_cachemask.h+0-0
文件重命名但无更改。
Rquant/fake_quant_affine_cachemask/op_host/op_api/fake_quant_common.cpp→quant/fake_quant_affine_cachemask/op_api/fake_quant_common.cpp+0-0
文件重命名但无更改。
Rquant/fake_quant_affine_cachemask/op_host/op_api/fake_quant_common.h→quant/fake_quant_affine_cachemask/op_api/fake_quant_common.h+1-1
| @@ -57,4 +57,4 @@ inline aclnnStatus FinalizeOutput(aclTensor* fakeQuantOut, aclTensor* fakeQuantM | |||
| 57 | 57 | ||
| 58 | } // namespace FakeQuantCommon | 58 | } // namespace FakeQuantCommon |
| 59 | 59 | ||
| 60 | -#endif | 60 | +#endif |
| @@ -1,12 +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 | -message(STATUS "=== Debug: start ops.quant.fake_quant_affine_cachemask.op_host.CMakeLists.txt ") | ||
| 11 | - | ||
| 12 | -add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE fake_quant_affine_cachemask ACLNNTYPE aclnn_exclude) | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "../../../op_host/op_api/aclnn_fake_quant_per_channel_affine_cachemask.h" | 15 | +#include "../../../op_api/aclnn_fake_quant_per_channel_affine_cachemask.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -#include "../../../op_host/op_api/aclnn_fake_quant_per_tensor_affine_cachemask.h" | 15 | +#include "../../../op_api/aclnn_fake_quant_per_tensor_affine_cachemask.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| @@ -8,12 +8,4 @@ | |||
| 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 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | 11 | +add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE single_layer_lstm_grad ACLNNTYPE aclnn_exclude) |
| 12 | -if(NOT ENABLE_TEST) | ||
| 13 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 14 | -endif() | ||
| 15 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 16 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 17 | - add_subdirectory(${SUB_DIR}) | ||
| 18 | - endif() | ||
| 19 | -endforeach() | ||
Rrnn/single_layer_lstm_grad/op_host/op_api/aclnn_lstm_backward.cpp→rnn/single_layer_lstm_grad/op_api/aclnn_lstm_backward.cpp+1-1
| @@ -1609,4 +1609,4 @@ aclnnStatus aclnnLstmBackward(void* workspace, uint64_t workspaceSize, aclOpExec | |||
| 1609 | 1609 | ||
| 1610 | 1610 | ||
| 1611 | } | 1611 | } |
| 1612 | -#endif | 1612 | +#endif |
Rrnn/single_layer_lstm_grad/op_host/op_api/aclnn_lstm_backward.h→rnn/single_layer_lstm_grad/op_api/aclnn_lstm_backward.h+0-0
文件重命名但无更改。
Rrnn/single_layer_lstm_grad/op_host/op_api/single_layer_lstm_grad.cpp→rnn/single_layer_lstm_grad/op_api/single_layer_lstm_grad.cpp+0-0
文件重命名但无更改。
Rrnn/single_layer_lstm_grad/op_host/op_api/single_layer_lstm_grad.h→rnn/single_layer_lstm_grad/op_api/single_layer_lstm_grad.h+0-0
文件重命名但无更改。
| @@ -1,11 +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 | -add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE single_layer_lstm_grad ACLNNTYPE aclnn_exclude) | ||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -#include "../../../op_host/op_api/aclnn_lstm_backward.h" | 16 | +#include "../../../op_api/aclnn_lstm_backward.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | 19 | ||