Skip to content

Commit 4ac6d09

Browse files
author
fuwenguang
committed
Support child profilers add their metadata
1 parent 2859721 commit 4ac6d09

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libkineto/include/IActivityProfiler.h

+4
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ class IActivityProfilerSession {
130130
return "";
131131
}
132132

133+
virtual std::unordered_map<std::string, std::string> getMetadata() {
134+
return {};
135+
}
136+
133137
protected:
134138
TraceStatus status_ = TraceStatus::READY;
135139
};

libkineto/src/CuptiActivityProfiler.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ void CuptiActivityProfiler::processTraceInternal(ActivityLogger& logger) {
336336
device_properties.push_back(props);
337337
}
338338
}
339+
for (const auto& [key, value] : session->getMetadata()) {
340+
addMetadata(key, value);
341+
}
339342
}
340343
logger.handleTraceStart(
341344
metadata_, fmt::format("{}", fmt::join(device_properties, ",")));

0 commit comments

Comments
 (0)