[Mlir-commits] [mlir] [mlir][target] Adjust the start position of the moduleToObject timer (PR #129835)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Mar 4 22:25:14 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Zichen Lu (MikaOvO)
<details>
<summary>Changes</summary>
As title. To avoid `Ungrouped Timers` when the target is `Assembly `.
---
Full diff: https://github.com/llvm/llvm-project/pull/129835.diff
1 Files Affected:
- (modified) mlir/lib/Target/LLVM/NVVM/Target.cpp (+1-1)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/129835
More information about the Mlir-commits
mailing list