Memory Liveness

This commit is contained in:
ilgeco
2026-06-03 18:15:30 +02:00
parent 2a8faf9c6b
commit 20cf40c9ba
15 changed files with 1263 additions and 112 deletions
+4 -2
View File
@@ -5,16 +5,18 @@
namespace onnx_mlir {
std::fstream openReportFile(const std::string& name) {
std::fstream openReportFileWithExtension(const std::string& name, llvm::StringRef extension) {
std::string outputDir = getOutputDir();
if (outputDir.empty())
return {};
std::string reportsDir = outputDir + "/reports";
createDirectory(reportsDir);
return std::fstream(reportsDir + "/" + name + ".txt", std::ios::out);
return std::fstream(reportsDir + "/" + name + "." + extension.str(), std::ios::out);
}
std::fstream openReportFile(const std::string& name) { return openReportFileWithExtension(name, "txt"); }
std::string formatReportMemory(uint64_t bytes) {
const char* units[] = {"B", "KB", "MB", "GB", "TB", "PB", "EB"};
int i = 0;
+1
View File
@@ -11,6 +11,7 @@
namespace onnx_mlir {
std::fstream openReportFile(const std::string& name);
std::fstream openReportFileWithExtension(const std::string& name, llvm::StringRef extension);
std::string formatReportMemory(uint64_t bytes);
struct ReportField {