[Mlir-commits] [mlir] [mlir][gpu] `gpu-module-to-binary`: add option to dump intermediate files (PR #170016)
Mehdi Amini
llvmlistbot at llvm.org
Mon Dec 1 02:01:11 PST 2025
================
@@ -64,8 +91,42 @@ void GpuModuleToBinaryPass::runOnOperation() {
SmallVector<Attribute> librariesToLink;
for (const std::string &path : linkFiles)
librariesToLink.push_back(StringAttr::get(&getContext(), path));
+
+ // Create dump directory if specified.
+ if (!dumpIntermediates.empty()) {
+ if (std::error_code ec =
+ llvm::sys::fs::create_directories(dumpIntermediates)) {
+ getOperation()->emitError() << "Failed to create dump directory '"
+ << dumpIntermediates << "': " << ec.message();
----------------
joker-eph wrote:
Is create_directories succeeding if the directory already exists?
https://github.com/llvm/llvm-project/pull/170016
More information about the Mlir-commits
mailing list