Skip to content

Commit

Permalink
Add a missing log to log error if XLA_PJRT_GPU_ALLOW_DELETE_BEFORE_FU…
Browse files Browse the repository at this point in the history
…LFILL fails to read.

PiperOrigin-RevId: 678926392
  • Loading branch information
yifjiang authored and Google-ML-Automation committed Sep 26, 2024
1 parent 6777cef commit 0032f7c
Show file tree
Hide file tree
Showing 2 changed files with 6 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 @@ -157,6 +157,7 @@ cc_library(
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/synchronization",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:logging",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/profiler/lib:traceme",
"@tsl//tsl/protobuf:error_codes_proto_impl_cc",
Expand Down
5 changes: 5 additions & 0 deletions xla/pjrt/local_device_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ limitations under the License.
#include "xla/tsl/util/env_var.h"
#include "xla/util.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/statusor.h"
#include "tsl/profiler/lib/traceme.h"
#include "tsl/protobuf/error_codes.pb.h"
Expand Down Expand Up @@ -61,6 +62,10 @@ LocalDeviceState::LocalDeviceState(se::StreamExecutor* executor,
absl::Status status =
tsl::ReadBoolFromEnvVar("XLA_PJRT_GPU_ALLOW_DELETE_BEFORE_FULFILL", true,
&allow_delete_before_fulfill_);
if (!status.ok()) {
LOG(ERROR) << "Failed to read XLA_PJRT_GPU_ALLOW_DELETE_BEFORE_FULFILL: "
<< status;
}

local_hardware_id_ = executor_->device_ordinal();
local_device_id_ =
Expand Down

0 comments on commit 0032f7c

Please sign in to comment.