aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/dso_loader.cc
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2017-02-17 17:05:49 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-02-17 17:23:48 -0800
commit93a975e114ee1c35f01ed3bdd47170e6f7129014 (patch)
treee34255aff698fe6a4a586e7940337fd278947f58 /tensorflow/stream_executor/dso_loader.cc
parenteb9624017a0040e805fda622a5f9ec6681e24246 (diff)
Merge changes from github.
Change: 147897309
Diffstat (limited to 'tensorflow/stream_executor/dso_loader.cc')
-rw-r--r--tensorflow/stream_executor/dso_loader.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/dso_loader.cc b/tensorflow/stream_executor/dso_loader.cc
index db1f8d9ba9..5210a81092 100644
--- a/tensorflow/stream_executor/dso_loader.cc
+++ b/tensorflow/stream_executor/dso_loader.cc
@@ -123,9 +123,13 @@ static mutex& GetRpathMutex() {
port::Status s =
port::Env::Default()->LoadLibrary(path_string.c_str(), dso_handle);
if (!s.ok()) {
+#if !defined(PLATFORM_WINDOWS)
+ char* ld_library_path = getenv("LD_LIBRARY_PATH");
+#endif
LOG(INFO) << "Couldn't open CUDA library " << path
#if !defined(PLATFORM_WINDOWS)
- << ". LD_LIBRARY_PATH: " << getenv("LD_LIBRARY_PATH")
+ << ". LD_LIBRARY_PATH: "
+ << (ld_library_path != nullptr ? ld_library_path : "")
#endif
;
return port::Status(port::error::FAILED_PRECONDITION,