[Mlir-commits] [mlir] [mlir][gpu] `gpu-module-to-binary`: add option to dump intermediate files (PR #170016)
Ivan Butygin
llvmlistbot at llvm.org
Mon Dec 1 02:30:46 PST 2025
================
@@ -26,6 +32,27 @@ namespace mlir {
#include "mlir/Dialect/GPU/Transforms/Passes.h.inc"
} // namespace mlir
+static void dumpToFile(StringRef dumpDir, const llvm::Twine &filename,
+ function_ref<void(llvm::raw_ostream &)> writeContent) {
+ if (dumpDir.empty())
+ return;
+
+ llvm::SmallString<128> path(dumpDir);
+ llvm::sys::path::append(path, filename);
+
+ std::error_code ec;
+ llvm::ToolOutputFile output(path, ec, llvm::sys::fs::OF_None);
----------------
Hardcode84 wrote:
It will overwrite the existing files and it is intentional behavior.
https://github.com/llvm/llvm-project/pull/170016
More information about the Mlir-commits
mailing list