Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UST Logging for Empty Trace #1003

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libkineto/include/ILoggerObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ constexpr char kWarmUpStage[] = "Warm Up";
constexpr char kCollectionStage[] = "Collection";
constexpr char kPostProcessingStage[] = "Post Processing";

// Special string in UST for determining if traces are empty
constexpr char kEmptyTrace[] =
"No Valid Trace Events (CPU/GPU) found. Outputting empty trace.";

#if !USE_GOOGLE_LOG

#include <map>
Expand Down
3 changes: 1 addition & 2 deletions libkineto/src/CuptiActivityProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,7 @@ void CuptiActivityProfiler::processTraceInternal(ActivityLogger& logger) {
}
#endif // HAS_ROCTRACER
if (!traceNonEmpty()) {
LOG(WARNING)
<< "No Valid Trace Events (CPU/GPU) found. Outputting empty trace.";
LOG(WARNING) << kEmptyTrace;
}

for (const auto& session : sessions_) {
Expand Down
Loading