diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-02-01 18:13:33 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-01 18:33:19 -0800 |
commit | d1ba01f81d8fa1d0171ba9ce871599063d5c7eb9 (patch) | |
tree | cd28fd2d32712c59f8452ede903cd592e0dc95bd /tensorflow/stream_executor/dso_loader.cc | |
parent | ffc667757c6c328e48d80c14f97e32cf6a9d0f53 (diff) |
Merge changes from github.
Change: 146316196
Diffstat (limited to 'tensorflow/stream_executor/dso_loader.cc')
-rw-r--r-- | tensorflow/stream_executor/dso_loader.cc | 12 |
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 } |