aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/session_ops_test.py
diff options
context:
space:
mode:
authorGravatar Jonathan Hseu <jhseu@google.com>2016-12-22 15:38:30 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-22 15:48:41 -0800
commitbed8383c27a0a7225e6fc7ff59a2cd6388fb4d09 (patch)
treeb70cfc88f95f318195f8610ffb960e98604348d1 /tensorflow/python/kernel_tests/session_ops_test.py
parent1e5bd8cdd62033d1f7ea928fcbec521bb48bb1f5 (diff)
Merge changes from github.
Change: 142805270
Diffstat (limited to 'tensorflow/python/kernel_tests/session_ops_test.py')
-rw-r--r--tensorflow/python/kernel_tests/session_ops_test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/kernel_tests/session_ops_test.py b/tensorflow/python/kernel_tests/session_ops_test.py
index 5ce9c76818..25d60c5259 100644
--- a/tensorflow/python/kernel_tests/session_ops_test.py
+++ b/tensorflow/python/kernel_tests/session_ops_test.py
@@ -138,7 +138,7 @@ class SessionOpsTest(test.TestCase):
self.assertEqual(500, sess.run(y, feed_dict={f: h.handle}))
# Feed another tensor handle.
- with ops.device("/gpu:0"):
+ with ops.device(test.gpu_device_name()):
a = constant_op.constant(10)
h = session_ops.get_session_handle(a)
h = sess.run(h)
@@ -169,7 +169,7 @@ class SessionOpsTest(test.TestCase):
def testMultiDevices(self):
with self.test_session() as sess:
- with ops.device("/gpu:0"):
+ with ops.device(test.gpu_device_name()):
a = constant_op.constant(1.0)
a_handle = sess.run(session_ops.get_session_handle(a))
with ops.device("/cpu:0"):
@@ -194,7 +194,7 @@ class SessionOpsTest(test.TestCase):
x_handle = sess.run(session_ops.get_session_handle(one))
# addition lives on GPU
- with ops.device("/gpu:0"):
+ with ops.device(test.gpu_device_name()):
add_h1, add_t1 = session_ops.get_session_tensor(one_handle.handle,
dtypes.float32)
add_h2, add_t2 = session_ops.get_session_tensor(x_handle.handle,