[Mlir-commits] [mlir] [mlir][target] Adjust the start position of the moduleToObject timer (PR #129835)
Zichen Lu
llvmlistbot at llvm.org
Tue Mar 4 22:24:41 PST 2025
https://github.com/MikaOvO created https://github.com/llvm/llvm-project/pull/129835
As title. To avoid `Ungrouped Timers` when the target is `Assembly `.
>From 0e23f881ed3e41ccce74345db0b0980307038196 Mon Sep 17 00:00:00 2001
From: Zichen Lu <mikaovo2000 at gmail.com>
Date: Wed, 5 Mar 2025 14:22:55 +0800
Subject: [PATCH] [mlir][target] Adjust the start position of the
moduleToObject timer
---
mlir/lib/Target/LLVM/NVVM/Target.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mlir/lib/Target/LLVM/NVVM/Target.cpp b/mlir/lib/Target/LLVM/NVVM/Target.cpp
index fa8c597da58b1..5a2b829fbd1bd 100644
--- a/mlir/lib/Target/LLVM/NVVM/Target.cpp
+++ b/mlir/lib/Target/LLVM/NVVM/Target.cpp
@@ -709,7 +709,6 @@ NVPTXSerializer::moduleToObject(llvm::Module &llvmModule) {
moduleToObjectTimer.stopTimer();
llvmToISATimeInMs = moduleToObjectTimer.getTotalTime().getWallTime() * 1000;
moduleToObjectTimer.clear();
- moduleToObjectTimer.startTimer();
if (isaCallback)
isaCallback(serializedISA.value());
@@ -730,6 +729,7 @@ NVPTXSerializer::moduleToObject(llvm::Module &llvmModule) {
}
std::optional<SmallVector<char, 0>> result;
+ moduleToObjectTimer.startTimer();
// Compile to binary.
#if MLIR_ENABLE_NVPTXCOMPILER
result = compileToBinaryNVPTX(*serializedISA);
More information about the Mlir-commits
mailing list