已合并
fix copyright and compilation bug #105
starfican创建于 9月17日
fix copyright and compilation bug #105
已合并
共 2 个文件变更+21-51
| @@ -1,12 +1,12 @@ | |||
| 1 | -# ----------------------------------------------------------------------------------------------------------- | 1 | +# ---------------------------------------------------------------------------- |
| 2 | -# Copyright (c) 2025 Huawei Technologies Co., Ltd. | 2 | +# Copyright (c) 2026 Huawei Technologies Co., Ltd. |
| 3 | -# This program is free software, you can redistribute it and/or modify it under the terms and conditions of | 3 | +# This program is free software, you can redistribute it and/or modify. |
| 4 | -# CANN Open Software License Agreement Version 2.0 (the "License"). | 4 | +# This file is a part of the CANN Open Software. |
| 5 | +# Licensed under 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 | # 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 | +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 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 | file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) |
| 12 | if(NOT ENABLE_TEST AND NOT BENCHMARK) | 12 | if(NOT ENABLE_TEST AND NOT BENCHMARK) |
| @@ -1,51 +1,21 @@ | |||
| 1 | -# ----------------------------------------------------------------------------------------------------------- | 1 | +# ---------------------------------------------------------------------------- |
| 2 | -# Copyright (c) 2025 Huawei Technologies Co., Ltd. | 2 | +# Copyright (c) 2026 Huawei Technologies Co., Ltd. |
| 3 | -# This program is free software, you can redistribute it and/or modify it under the terms and conditions of | 3 | +# This program is free software, you can redistribute it and/or modify. |
| 4 | -# CANN Open Software License Agreement Version 2.0 (the "License"). | 4 | +# This file is a part of the CANN Open Software. |
| 5 | +# Licensed under 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 | # 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 | +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 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 | -set(ASCEND_OP_NAME "" CACHE STRING "Ascend op names to compile") | ||
| 11 | -set(OP_TYPE "matmul_abft_verify") | ||
| 12 | 10 | ||
| 13 | -# ACLNN code generation is disabled unless this switch is visible from the | 11 | + |
| 14 | -# top-level generation stage. Keep the setting local to this operator's build | 12 | +# MatmulAbftVerify exposes public ACLNN APIs. |
| 15 | -# configuration instead of changing the repository root CMakeLists.txt. | ||
| 16 | set(ENABLE_GEN_ACLNN ON CACHE BOOL "Generate ACLNN APIs from operator definitions" FORCE) | 13 | set(ENABLE_GEN_ACLNN ON CACHE BOOL "Generate ACLNN APIs from operator definitions" FORCE) |
| 17 | 14 | ||
| 18 | -if(ASCEND_OP_NAME) | ||
| 19 | - set(_ASCEND_OP_NAME_TMP "${ASCEND_OP_NAME}") | ||
| 20 | - separate_arguments(_ASCEND_OP_NAME_TMP) | ||
| 21 | - | ||
| 22 | - list(FIND _ASCEND_OP_NAME_TMP "${OP_TYPE}" _index) | ||
| 23 | - if(_index EQUAL -1) | ||
| 24 | - message(STATUS "[${OP_TYPE}] skipped, not in ASCEND_OP_NAME list: ${ASCEND_OP_NAME}") | ||
| 25 | - return() | ||
| 26 | - else() | ||
| 27 | - message(STATUS "[${OP_TYPE}] selected, in ASCEND_OP_NAME list: ${ASCEND_OP_NAME}") | ||
| 28 | - endif() | ||
| 29 | -endif() | ||
| 30 | - | ||
| 31 | -file(GLOB CURRENT_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) | ||
| 32 | -if(NOT ENABLE_TEST AND NOT BENCHMARK) | ||
| 33 | - list(REMOVE_ITEM CURRENT_DIRS tests) | ||
| 34 | -endif() | ||
| 35 | -foreach(SUB_DIR ${CURRENT_DIRS}) | ||
| 36 | - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/CMakeLists.txt") | ||
| 37 | - add_subdirectory(${SUB_DIR}) | ||
| 38 | - endif() | ||
| 39 | -endforeach() | ||
| 40 | - | ||
| 41 | -add_ops_compile_options( | ||
| 42 | - MatmulAbftVerify | ||
| 43 | - OPTIONS -I${CMAKE_CURRENT_SOURCE_DIR}/../op_kernel | ||
| 44 | -) | ||
| 45 | add_modules_sources( | 15 | add_modules_sources( |
| 46 | - HOSTNAME ${OPHOST_NAME} | 16 | + HOSTNAME ${OPHOST_NAME} |
| 47 | - MODE PRIVATE | 17 | + MODE PRIVATE |
| 48 | - DIR ${CMAKE_CURRENT_SOURCE_DIR} | 18 | + DIR ${CMAKE_CURRENT_SOURCE_DIR} |
| 49 | - OPTYPE matmul_abft_verify | 19 | + OPTYPE matmul_abft_verify |
| 50 | - ACLNNTYPE aclnn | 20 | + ACLNNTYPE aclnn |
| 51 | ) | 21 | ) |