// This test does not apply if there is only one worker.
if size == 1:
return
dtypes = [tf.uint8, tf.int8, tf.uint16, tf.int16,
tf.int32, tf.int64, tf.float16, tf.float32,
tf.float64, tf.bool]
After Change
Test that the broadcast correctly broadcasts 1D, 2D, 3D tensors on GPU.
// Only do this test if there are GPUs available.
if not tf.test.is_gpu_available(cuda_only=True):
self.skipTest(("No GPUs available"))
if os.environ.get("HOROVOD_MIXED_INSTALL"):
// Skip if compiled with CUDA but without HOROVOD_GPU_ALLREDUCE.
self.skipTest("Not compiled with HOROVOD_GPU_ALLREDUCE")
hvd.init()
rank = hvd.rank()
local_rank = hvd.local_rank()
size = hvd.size()
// This test does not apply if there is only one worker.
if size == 1:
self.skipTest("Only one worker available")
dtypes = [tf.uint8, tf.int8, tf.uint16, tf.int16,
tf.int32, tf.int64, tf.float16, tf.float32,
tf.float64, tf.bool]