[Mlir-commits] [mlir] 2ec16ee - [mlir][target] Adjust the start position of the moduleToObject timer (#129835)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Mar 6 02:09:15 PST 2025
Author: Zichen Lu
Date: 2025-03-06T11:09:12+01:00
New Revision: 2ec16ee28b87511ae7897bd38e5fab37b015661a
URL: https://github.com/llvm/llvm-project/commit/2ec16ee28b87511ae7897bd38e5fab37b015661a
DIFF: https://github.com/llvm/llvm-project/commit/2ec16ee28b87511ae7897bd38e5fab37b015661a.diff
LOG: [mlir][target] Adjust the start position of the moduleToObject timer (#129835)
As title. To avoid `Ungrouped Timers` when the target is `Assembly `.
Added:
Modified:
mlir/lib/Target/LLVM/NVVM/Target.cpp
Removed:
################################################################################
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