Merged
fix(machine): Compile monitor info fix. #5321
chaizhengtongAdd on Aug 6
fix(machine): Compile monitor info fix. #5321
Merged
chaizhengtongAdd on Aug 6
Total: 2 files changed+2-8
@@ -126,12 +126,6 @@ void MonitorImpl::PrintTotalTimeOut(double totalElapsed, int totalTimeoutSec)
126 COMPILER_LOGI("%s", warnMsg.c_str());126 COMPILER_LOGI("%s", warnMsg.c_str());
127 (void)fprintf(stdout, "%s\n", warnMsg.c_str());127 (void)fprintf(stdout, "%s\n", warnMsg.c_str());
128 (void)fflush(stdout);128 (void)fflush(stdout);
129- } else {
130- std::string warnMsg = "[Compiler Monitor] | [== WARNING ==] Total elapsed [" + FormatElapsed(totalElapsed) +
131- "] exceeded the total time threshold [" +
132- FormatElapsed(static_cast<double>(totalTimeoutSec)) +
133- "] | Total number of op: " + std::to_string(currentTotalOpsize);
134- COMPILER_WARN_EVENT("%s", warnMsg.c_str());
135 }129 }
136 }130 }
137}131}
@@ -108,7 +108,7 @@ void MonitorManager::Initialize(bool enable, int intervalSec, double timeoutSec,
108 (void)setenv("PYPTO_COMPILER_MONITOR_PREPARE_STARTED", "1", 1);108 (void)setenv("PYPTO_COMPILER_MONITOR_PREPARE_STARTED", "1", 1);
109 impl_->StartMonitoring();109 impl_->StartMonitoring();
110 if (!passDetailEnable) {110 if (!passDetailEnable) {
111- std::string thresholdMsg = "[Compiler Monitor] Threshold: " + std::to_string(totalTimeoutSec_.load()) +111+ std::string thresholdMsg = "Threshold: " + std::to_string(totalTimeoutSec_.load()) +
112 "s | You can adjust the timeout threshold via "112 "s | You can adjust the timeout threshold via "
113 "pypto.set_host_options(compile_timeout=...)";113 "pypto.set_host_options(compile_timeout=...)";
114 COMPILER_EVENT("%s", thresholdMsg.c_str());114 COMPILER_EVENT("%s", thresholdMsg.c_str());
@@ -400,7 +400,7 @@ void MonitorManager::PrintWatchdogSummary(double totalElapsed)
400 detectedStage += name;400 detectedStage += name;
401 }401 }
402 }402 }
403- std::string summaryMsg = "[Compiler Monitor] Threshold: " + std::to_string(totalTimeoutSec_.load()) +403+ std::string summaryMsg = "Threshold: " + std::to_string(totalTimeoutSec_.load()) +
404 "s | DetectedStage: " + (detectedStage.empty() ? "None" : detectedStage);404 "s | DetectedStage: " + (detectedStage.empty() ? "None" : detectedStage);
405 for (size_t i = 0; i < stageOrder.size(); i++) {405 for (size_t i = 0; i < stageOrder.size(); i++) {
406 summaryMsg += " | " + stageOrder[i] + ": " + FormatElapsed(stageElapsed[i]);406 summaryMsg += " | " + stageOrder[i] + ": " + FormatElapsed(stageElapsed[i]);