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

Method testRemote

tensorflow/python/framework/config_test.py:564–590  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

562 @test_util.run_gpu_only
563 @reset_eager
564 def testRemote(self):
565 gpus = config.list_logical_devices('GPU')
566 self.assertNotEqual(len(gpus), 0)
567
568 context.ensure_initialized()
569
570 gpus = config.list_logical_devices('GPU')
571 self.assertNotEqual(len(gpus), 0)
572 for gpu in gpus:
573 self.assertIsNotNone(gpu.name)
574
575 context.ensure_initialized()
576
577 job_name = 'test'
578 cluster_def = cluster_pb2.ClusterDef()
579 job_def = cluster_def.job.add()
580 job_def.name = job_name
581 job_def.tasks[0] = 'localhost:0'
582
583 server_def = tensorflow_server_pb2.ServerDef(
584 cluster=cluster_def, job_name=job_name, task_index=0, protocol='grpc')
585
586 context.set_server_def(server_def)
587
588 gpus = config.list_logical_devices('GPU')
589 for gpu in gpus:
590 self.assertIsNotNone(gpu.name)
591
592 @reset_eager
593 def testV1CompatibilityDummyInivisibleDeviceList(self):

Callers

nothing calls this directly

Calls 4

list_logical_devicesMethod · 0.80
ensure_initializedMethod · 0.80
set_server_defMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected