aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/device_name_utils.h
diff options
context:
space:
mode:
authorGravatar Brennan Saeta <saeta@google.com>2017-06-22 15:27:53 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-22 15:31:21 -0700
commited1d7fdb5225e2935f05b40c8ef3cfe7261cc37e (patch)
treebd93377249209ea78aabf98579ff7fac703da389 /tensorflow/core/util/device_name_utils.h
parentf4945e74d6da0e816d992597e42de088e790df87 (diff)
Register devices under their legacy names
Because some higher level APIs continue to use the legacy name format, when using ClusterSpec propagation, we need to ensure that we register the devices under their legacy names as well as their canonical names. PiperOrigin-RevId: 159885777
Diffstat (limited to 'tensorflow/core/util/device_name_utils.h')
-rw-r--r--tensorflow/core/util/device_name_utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/util/device_name_utils.h b/tensorflow/core/util/device_name_utils.h
index 4228af8b8c..1f32828bae 100644
--- a/tensorflow/core/util/device_name_utils.h
+++ b/tensorflow/core/util/device_name_utils.h
@@ -48,6 +48,9 @@ class DeviceNameUtils {
// Returns a fully qualified device name given the parameters.
static string FullName(const string& job, int replica, int task,
const string& type, int id);
+ // Returns a fully qualified device name given the parameters in legacy style.
+ static string LegacyName(const string& job, int replica, int task,
+ const string& type, int id);
struct ParsedName {
void Clear() {