File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -131,14 +131,14 @@ Status TryAcquireTpuLock() {
131
131
static absl::Mutex* mu = new absl::Mutex ();
132
132
absl::MutexLock l (mu);
133
133
134
+ // TODO(skyewm): use `absl::StrCat(getenv(name))` once we build with the
135
+ // fix for https://github.com/abseil/abseil-cpp/issues/1167.
136
+ std::string load_library_override;
134
137
const char * env_value = getenv (" TPU_LOAD_LIBRARY" );
135
- if (!env_value) {
136
- return errors::FailedPrecondition (
137
- " TPU_LOAD_LIBRARY environment variable not defined" );
138
+ if (env_value != nullptr ) {
139
+ load_library_override = std::string (env_value);
138
140
}
139
141
140
- std::string load_library_override = absl::StrCat (env_value);
141
-
142
142
if (load_library_override == " 1" ) {
143
143
return Status::OK ();
144
144
} else if (load_library_override == " 0" ) {
You can’t perform that action at this time.
0 commit comments