Skip to content

Commit

Permalink
Extra debug logging
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 719441777
  • Loading branch information
Google-ML-Automation committed Jan 24, 2025
1 parent 6557723 commit b7f1b9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions xla/pjrt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ cc_library(
"//xla/tsl/concurrency:async_value",
"//xla/tsl/concurrency:ref_count",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:span",
Expand Down
7 changes: 7 additions & 0 deletions xla/pjrt/pjrt_future.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ limitations under the License.
#include <utility>

#include "absl/base/thread_annotations.h"
#include "absl/log/log.h"
#include "absl/status/status.h"
#include "absl/synchronization/mutex.h"
#include "absl/types/span.h"
Expand Down Expand Up @@ -54,6 +55,12 @@ PjRtFuture<> JoinFutures(absl::Span<const PjRtFuture<>> futures) {
future.OnReady([state](absl::Status status) {
if (!status.ok()) {
absl::MutexLock lock(&state->mu);
if (VLOG_IS_ON(2)) {
if (status.code() != state->status.code()) {
VLOG(2) << "Ignoring status " << status
<< " because first error was " << state->status;
}
}
state->status.Update(status);
}

Expand Down

0 comments on commit b7f1b9b

Please sign in to comment.