#pragma once #include "mlir/IR/BuiltinOps.h" #include "llvm/ADT/StringRef.h" #include #include namespace onnx_mlir { /// Emits a MLIR snapshot under the current compiler output /// directory for pass-level debugging. void dumpModule(mlir::ModuleOp moduleOp, const std::string& name, bool assumeVerified = false); /// Opens a file under the same dialect dump directory used by dumpModule. std::fstream openDialectDumpFileWithExtension(const std::string& name,llvm::StringRef destination = "/dialects", llvm::StringRef extension = "mlir"); } // namespace onnx_mlir