forked from nod-ai/iree-amd-aie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iree_runtime_plugin.cmake
30 lines (24 loc) · 1.04 KB
/
iree_runtime_plugin.cmake
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
# Copyright 2023 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# for BUILD_LOCAL_INTERFACE for xrt_coreutil
# (see runtime/src/iree-amd-aie/driver/xrt/CMakeLists.txt)
cmake_minimum_required(VERSION 3.26)
include(FetchContent)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(iree_aie_utils)
set(IREE_AMD_AIE_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}")
set(IREE_MLIR_AIR_SOURCE_DIR "${IREE_AMD_AIE_SOURCE_DIR}/third_party/mlir-air/mlir")
set(IREE_AMD_AIE_ENABLE_XRT_DRIVER OFF)
if("xrt" IN_LIST IREE_EXTERNAL_HAL_DRIVERS)
message(STATUS "Enabling XRT build because it is an enabled HAL driver")
set(IREE_AMD_AIE_ENABLE_XRT_DRIVER ON)
endif()
if(IREE_AMD_AIE_ENABLE_XRT_DRIVER)
include(iree_aie_xrt)
include(iree_aie_bootgen)
endif()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/runtime/src AMD-AIE)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/experimental AMD-AIE-experimental)