Exemple #1
0
 def testNoStrategyEagerCpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='off', num_gpus=0)
     self._run(strategy, tf_function=False)
Exemple #2
0
 def testEagerCpu(self):
     print('TF 2.0 enable:{}'.format(tf2.enabled()))
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='default', num_gpus=0)
     self._run(strategy, tf_function=False)
Exemple #3
0
 def testNoStrategyCpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='off', num_gpus=0)
     self._run(strategy)
Exemple #4
0
 def benchmark_dqn_8_gpu_xla(self):
     utils.set_session_config(enable_xla=True)
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='default', num_gpus=8)
     self._run(strategy, batch_size=64 * 8)
Exemple #5
0
 def testCpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='default', num_gpus=0)
     self._run(strategy)
Exemple #6
0
 def benchmark_dqn_mirrored_1_gpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='mirrored', num_gpus=1)
     self._run(strategy)
Exemple #7
0
 def benchmark_dqn_eagerly_1_gpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='default', num_gpus=1)
     self._run(strategy, tf_function=False)
Exemple #8
0
 def benchmark_dqn_8_gpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='default', num_gpus=8)
     self._run(strategy, batch_size=64 * 8)
Exemple #9
0
 def benchmark_dqn_1_gpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='default', num_gpus=1)
     self._run(strategy)
Exemple #10
0
 def benchmark_dqn_no_dist_strat_1_gpu_xla(self):
     utils.set_session_config(enable_xla=True)
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='off', num_gpus=1)
     self._run(strategy)
Exemple #11
0
 def benchmark_dqn_no_dist_strat_1_gpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='off', num_gpus=1)
     self._run(strategy)
Exemple #12
0
 def benchmark_dqn_no_dist_strat_eagerly_cpu(self):
     strategy = distribution_strategy_utils.get_distribution_strategy(
         distribution_strategy='off', num_gpus=0)
     self._run(strategy, tf_function=False)