From a47d18e3f3c016957b1dacf6052d07aa606b7022 Mon Sep 17 00:00:00 2001 From: Christian Sigg Date: Sat, 7 Oct 2023 01:42:02 -0700 Subject: [PATCH] [TSL] Remove some Windows- and Darwinn-specific GPU code. PiperOrigin-RevId: 571535260 --- .../tsl/tsl/platform/default/dso_loader.cc | 23 ------------------- 1 file changed, 23 deletions(-) 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 eeff5d9e7ed94d..fd28f05590683c 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", ""); }