Change TPU_LOAD_LIBRARY to accept 1/0 instead of true/false.

PiperOrigin-RevId: 358300004
Change-Id: I93059c5e8fa32463be8a7e598009219a450b498e
This commit is contained in:
Yi Situ 2021-02-18 17:20:20 -08:00 committed by TensorFlower Gardener
parent 624a4a0938
commit 2c995bda2b

View File

@ -39,11 +39,11 @@ bool TryAcquireTpuLock() {
if (!attempted_file_open) { if (!attempted_file_open) {
std::string load_library_override = std::string load_library_override =
absl::StringCat(getenv("TPU_LOAD_LIBRARY")); absl::StrCat(getenv("TPU_LOAD_LIBRARY"));
if (load_library_override == "true") { if (load_library_override == "1") {
return true; return true;
} else if (load_library_override == "false") { } else if (load_library_override == "0") {
return false; return false;
} }
should_load_library = true; should_load_library = true;