diff --git a/compiler/plugins/target/AMD-AIE/air/CMakeLists.txt b/compiler/plugins/target/AMD-AIE/air/CMakeLists.txt index 7e283c021..8af0c3bf7 100644 --- a/compiler/plugins/target/AMD-AIE/air/CMakeLists.txt +++ b/compiler/plugins/target/AMD-AIE/air/CMakeLists.txt @@ -329,6 +329,25 @@ iree_cc_library( MLIRSupport ) +replace_string_in_file( + ${IREE_MLIR_AIR_SOURCE_DIR}/lib/Transform/AIRDependencyScheduleOpt.cpp + "aie/Dialect/AIE/IR" "aie") +replace_string_in_file( + ${IREE_MLIR_AIR_SOURCE_DIR}/lib/Transform/AIRDependencyScheduleOpt.cpp + "aie/Dialect/AIEX/IR" "aie") +replace_string_in_file( + ${IREE_MLIR_AIR_SOURCE_DIR}/lib/Transform/AIRDependencyScheduleOpt.cpp + "AIE::getTargetModel(*device)" + "getDeviceModel(*device)") +replace_string_in_file( + ${IREE_MLIR_AIR_SOURCE_DIR}/lib/Transform/AIRDependencyScheduleOpt.cpp + "isa(getDeviceModel(*device))" + "false") +replace_string_in_file( + ${IREE_MLIR_AIR_SOURCE_DIR}/lib/Transform/AIRDependencyScheduleOpt.cpp + "isa(getDeviceModel(*device))" + "true") + ############################################################################### # AIR Passes ############################################################################### diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/BridgeToAIRPass.cpp b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/BridgeToAIRPass.cpp index 4d4b06d63..345ef6c85 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/BridgeToAIRPass.cpp +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/BridgeToAIRPass.cpp @@ -4,6 +4,7 @@ // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include "air/Util/Util.h" #include "iree-amd-aie/Transforms/Passes.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/Arith/Utils/Utils.h" @@ -102,6 +103,7 @@ void AMDAIEBridgeToAIRPass::runOnOperation() { patterns .insert( context); + xilinx::air::populateBufferMemrefToFuncArgsPattern(patterns); if (failed(applyPatternsGreedily(getOperation(), std::move(patterns)))) { return signalPassFailure(); } diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/Passes.cpp b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/Passes.cpp index 8afa5d8a6..d0251cc2b 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/Passes.cpp +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/Passes.cpp @@ -1024,8 +1024,7 @@ void addMLIRAIRLoweringPasses(OpPassManager &passManager, AMDAIEDevice device, passManager.addPass(createCSEPass()); passManager.addPass(createCanonicalizerPass()); passManager.addPass(createCSEPass()); - passManager.addNestedPass( - xilinx::air::createAIRSegmentLoopFusion()); + passManager.addNestedPass(xilinx::air::createAIRLoopFusion()); passManager.addPass( xilinx::air::createAIRLabelScfForLoopForPingPongPattern()); @@ -1076,6 +1075,12 @@ void addMLIRAIRLoweringPasses(OpPassManager &passManager, AMDAIEDevice device, options.clEmitWhileLoop = true; passManager.addPass(xilinx::air::createAIRToAIEPass(options)); } + { + xilinx::air::AIROptimizeShimDMABDsOptions options; + options.clDevice = stringifyEnum(device); + passManager.addNestedPass( + xilinx::air::createAIROptimizeShimDMABDs(options)); + } passManager.addPass(createCanonicalizerPass()); passManager.addPass(xilinx::air::createAIRLoweringPass()); { diff --git a/third_party/mlir-air b/third_party/mlir-air index 7904ea742..2feb77513 160000 --- a/third_party/mlir-air +++ b/third_party/mlir-air @@ -1 +1 @@ -Subproject commit 7904ea742ee37f7020dea85376f20d9aec04a377 +Subproject commit 2feb775136d262ca4754096eebc1f8fd49af3456