diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 61e98b3de..138afc058 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,8 +15,7 @@ /compiler/ @MaheshRavishankar @nirvedhmeshram @yzhang93 @Abhishek-Varma @jtuyls # Runtime -/runtime/ @nirvedhmeshram -/runtime/src/iree-amd-aie/aie_runtime @makslevental +/runtime/ @makslevental # AIE Passes /compiler/plugins/target/AMD-AIE/aie @makslevental diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/AIETarget.cpp b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/AIETarget.cpp index acb0de8f5..d1c43f1ce 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/AIETarget.cpp +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/AIETarget.cpp @@ -397,18 +397,28 @@ LogicalResult AIETargetBackend::serializeExecutable( if (auto err = llvm::sys::fs::create_directories(entryPointWorkDir)) { return moduleOp.emitOpError() - << "failed to create working directory for pdi generation: " + << "failed to create working directory for artifact generation: " << err.message(); } llvm::outs().flush(); SmallString<128> artifactPath(entryPointWorkDir); - llvm::sys::path::append(artifactPath, entryPointNamesFb[ordinal] + ".pdi"); + switch (options.deviceHal) { + case AMDAIEOptions::DeviceHAL::XRT: + llvm::sys::path::append(artifactPath, entryPointNamesFb[ordinal] + ".xclbin"); + break; + case AMDAIEOptions::DeviceHAL::XRT_LITE: + llvm::sys::path::append(artifactPath, entryPointNamesFb[ordinal] + ".pdi"); + break; + default: + llvm::errs() << "Unsupported device HAL\n"; + return failure(); + } SmallString<128> npuInstPath(entryPointWorkDir); llvm::sys::path::append(npuInstPath, entryPointNamesFb[ordinal] + ".npu.txt"); - // Convert ordinal to hexadecimal string for pdi kernel id. + // Convert ordinal to hexadecimal string for kernel id. std::stringstream ordinalHex; ordinalHex << "0x" << std::hex << ordinal; diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir index 3b1e4a2a8..dd7a7778f 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir @@ -1,8 +1,8 @@ // RUN: iree-compile --iree-hal-target-backends=amd-aie --compile-to=executable-targets %s | FileCheck %s --check-prefix=DEFAULT // RUN: iree-compile --iree-hal-target-backends=amd-aie --compile-to=executable-targets --iree-amdaie-enable-ukernels=all %s | FileCheck %s --check-prefix=ENABLE_UKERNEL -// DEFAULT: hal.executable.variant public @amdaie_xclbin_fb target(<"amd-aie", "amdaie-xclbin-fb", {target_device = "npu1_4col", ukernels = "none"}>) { -// ENABLE_UKERNEL: hal.executable.variant public @amdaie_xclbin_fb target(<"amd-aie", "amdaie-xclbin-fb", {target_device = "npu1_4col", ukernels = "all"}>) { +// DEFAULT: hal.executable.variant public @amdaie_xclbin_fb target(<"amd-aie", "amdaie-pdi-fb", {target_device = "npu1_4col", ukernels = "none"}>) { +// ENABLE_UKERNEL: hal.executable.variant public @amdaie_xclbin_fb target(<"amd-aie", "amdaie-pdi-fb", {target_device = "npu1_4col", ukernels = "all"}>) { func.func @matmul_small(%lhs : tensor<8x16xi32>, %rhs : tensor<16x32xi32>) -> tensor<8x32xi32> { %empty = tensor.empty() : tensor<8x32xi32>