-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
38 lines (28 loc) · 1.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#******************************************************************************
# Copyright (c) 2023-2024 Advanced Micro Devices, Inc.
# All rights reserved.
#******************************************************************************
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(zentorch)
# set cmake folder as a place to search for .cmake files
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
# build and add ZenDNN and BLIS libraries
find_package(ZENDNN REQUIRED)
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/src/cpu/cpp/Config.hpp.in"
"${CMAKE_CURRENT_SOURCE_DIR}/src/cpu/cpp/Config.hpp" )
# Define our library target
add_library(zentorch INTERFACE)
add_dependencies(zentorch libamdZenDNN)
# Enable C++14
target_compile_features(zentorch INTERFACE cxx_std_14)
# Include target directories
target_include_directories(zentorch INTERFACE
${ZENDNN_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/ATen/native/zendnn/)
# Set default build type
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build type not set - defaulting to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
# Link against ZenDNN and AOCL BLIS
target_link_libraries(zentorch INTERFACE ${ZENDNN_LIBRARIES} ${BLIS_LIBRARIES} ${FBGEMM_LIBRARIES})