Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Oct 18, 2024
1 parent 66db9ce commit 3df44d3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 13 additions & 3 deletions compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/AIETarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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"}>) {

Check failure on line 4 in compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir

View workflow job for this annotation

GitHub Actions / Build and Test (windows, ASSERTIONS)

DEFAULT: expected string not found in input

Check failure on line 4 in compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir

View workflow job for this annotation

GitHub Actions / Build and Test (windows, ASSERTIONS)

DEFAULT: expected string not found in input

Check failure on line 4 in compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir

View workflow job for this annotation

GitHub Actions / Build and Test (windows, ASSERTIONS)

DEFAULT: expected string not found in input

Check failure on line 4 in compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir

View workflow job for this annotation

GitHub Actions / Build and Test (windows, ASSERTIONS)

DEFAULT: expected string not found in input

Check failure on line 4 in compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/test/amd_aie_target_backend.mlir

View workflow job for this annotation

GitHub Actions / Build and Test (windows, ASSERTIONS)

DEFAULT: expected string not found in input
// 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>
Expand Down

0 comments on commit 3df44d3

Please sign in to comment.