Skip to content

Commit

Permalink
[XLA:GPU] Limit the buffer drop logs in cupti_tracer.cc
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 686162277
  • Loading branch information
dimitar-asenov authored and Google-ML-Automation committed Oct 15, 2024
1 parent e4ca19f commit 821fdc6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xla/backends/profiler/gpu/cupti_tracer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1413,8 +1413,11 @@ absl::Status CuptiTracer::ProcessActivityBuffer(CUcontext context,
collector_->GetOptions().max_activity_api_events;
if (max_activity_event_count > 0 &&
num_activity_events_in_cached_buffer_ >= max_activity_event_count) {
LOG(WARNING) << "Already too many activity events, drop the buffer of "
<< size << "bytes of event to reuse.";
LOG_EVERY_N(WARNING, 10000)
<< "Already too many activity events, drop the buffer of " << size
<< "bytes of event to reuse. This warning is logged once per 10000 "
"occurrences, the current count is "
<< COUNTER << ".";
num_activity_events_in_dropped_buffer_ += event_count_in_buffer;
// buffer will be return to the pool
return absl::OkStatus();
Expand Down

0 comments on commit 821fdc6

Please sign in to comment.