Commit 39a5fe56 authored by Pankaj Kanwar's avatar Pankaj Kanwar Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 333119766
parent 4e50660b
...@@ -908,6 +908,17 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark): ...@@ -908,6 +908,17 @@ class Resnet50KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
FLAGS.batch_size = 128 * 8 # 8 GPUs FLAGS.batch_size = 128 * 8 # 8 GPUs
self._run_and_report_benchmark() self._run_and_report_benchmark()
def benchmark_8_gpu_fp32_no_tf32(self):
"""Test Keras model with 8 GPUs.Runs in FP32 by disabling TF32 execution."""
self._setup()
tf.config.experimental.enable_tensor_float_32_execution(False)
FLAGS.num_gpus = 8
FLAGS.enable_eager = True
FLAGS.distribution_strategy = 'mirrored'
FLAGS.model_dir = self._get_model_dir('benchmark_8_gpu_fp32_no_tf32')
FLAGS.batch_size = 128 * 8 # 8 GPUs
self._run_and_report_benchmark()
def benchmark_8_gpu_amp(self): def benchmark_8_gpu_amp(self):
"""Test Keras model with 8 GPUs with automatic mixed precision.""" """Test Keras model with 8 GPUs with automatic mixed precision."""
self._setup() self._setup()
......
...@@ -313,6 +313,16 @@ class Resnet50CtlBenchmarkBase(CtlBenchmark): ...@@ -313,6 +313,16 @@ class Resnet50CtlBenchmarkBase(CtlBenchmark):
FLAGS.batch_size = 128 * 8 # 8 GPUs FLAGS.batch_size = 128 * 8 # 8 GPUs
self._run_and_report_benchmark() self._run_and_report_benchmark()
def benchmark_8_gpu_fp32_no_tf32(self):
"""Test Keras model with 8 GPUs.Runs in FP32 by disabling TF32 execution."""
self._setup()
tf.config.experimental.enable_tensor_float_32_execution(False)
FLAGS.num_gpus = 8
FLAGS.distribution_strategy = 'mirrored'
FLAGS.model_dir = self._get_model_dir('benchmark_8_gpu_fp32_no_tf32')
FLAGS.batch_size = 128 * 8 # 8 GPUs
self._run_and_report_benchmark()
def benchmark_8_gpu_fp16(self): def benchmark_8_gpu_fp16(self):
"""Test Keras model with 8 GPUs with tf.keras mixed precision.""" """Test Keras model with 8 GPUs with tf.keras mixed precision."""
self._setup() self._setup()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment