Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu-Zhewen committed Dec 2, 2024
2 parents 6ef6412 + 1c7e406 commit 9247b96
Show file tree
Hide file tree
Showing 19 changed files with 624 additions and 402 deletions.
1 change: 0 additions & 1 deletion build_tools/ci/cpu_comparison/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,6 @@ def generate_aie_vmfb(
"--iree-scheduling-optimize-bindings=false",
"--iree-hal-memoization=false",
"--iree-hal-indirect-command-buffers=false",
f"--mlir-disable-threading",
"--mlir-elide-resource-strings-if-larger=10",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ LogicalResult AIETargetBackend::serializeExecutable(
/*xclBinInstanceName=*/"IREE",
/*amdAIEInstallDir=*/options.amdAieInstallDir,
/*InputXCLBin=*/std::nullopt,
/*ukernel=*/options.enableAMDAIEUkernels))) {
/*ukernel=*/options.enableAMDAIEUkernels,
/*additionalPeanoOptFlags=*/options.additionalPeanoOptFlags))) {
return failure();
}

Expand Down
15 changes: 13 additions & 2 deletions compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/AIETarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include <string>

#include "aie/AIEDialect.h"
#include "iree-amd-aie/Transforms/KernelDispatch.h"
#include "iree/compiler/Dialect/HAL/Target/TargetBackend.h"
#include "iree/compiler/Dialect/HAL/Target/TargetDevice.h"
Expand All @@ -29,9 +28,14 @@ struct AMDAIEOptions {
// Dump system commands used during compilation
bool showInvokedCommands{false};

// Use the legacy chess compiler.
// Use the chess compiler. The default is to use peano.
bool useChess{false};

// Additional flags to run peano's opt with (if peano is the backend compiler
// selected). These are mostly appended on the end of the default flags, but
// some flags may replace existing flags if they conflict.
std::string additionalPeanoOptFlags;

// Print IR after all MLIR passes run in aie2xclbin (to stderr).
bool aie2xclbinPrintIrAfterAll{false};

Expand Down Expand Up @@ -63,6 +67,13 @@ struct AMDAIEOptions {

void bindOptions(OptionsBinder &binder) {
static llvm::cl::OptionCategory category("AMD AIE Options");

binder.opt<std::string>(
"iree-amd-aie-additional-peano-opt-flags", additionalPeanoOptFlags,
llvm::cl::cat(category),
llvm::cl::desc("Additional flags for peano's opt. Example: "
"\"-O3 --magic-flag\"."));

binder.opt<std::string>(
"iree-amd-aie-install-dir", amdAieInstallDir, llvm::cl::cat(category),
llvm::cl::desc("Path to AMDAIE installation directory (typically the "
Expand Down
Loading

0 comments on commit 9247b96

Please sign in to comment.