Small update to prng_test for more consistent results.

PiperOrigin-RevId: 337621642
Change-Id: If88b7e94754be4479c125235ce3ac5009bdcd62a
This commit is contained in:
Dimitris Vardoulakis 2020-10-16 20:32:56 -07:00 committed by TensorFlower Gardener
parent ae4794f515
commit 8876961414

View File

@ -122,7 +122,7 @@ XLA_TEST_F(PrngTest, DISABLED_ON_INTERPRETER(DISABLED_ON_GPU(
bfloat16 interval = static_cast<bfloat16>(0.25); bfloat16 interval = static_cast<bfloat16>(0.25);
std::vector<int32> counts(static_cast<int64>((high - low) / interval), 0); std::vector<int32> counts(static_cast<int64>((high - low) / interval), 0);
constexpr int64 count = 100; constexpr int64 count = 1000;
for (int64 seed = 0; seed < count; ++seed) { for (int64 seed = 0; seed < count; ++seed) {
auto result = UniformTest<bfloat16>(low, high, {}, /*seed=*/seed); auto result = UniformTest<bfloat16>(low, high, {}, /*seed=*/seed);
result.EachCell<bfloat16>([&](absl::Span<const int64>, bfloat16 value) { result.EachCell<bfloat16>([&](absl::Span<const int64>, bfloat16 value) {