aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/device_name_utils.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-07-26 22:11:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-26 22:15:29 -0700
commitdd1f0cdddbfb3104e390026184474d4374f52642 (patch)
tree6bd1f58a74e4ba771f99e104ce874c0a98a51ffc /tensorflow/core/util/device_name_utils.h
parent631a364cd1ddd822cf4b8712a5388d5ea39ecd7e (diff)
Supports lookup devices by fullname either in the canonical form or the
legacy form. This makes DeviceSet behaves the same as DeviceMgr's FindDevice method. PiperOrigin-RevId: 163300346
Diffstat (limited to 'tensorflow/core/util/device_name_utils.h')
-rw-r--r--tensorflow/core/util/device_name_utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/core/util/device_name_utils.h b/tensorflow/core/util/device_name_utils.h
index 1f32828bae..740aa13fa7 100644
--- a/tensorflow/core/util/device_name_utils.h
+++ b/tensorflow/core/util/device_name_utils.h
@@ -152,6 +152,11 @@ class DeviceNameUtils {
static bool SplitDeviceName(StringPiece name, string* task, string* device);
static string ParsedNameToString(const ParsedName& pn);
+
+ // Returns canonical and legacy full names for the given parsed
+ // device name 'pn'. The returned string names are often useful to
+ // lookup devices from a mapping.
+ static std::vector<string> GetNamesForDeviceMappings(const ParsedName& pn);
};
} // namespace tensorflow