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> result; + moduleToObjectTimer.startTimer(); // Compile to binary. #if MLIR_ENABLE_NVPTXCOMPILER result = compileToBinaryNVPTX(*serializedISA);