aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/dso_loader.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-02-01 18:13:33 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-02-01 18:33:19 -0800
commitd1ba01f81d8fa1d0171ba9ce871599063d5c7eb9 (patch)
treecd28fd2d32712c59f8452ede903cd592e0dc95bd /tensorflow/stream_executor/dso_loader.cc
parentffc667757c6c328e48d80c14f97e32cf6a9d0f53 (diff)
Merge changes from github.
Change: 146316196
Diffstat (limited to 'tensorflow/stream_executor/dso_loader.cc')
-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
}