diff options
Diffstat (limited to 'ruy/thread_pool.cc')
-rw-r--r-- | ruy/thread_pool.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ruy/thread_pool.cc b/ruy/thread_pool.cc index 100cfe3..5f22a13 100644 --- a/ruy/thread_pool.cc +++ b/ruy/thread_pool.cc @@ -25,6 +25,7 @@ limitations under the License. #include <thread> // NOLINT(build/c++11) #include "ruy/check_macros.h" +#include "ruy/denormal.h" #include "ruy/trace.h" #include "ruy/wait.h" @@ -113,6 +114,9 @@ class Thread { RUY_TRACE_SCOPE_NAME("Ruy worker thread function"); ChangeState(State::Ready); + // Suppress denormals to avoid computation inefficiency. + ScopedSuppressDenormals suppress_denormals; + // Thread main loop while (true) { RUY_TRACE_SCOPE_NAME("Ruy worker thread loop iteration"); |