aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/local_session.cc
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2015-11-11 11:52:11 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2015-11-11 11:52:11 -0800
commit3961abed9560cd852fff4add393b451483bbc3af (patch)
tree57b7d3180ff4db6f6c8c5897dec252b1c2b6380d /tensorflow/core/common_runtime/local_session.cc
parent9a00a61aa4ae59339b14d29650a591732901c264 (diff)
Upstream a number of changes to git.
Changes: - Updates to README / os_setup for common installation issues by ebrevdo, vrv, wicke, anelia, dga - Add a test for backwards compatibility checks by Josh - Simplifications to tiling/padding of scalars by bsteiner - Improve listing of devices when no devices are known by Matthieu Base CL: 107607137
Diffstat (limited to 'tensorflow/core/common_runtime/local_session.cc')
-rw-r--r--tensorflow/core/common_runtime/local_session.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/tensorflow/core/common_runtime/local_session.cc b/tensorflow/core/common_runtime/local_session.cc
index ab6993b8a2..4c41e5b3b3 100644
--- a/tensorflow/core/common_runtime/local_session.cc
+++ b/tensorflow/core/common_runtime/local_session.cc
@@ -103,7 +103,11 @@ LocalSession::LocalSession(const SessionOptions& options,
int devices_added = 0;
if (options.config.log_device_placement()) {
const string mapping_str = device_mgr_->DeviceMappingString();
- printf("Device mapping:\n%s", mapping_str.c_str());
+ if (mapping_str.empty()) {
+ printf("Device mapping: no known devices.\n");
+ } else {
+ printf("Device mapping:\n%s", mapping_str.c_str());
+ }
LOG(INFO) << "Device mapping:\n" << mapping_str;
}
for (auto d : device_mgr_->ListDevices()) {