From 5b006542439abcc64ea249562ccdcd2d9dd35c08 Mon Sep 17 00:00:00 2001 From: Jose M Monsalve Diaz Date: Thu, 20 Jun 2024 12:57:52 -0700 Subject: [PATCH] Adding error message whenever the xclbin tool fails to produce xclbin --- .../target/AMD-AIE/iree-amd-aie/Target/AIETarget.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 a8d2d2060..7eff26b59 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 @@ -349,10 +349,12 @@ LogicalResult AIETargetBackend::serializeExecutable( { SmallVector cmdEnvRefs{cmdEnv.begin(), cmdEnv.end()}; - int result = llvm::sys::ExecuteAndWait(cmdArgs[0], cmdArgs, cmdEnvRefs); + int result = llvm::sys::ExecuteAndWait(cmdArgs[0], cmdArgs, cmdEnvRefs, + {}, 0, 0, &errorMessage); if (result != 0) - return moduleOp.emitOpError( - "Failed to produce an XCLBin with external tool."); + return moduleOp.emitOpError() + << "Failed to produce an XCLBin with external tool: " + << errorMessage; } std::ifstream instrFile(static_cast(npuInstPath));