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

Avoid marking every profile loop stop as Collection stage, use data available to mark errored stages. #977

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 7 additions & 2 deletions libkineto/src/CuptiActivityProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ void CuptiActivityProfiler::configure(
// presumably because structures are allocated and initialized, callbacks
// are activated etc. After a while the overhead decreases and stabilizes.
// It's therefore useful to perform some warmup before starting recording.
LOG(INFO) << "Enabling GPU tracing";
LOG(INFO) << "Enabling GPU tracing with max CUPTI buffer size " << config_->activitiesMaxGpuBufferSize() / 1024 / 1024 << "MB)";
cupti_.setMaxBufferSize(config_->activitiesMaxGpuBufferSize());
time_point<system_clock> timestamp;
if (VLOG_IS_ON(1)) {
Expand Down Expand Up @@ -1174,6 +1174,8 @@ const time_point<system_clock> CuptiActivityProfiler::performRunLoopStep(
std::lock_guard<std::mutex> guard(mutex_);
stopTraceInternal(now);
resetInternal();
LOG(ERROR) << "State: Warmup stopped by CUPTI. (Buffer size configured is " << config_->activitiesMaxGpuBufferSize() / 1024 / 1024 << "MB)";
UST_LOGGER_MARK_COMPLETED(kWarmUpStage);
VLOG(0) << "Warmup -> WaitForRequest";
break;
}
Expand Down Expand Up @@ -1222,7 +1224,10 @@ const time_point<system_clock> CuptiActivityProfiler::performRunLoopStep(
}

#if defined(HAS_CUPTI) || defined(HAS_ROCTRACER)
ecs_.cupti_stopped_early = cupti_.stopCollection;
if (cupti_.stopCollection) {
ecs_.cupti_stopped_early = cupti_.stopCollection;
LOG(ERROR) << "State: CollectTrace stopped by CUPTI. (Buffer size configured is " << config_->activitiesMaxGpuBufferSize() / 1024 / 1024 << "MB)";
}
#endif // HAS_CUPTI || HAS_ROCTRACER

std::lock_guard<std::mutex> guard(mutex_);
Expand Down
Loading