Exemplo n.º 1
0
 def setUp(self):
   # Note that test case fixtures are executed in both the main process and
   # worker processes.
   super().setUp()
   if combinations.in_main_process():
     combinations.env().tf_data_service_dispatcher = "localhost"
Exemplo n.º 2
0
 def testNotShareGPU(self):
   self.assertLen(context.context().list_physical_devices("GPU"),
                  combinations.env().total_phsyical_gpus / 2)
Exemplo n.º 3
0
 def testUpdateEnvInWorker(self):
   with self.assertRaises(ValueError):
     combinations.env().tf_data_service_dispatcher = "localhost"
Exemplo n.º 4
0
 def setUp(self):
   super().setUp()
   if combinations.in_main_process():
     num_gpus = combinations.env().total_phsyical_gpus
     if num_gpus != 2 and num_gpus != 4:
       self.skipTest("requires 2 or 4 GPUs")
Exemplo n.º 5
0
 def testTfDataServiceDispatcher(self):
   self.assertEqual(combinations.env().tf_data_service_dispatcher, "localhost")