From 3a83826bd12c9458290132d50829a0c704a02ad0 Mon Sep 17 00:00:00 2001 From: Alexandre Passos Date: Wed, 20 Feb 2019 16:44:40 -0800 Subject: [PATCH] Expose tf.config.experimental_list_devices PiperOrigin-RevId: 234895637 --- tensorflow/python/eager/context.py | 1 + tensorflow/tools/api/golden/v1/tensorflow.config.pbtxt | 4 ++++ tensorflow/tools/api/golden/v2/tensorflow.config.pbtxt | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/tensorflow/python/eager/context.py b/tensorflow/python/eager/context.py index 15ab3a390d8..4364b492582 100644 --- a/tensorflow/python/eager/context.py +++ b/tensorflow/python/eager/context.py @@ -921,6 +921,7 @@ def device(name): return context().device(name) +@tf_export("config.experimental_list_devices") def list_devices(): """List the names of the available devices. diff --git a/tensorflow/tools/api/golden/v1/tensorflow.config.pbtxt b/tensorflow/tools/api/golden/v1/tensorflow.config.pbtxt index 5663e64db66..09076a83026 100644 --- a/tensorflow/tools/api/golden/v1/tensorflow.config.pbtxt +++ b/tensorflow/tools/api/golden/v1/tensorflow.config.pbtxt @@ -4,6 +4,10 @@ tf_module { name: "experimental_connect_to_host" argspec: "args=[\'remote_host\', \'job_name\'], varargs=None, keywords=None, defaults=[\'None\', \'worker\'], " } + member_method { + name: "experimental_list_devices" + argspec: "args=[], varargs=None, keywords=None, defaults=None" + } member_method { name: "experimental_run_functions_eagerly" argspec: "args=[\'run_eagerly\'], varargs=None, keywords=None, defaults=None" diff --git a/tensorflow/tools/api/golden/v2/tensorflow.config.pbtxt b/tensorflow/tools/api/golden/v2/tensorflow.config.pbtxt index 5663e64db66..09076a83026 100644 --- a/tensorflow/tools/api/golden/v2/tensorflow.config.pbtxt +++ b/tensorflow/tools/api/golden/v2/tensorflow.config.pbtxt @@ -4,6 +4,10 @@ tf_module { name: "experimental_connect_to_host" argspec: "args=[\'remote_host\', \'job_name\'], varargs=None, keywords=None, defaults=[\'None\', \'worker\'], " } + member_method { + name: "experimental_list_devices" + argspec: "args=[], varargs=None, keywords=None, defaults=None" + } member_method { name: "experimental_run_functions_eagerly" argspec: "args=[\'run_eagerly\'], varargs=None, keywords=None, defaults=None"