Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/ruy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorT.J. Alumbaugh <talumbau@google.com>2020-11-03 20:11:20 +0300
committerCopybara-Service <copybara-worker@google.com>2020-11-03 20:11:50 +0300
commit7a6a38ea182161d509f4044e8ec713f05a68560c (patch)
tree6ebda0e0b8ac76916f54c6c472cd4c510fccd43b
parentd79362c24fd70eab3196672273dbfd8f0dd6124c (diff)
Enforce x86 bit exactness
PiperOrigin-RevId: 340457081
-rw-r--r--ruy/test.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/ruy/test.h b/ruy/test.h
index 15e8bff..ed220c2 100644
--- a/ruy/test.h
+++ b/ruy/test.h
@@ -1401,15 +1401,15 @@ bool Agree(ExternalPath external_path1, const Matrix<Scalar>& matrix1,
// 1 from using different rounding in right shifts, so the tolerance on
// the difference may have to be as large as 2.
tolerated_max_diff = 2;
- } else if (RUY_PLATFORM_ARM) {
- // All our code paths on ARM, including SIMD paths, are bit-exact
+ } else if (RUY_PLATFORM_ARM || RUY_PLATFORM_X86) {
+ // All our code paths on ARM and x86, including SIMD paths, are bit-exact
// with the reference code (by design of the reference code).
tolerated_max_diff = 0;
} else {
- // In this case, we are comparing ruy paths only, but outside of ARM.
- // At the moment, it so happens that ruy's x86 SIMD code paths only have
- // a difference of +/- 1, so we control that, but that is OK to relax as
- // needed on x86 or any other architecture.
+ // In this case, we are comparing ruy paths only, but outside of ARM or
+ // x86. At the moment, it so happens that ruy's x86 SIMD code paths are
+ // bit exact with reference, but we allow for some tolerance on other
+ // architectures.
tolerated_max_diff = 1;
}