aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/stream_executor')
-rw-r--r--tensorflow/stream_executor/dso_loader.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/dso_loader.cc b/tensorflow/stream_executor/dso_loader.cc
index 9aa50e976f..db1f8d9ba9 100644
--- a/tensorflow/stream_executor/dso_loader.cc
+++ b/tensorflow/stream_executor/dso_loader.cc
@@ -78,10 +78,20 @@ string GetCudnnVersion() { return TF_CUDNN_VERSION; }
GetCudaDriverLibraryPath()),
dso_handle);
#else
- return GetDsoHandle(
+ port::Status status = GetDsoHandle(
FindDsoPath(port::Env::Default()->FormatLibraryFileName("cuda", "1"),
GetCudaDriverLibraryPath()),
dso_handle);
+#if defined(__APPLE__)
+ // On Mac OS X, CUDA sometimes installs libcuda.dylib instead of
+ // libcuda.1.dylib.
+ return status.ok() ? status : GetDsoHandle(
+ FindDsoPath(port::Env::Default()->FormatLibraryFileName("cuda", ""),
+ GetCudaDriverLibraryPath()),
+ dso_handle);
+#else
+ return status;
+#endif
#endif
}