Skip to content

Commit 39907eb

Browse files
authored
[PROTON][XPU] Cleanup debug prints (#5309)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 860275f commit 39907eb

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

third_party/proton/csrc/include/Profiler/GPUProfiler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include "Utility/Atomic.h"
88
#include "Utility/Map.h"
99
#include "Utility/Set.h"
10-
#include <iostream>
1110

1211
#include <atomic>
1312
#include <deque>

third_party/proton/csrc/lib/Data/TreeData.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "Data/Metric.h"
44
#include "Device.h"
55
#include "nlohmann/json.hpp"
6-
#include <iostream>
76

87
#include <limits>
98
#include <map>
@@ -164,28 +163,17 @@ size_t TreeData::addOp(size_t scopeId, const std::vector<Context> &contexts) {
164163
}
165164

166165
void TreeData::addMetric(size_t scopeId, std::shared_ptr<Metric> metric) {
167-
std::cout << "\taddMetric\n";
168166
std::unique_lock<std::shared_mutex> lock(mutex);
169167
auto scopeIdIt = scopeIdToContextId.find(scopeId);
170168
// The profile data is deactivated, ignore the metric
171-
if (scopeIdIt == scopeIdToContextId.end()) {
172-
std::cout << "MARK111\n" << std::flush;
169+
if (scopeIdIt == scopeIdToContextId.end())
173170
return;
174-
}
175171
auto contextId = scopeIdIt->second;
176-
std::cout << "\taddMetric::contextId: " << contextId << "\n";
177172
auto &node = tree->getNode(contextId);
178-
if (node.metrics.find(metric->getKind()) == node.metrics.end()) {
179-
std::cout << "MARK112\n" << std::flush;
180-
std::cout << "duration: "
181-
<< std::get<uint64_t>(metric->getValue(KernelMetric::Duration))
182-
<< "\n"
183-
<< std::flush;
173+
if (node.metrics.find(metric->getKind()) == node.metrics.end())
184174
node.metrics.emplace(metric->getKind(), metric);
185-
} else {
186-
std::cout << "MARK113\n" << std::flush;
175+
else
187176
node.metrics[metric->getKind()]->updateMetric(*metric);
188-
}
189177
}
190178

191179
void TreeData::addMetrics(

0 commit comments

Comments
 (0)