diff --git a/tensorflow/lite/kernels/internal/BUILD b/tensorflow/lite/kernels/internal/BUILD index 885f650dd53..74a11a72ef9 100644 --- a/tensorflow/lite/kernels/internal/BUILD +++ b/tensorflow/lite/kernels/internal/BUILD @@ -641,6 +641,7 @@ cc_test( srcs = [ "softmax_quantized_test.cc", ], + shard_count = 3, deps = [ ":optimized_base", ":quantization_util", @@ -657,6 +658,7 @@ cc_test( srcs = [ "logsoftmax_quantized_test.cc", ], + shard_count = 3, tags = [ # TODO(b/122242739): Reenable after fixing the flakiness? "nomac", diff --git a/tensorflow/lite/kernels/internal/logsoftmax_quantized_test.cc b/tensorflow/lite/kernels/internal/logsoftmax_quantized_test.cc index 889a726f3a9..945300dad16 100644 --- a/tensorflow/lite/kernels/internal/logsoftmax_quantized_test.cc +++ b/tensorflow/lite/kernels/internal/logsoftmax_quantized_test.cc @@ -225,7 +225,7 @@ bool TryOneSkyscraperLogSoftmax(bool small_depth) { } TEST(TestQuantizedLogSoftmax, UniformLogSoftmaxTests) { - const int kTestsToRun = 1000; + const int kTestsToRun = 100; for (int i = 0; i < kTestsToRun; i++) { while (!TryOneUniformLogSoftmax()) { } @@ -233,7 +233,7 @@ TEST(TestQuantizedLogSoftmax, UniformLogSoftmaxTests) { } TEST(TestQuantizedLogSoftmax, SkyscraperLogSoftmaxTests) { - const int kTestsToRun = 1000; + const int kTestsToRun = 100; for (int i = 0; i < kTestsToRun; i++) { while (!TryOneSkyscraperLogSoftmax(false)) { } @@ -241,7 +241,7 @@ TEST(TestQuantizedLogSoftmax, SkyscraperLogSoftmaxTests) { } TEST(TestQuantizedLogSoftmax, SmallSkyscraperLogSoftmaxTests) { - const int kTestsToRun = 1000; + const int kTestsToRun = 100; for (int i = 0; i < kTestsToRun; i++) { while (!TryOneSkyscraperLogSoftmax(true)) { } diff --git a/tensorflow/lite/kernels/internal/softmax_quantized_test.cc b/tensorflow/lite/kernels/internal/softmax_quantized_test.cc index 743ce0355c9..8ac62d9af78 100644 --- a/tensorflow/lite/kernels/internal/softmax_quantized_test.cc +++ b/tensorflow/lite/kernels/internal/softmax_quantized_test.cc @@ -210,7 +210,7 @@ bool TryOneSkyscraperSoftmax(bool small_depth) { } TEST(TestQuantizedSoftmax, UniformSoftmaxTests) { - const int kTestsToRun = 1000; + const int kTestsToRun = 100; for (int i = 0; i < kTestsToRun; i++) { while (!TryOneUniformSoftmax()) { } @@ -218,7 +218,7 @@ TEST(TestQuantizedSoftmax, UniformSoftmaxTests) { } TEST(TestQuantizedSoftmax, SkyscraperSoftmaxTests) { - const int kTestsToRun = 1000; + const int kTestsToRun = 100; for (int i = 0; i < kTestsToRun; i++) { while (!TryOneSkyscraperSoftmax(false)) { } @@ -226,7 +226,7 @@ TEST(TestQuantizedSoftmax, SkyscraperSoftmaxTests) { } TEST(TestQuantizedSoftmax, SmallSkyscraperSoftmaxTests) { - const int kTestsToRun = 1000; + const int kTestsToRun = 100; for (int i = 0; i < kTestsToRun; i++) { while (!TryOneSkyscraperSoftmax(true)) { }