Skip to content

Commit 2ec16ee

Browse files
authored
[mlir][target] Adjust the start position of the moduleToObject timer (#129835)
As title. To avoid `Ungrouped Timers` when the target is `Assembly `.
1 parent 4f469ae commit 2ec16ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Target/LLVM/NVVM/Target.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,6 @@ NVPTXSerializer::moduleToObject(llvm::Module &llvmModule) {
709709
moduleToObjectTimer.stopTimer();
710710
llvmToISATimeInMs = moduleToObjectTimer.getTotalTime().getWallTime() * 1000;
711711
moduleToObjectTimer.clear();
712-
moduleToObjectTimer.startTimer();
713712
if (isaCallback)
714713
isaCallback(serializedISA.value());
715714

@@ -730,6 +729,7 @@ NVPTXSerializer::moduleToObject(llvm::Module &llvmModule) {
730729
}
731730

732731
std::optional<SmallVector<char, 0>> result;
732+
moduleToObjectTimer.startTimer();
733733
// Compile to binary.
734734
#if MLIR_ENABLE_NVPTXCOMPILER
735735
result = compileToBinaryNVPTX(*serializedISA);

0 commit comments

Comments
 (0)