diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.cc b/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.cc index eeff5d9e7ed..fd28f055906 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.cc +++ b/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.cc @@ -60,11 +60,6 @@ StatusOr GetDsoHandle(const string& name, const string& version) { auto message = absl::StrCat("Could not load dynamic library '", filename, "'; dlerror: ", status.message()); -#if !defined(PLATFORM_WINDOWS) - if (const char* ld_library_path = getenv("LD_LIBRARY_PATH")) { - message += absl::StrCat("; LD_LIBRARY_PATH: ", ld_library_path); - } -#endif VLOG(1) << message; return Status(absl::StatusCode::kFailedPrecondition, message); } @@ -72,16 +67,6 @@ StatusOr GetDsoHandle(const string& name, const string& version) { namespace DsoLoader { StatusOr GetCudaDriverDsoHandle() { -#if defined(PLATFORM_WINDOWS) - return GetDsoHandle("nvcuda", ""); -#elif defined(__APPLE__) - // On Mac OS X, CUDA sometimes installs libcuda.dylib instead of - // libcuda.1.dylib. - auto handle_or = GetDsoHandle("cuda", ""); - if (handle_or.ok()) { - return handle_or; - } -#endif return GetDsoHandle("cuda", "1"); } @@ -126,19 +111,11 @@ StatusOr GetNcclDsoHandle() { } StatusOr GetNvInferDsoHandle() { -#if defined(PLATFORM_WINDOWS) - return GetDsoHandle("nvinfer", ""); -#else return GetDsoHandle("nvinfer", GetTensorRTVersion()); -#endif } StatusOr GetNvInferPluginDsoHandle() { -#if defined(PLATFORM_WINDOWS) - return GetDsoHandle("nvinfer_plugin", ""); -#else return GetDsoHandle("nvinfer_plugin", GetTensorRTVersion()); -#endif } StatusOr GetRocblasDsoHandle() { return GetDsoHandle("rocblas", ""); }