Skip to content

Commit

Permalink
Adapt to changes for next IREE integration post 20231228. (nod-ai#62)
Browse files Browse the repository at this point in the history
A patch like this will be necessary if syncing to an IREE at/past
iree-org/iree#16011.

Syncing to c35d8e91dfd8cc724520ec652031a3279b5edd69
  • Loading branch information
stellaraccident authored Dec 29, 2023
1 parent e3feed6 commit 1e2aa24
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 43 deletions.
16 changes: 3 additions & 13 deletions compiler/plugins/target/AMD-AIE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,14 @@

set(IREE_MLIR_AIR_SOURCE_DIR "${IREE_AMD_AIE_SOURCE_DIR}/third_party/mlir-air/mlir")
set(IREE_MLIR_AIE_SOURCE_DIR "${IREE_AMD_AIE_SOURCE_DIR}/third_party/mlir-aie")
set(IREE_PACKAGE_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
set(IREE_PACKAGE_ROOT_PREFIX "iree::target")
set(IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")

include_directories("${IREE_MLIR_AIE_SOURCE_DIR}/include")
include_directories("${IREE_MLIR_AIR_SOURCE_DIR}/include")

add_library(iree_target_amd-aie_compiler_defs INTERFACE)
target_include_directories(iree_target_amd-aie_compiler_defs
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
iree_setup_c_src_root(
PACKAGE_ROOT_PREFIX iree::target
IMPLICIT_DEFS_TARGET iree_target_amd-aie_compiler_defs
)

# Configures all iree_cc_* targets to take this implicit dep,
# which provides common includes and copts for the tree.
set(IREE_IMPLICIT_DEFS_CC_DEPS iree_target_amd-aie_compiler_defs)

add_subdirectory(iree-amd-aie)
add_subdirectory(aie)
add_subdirectory(air)
Expand Down
12 changes: 2 additions & 10 deletions compiler/plugins/target/AMD-AIE/air/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,6 @@ iree_tablegen_library(
-gen-enum-defs Dialect/AIRRt/AIRRtOpsEnums.cpp.inc
)

iree_tablegen_library(
NAME
AIRConversionGen
TD_FILE
"${IREE_MLIR_AIR_SOURCE_DIR}/include/air/Conversion/Passes.td"
OUTS
-gen-pass-decls Conversion/Passes.h.inc
)

###############################################################################
# AIR Conversion Passes
###############################################################################
Expand Down Expand Up @@ -187,9 +178,9 @@ iree_cc_library(
"${IREE_MLIR_AIR_SOURCE_DIR}/lib/Conversion/AIRPipeline.cpp"
DEPS
::defs
::AIRConversionPassHeaders
::AIRTransform
::AIRTransformOps
::AIRConversionGen
::AIRDialectIR
::AIRRtDialectIR
iree::target::amd-aie::aie::AIEDialectIR
Expand Down Expand Up @@ -259,6 +250,7 @@ iree_cc_library(
::AIRDialectIR
::AIRTransform
::AIRTransformOps
::AIRTransformPassHeaders
::AIRUtil
MLIRIR
MLIRLinalgDialect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "air/Dialect/AIRRt/AIRRtDialect.h"
#include "iree-amd-aie/Target/XclBinGeneratorKit.h"
#include "iree-amd-aie/Transforms/Passes.h"
#include "iree/compiler/Codegen/Dialect/IREECodegenDialect.h"
#include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
#include "iree/compiler/Utils/FlatbufferUtils.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/Support/Debug.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "iree-amd-aie/Transforms/Passes.h"
#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
#include "iree/compiler/Codegen/Common/Passes.h"
#include "iree/compiler/Codegen/Dialect/IREECodegenAttrs.h"
#include "iree/compiler/Codegen/Dialect/IREECodegenDialect.h"
#include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
#include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
#include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
#include "iree/compiler/Dialect/HAL/IR/HALOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ iree_cc_library(
::PassesIncGen
MLIRSupport
iree::compiler::Codegen::Common::TransformDialectInterpreterPass
iree::compiler::Codegen::Dialect::IREECodegenDialect
iree::compiler::Codegen::Dialect::Codegen::IR::IREECodegenDialect
iree::compiler::Dialect::HAL::IR
iree::compiler::Utils
iree::target::amd-aie::aie::AIETransformPasses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef IREE_AMD_AIE_TRANSFORMS_PASSES_H_
#define IREE_AMD_AIE_TRANSFORMS_PASSES_H_

#include "iree/compiler/Codegen/Dialect/IREECodegenAttrs.h"
#include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
#include "mlir/Pass/Pass.h"

namespace mlir::iree_compiler::AMDAIE {
Expand Down
17 changes: 4 additions & 13 deletions runtime/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,11 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set(IREE_XRT_SOURCE_DIR "${IREE_AMD_AIE_SOURCE_DIR}/third_party/XRT/src")
set(IREE_PACKAGE_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
set(IREE_PACKAGE_ROOT_PREFIX "")
set(IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")


add_library(iree_AMD-AIE_runtime_defs INTERFACE)
target_include_directories(iree_AMD-AIE_runtime_defs
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
iree_setup_c_src_root(
DEFAULT_EXPORT_SET Runtime
DEFAULT_INSTALL_COMPONENT IREEDevLibraries-Runtime
IMPLICIT_DEFS_TARGET iree_AMD-AIE_runtime_defs
)

# Configures all iree_cc_* targets to take this implicit dep,
# which provides common includes and copts for the tree.
set(IREE_IMPLICIT_DEFS_CC_DEPS iree_AMD-AIE_runtime_defs)

add_subdirectory(iree-amd-aie)
1 change: 0 additions & 1 deletion runtime/src/iree-amd-aie/driver/xrt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ iree_cc_library(
iree::base::core_headers
iree::base::internal::flatcc::building
iree::hal
iree::hal::utils::buffer_transfer
iree-amd-aie::schemas::xrt_executable_def_c_fbs
XRT::xrt_coreutil
COPTS
Expand Down
2 changes: 1 addition & 1 deletion sync_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### Update with: shark-workspace pin

PINNED_VERSIONS = {
"iree": "2bb8019e2c09ca710191b8dd38230581bc68f3cd",
"iree": "c35d8e91dfd8cc724520ec652031a3279b5edd69",
}

ORIGINS = {
Expand Down

0 comments on commit 1e2aa24

Please sign in to comment.