MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testMultiCpuPlacement

Method testMultiCpuPlacement

tensorflow/python/eager/core_test.py:383–388  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

381 del ctx
382
383 def testMultiCpuPlacement(self):
384 with ops.device('cpu:1'):
385 x = constant_op.constant(1.0)
386 y = array_ops.identity(x)
387 self.assertEqual(x.device, '/job:localhost/replica:0/task:0/device:CPU:1')
388 self.assertEqual(y.device, '/job:localhost/replica:0/task:0/device:CPU:0')
389
390 @test_util.run_gpu_only
391 def testShouldCopy(self):

Callers

nothing calls this directly

Calls 3

deviceMethod · 0.45
constantMethod · 0.45
identityMethod · 0.45

Tested by

no test coverage detected