diff --git a/build_tools/download_peano.sh b/build_tools/download_peano.sh index 70c8693f5..d5001a215 100644 --- a/build_tools/download_peano.sh +++ b/build_tools/download_peano.sh @@ -1,5 +1,5 @@ #!/bin/bash -RELEASE=19.0.0.2024082221+90abe71b +RELEASE=19.0.0.2024083101+42158757 pip download llvm_aie==$RELEASE -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly unzip llvm_aie*whl diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/XCLBinGen.cpp b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/XCLBinGen.cpp index 5de16906f..d68567b17 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/XCLBinGen.cpp +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Target/XCLBinGen.cpp @@ -507,7 +507,7 @@ static_assert(std::is_same_v vitisDir, const std::string &targetArch, - bool verbose, Path peanoDir, const std::string &npuVersion, + bool verbose, const Path &peanoDir, const std::string &npuVersion, const std::optional &ukernel) { auto tileOps = deviceOp.getOps(); std::string errorMessage; @@ -532,22 +532,29 @@ static LogicalResult generateCoreElfFiles( Path cwd = std::filesystem::current_path(); FailureOr mmObjectFilePath; if (ukernel && (ukernel == "mm" || ukernel == "all")) { - FailureOr maybeVitisDir = findVitis(vitisDir, npuVersion); - if (failed(maybeVitisDir)) { - llvm::errs() << "compiling ukernels currently requires chess (even if " - "you're using peano)"; - return failure(); - } if (!std::filesystem::exists(cwd / "mm.o")) { - mmObjectFilePath = assembleStringUsingChess( - /*inputFileStr=*/_MM_CC, - /*inputFileName=*/"mm.cc", - /*outputFileName=*/"mm.o", - /*outputDir=*/cwd, - /*extraArgs*/ std::vector{}, - /*workDir=*/tempDir, - /*vitisDir=*/*maybeVitisDir, - /*npuVersion*/ npuVersion, verbose); + FailureOr maybeVitisDir = findVitis(vitisDir, npuVersion); + if (maybeVitisDir) { + mmObjectFilePath = assembleStringUsingChess( + /*inputFileStr=*/_MM_CC, + /*inputFileName=*/"mm.cc", + /*outputFileName=*/"mm.o", + /*outputDir=*/cwd, + /*extraArgs*/ std::vector{}, + /*workDir=*/tempDir, + /*vitisDir=*/*maybeVitisDir, + /*npuVersion*/ npuVersion, verbose); + } else { + mmObjectFilePath = assembleStringUsingPeano( + /*inputFileStr=*/_MM_CC, + /*inputFileName=*/"mm.cc", + /*outputFileName=*/"mm.o", + /*outputDir=*/cwd, + /*extraArgs*/ std::vector{}, + /*workDir=*/tempDir, + /*peanoDir=*/peanoDir, + /*npuVersion*/ npuVersion, verbose); + } if (failed(mmObjectFilePath)) return failure(); } else { mmObjectFilePath = cwd / "mm.o";