Commit 47c069d1 authored by Theo Steininger's avatar Theo Steininger

Fixed a bug in test-data generator.

parent 1db0f4c5
Pipeline #8812 failed with stage
in 3 minutes and 42 seconds
......@@ -136,9 +136,9 @@ def generate_data(global_shape, dtype, distribution_strategy,
local_shape[0] = 0
else:
local_shape[0] = global_shape[0] // np.ceil(size / 2.)
number_of_extras = global_shape[
0] - local_shape[0] * np.ceil(size / 2.)
if number_of_extras > rank:
number_of_extras = (global_shape[0] -
local_shape[0] * np.ceil(size / 2.))
if number_of_extras > rank//2:
local_shape[0] += 1
local_shape = tuple(local_shape)
......
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