Skip to content

Commit

Permalink
[XLA:GPU] Don't capture a string_view for SlowOperationAlarm.
Browse files Browse the repository at this point in the history
This was not caught because the string_view is only used for logging if
autotuning takes too long.

PiperOrigin-RevId: 697960535
  • Loading branch information
akuegel authored and Google-ML-Automation committed Nov 19, 2024
1 parent 4ad3a97 commit 7628944
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions xla/service/gpu/autotuning/conv_algorithm_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,10 @@ absl::StatusOr<AutotuneResult> GpuConvAlgorithmPicker::AutotuneOneConvRunner(
se::dnn::ProfileResult profile_result;
VLOG(4) << "Trying algorithm " << alg.ToString() << " for " << instr_str;

SlowOperationAlarm alarm(absl::Seconds(1), [&] {
return absl::StrFormat(
"Trying algorithm %s for conv %s is taking a while...", alg.ToString(),
instr_str);
});
SlowOperationAlarm alarm(
absl::Seconds(1),
absl::StrFormat("Trying algorithm %s for conv %s is taking a while...",
alg.ToString(), instr_str));

std::optional<size_t> workspace_size =
runner->ToAlgorithmDesc().workspace_size();
Expand Down

0 comments on commit 7628944

Please sign in to comment.