代码拉取完成,页面将自动刷新
同步操作将从 Ascend/ascendc-api-adv 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2024 Huawei Technologies Co., Ltd.
# This file is a part of the CANN Open Software.
# Licensed under CANN Open Software License Agreement Version 1.0 (the "License").
# Please refer to the License for details. You may not use this file except in compliance with the License.
# 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.
# See LICENSE in the root of the software repository for the full text of the License.
# ======================================================================================================================
cmake_minimum_required(VERSION 3.16.0)
project(ascendc-api-adv)
option(BUILD_OPEN_PROJECT "Build open ascendc lib project." ON)
set(ASCENDC_API_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(ASCENDC_SCRIPTS_DIR ${ASCENDC_API_DIR}/cmake/scripts)
if(BUILD_OPEN_PROJECT)
include(cmake/config.cmake)
set(INSTALL_LIBRARY_DIR packages/${CMAKE_SYSTEM_PROCESSOR}-linux)
else()
set(INSTALL_LIBRARY_DIR lib)
endif()
set(GEN_KERENL_TILING_DATA_SCRIPT ${ASCENDC_SCRIPTS_DIR}/gen_kernel_tiling_data_def.py)
set(TILING_DATA_DEF_DIR ${ASCENDC_API_DIR}/lib)
set(KERNEL_TILING_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(KERNEL_TILING_HAED ${KERNEL_TILING_DIR}/kernel_tiling/kernel_tiling.h)
set(PKG_KERNEL_TILING_DIR ${ASCEND_CANN_PACKAGE_PATH}/${CMAKE_SYSTEM_PROCESSOR}-linux/ascendc/include/highlevel_api/lib)
add_custom_command(OUTPUT ${KERNEL_TILING_HAED}
COMMAND ${HI_PYTHON} ${GEN_KERENL_TILING_DATA_SCRIPT} ${TILING_DATA_DEF_DIR} ${PKG_KERNEL_TILING_DIR} ${KERNEL_TILING_HAED}
DEPENDS ${GEN_KERENL_TILING_DATA_SCRIPT})
add_custom_target(gen_kernel_tiling ALL
DEPENDS ${KERNEL_TILING_HAED})
add_library(kernel_tiling_headers INTERFACE)
target_include_directories(kernel_tiling_headers INTERFACE
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/tikcpp>
$<INSTALL_INTERFACE:include/tikcpp/tikcfw>
$<INSTALL_INTERFACE:include/tikcpp/tikcfw/kernel_tiling>
)
add_subdirectory(impl)
if(ENABLE_TEST)
add_subdirectory(tests)
endif()
install(FILES
${KERNEL_TILING_HAED}
DESTINATION ${INSTALL_LIBRARY_DIR}/ascendc/include/highlevel_api/kernel_tiling/ OPTIONAL
)
install(DIRECTORY lib
DESTINATION ${INSTALL_LIBRARY_DIR}/ascendc/include/highlevel_api OPTIONAL
)
install(DIRECTORY impl
DESTINATION ${INSTALL_LIBRARY_DIR}/ascendc/include/highlevel_api OPTIONAL
FILES_MATCHING
PATTERN "*.h"
PATTERN "CMakeLists.txt" EXCLUDE
)
configure_file(
${ASCENDC_API_DIR}/cmake/kernel_headers.cmake
${CMAKE_CURRENT_BINARY_DIR}/kernel_headers.cmake
@ONLY
)
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/kernel_headers.cmake)
if(NOT BUILD_OPEN_PROJECT)
install_package(
PACKAGE kernel_tiling
TARGETS kernel_tiling_headers
FILES ${KERNEL_TILING_HAED}
DESTINATION ${INSTALL_INCLUDE_DIR}/ascendc/include/highlevel_api/kernel_tiling
)
install(SCRIPT ${ASCENDC_API_DIR}/cmake/kernel_directory.cmake)
endif()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。