Move to cached_session() if the session is create more than once per test. Move to session() otherwise.
self.test_session() has been deprecated in 9962eb5e84 as its name confuses readers of the test. Moving to session() instead which slightly changes the semantic of the function:
* the session is not cached anymore (a new session is created).
* the session is closed when exiting the "with" scope.
PiperOrigin-RevId: 217421579
* Enable denormal test in open source
They seem to work fine; not sure what changed since ages ago.
* Fix denormal flushing on Windows
Since Windows doesn't define __SSE3__, we use EIGEN_VECTORIZE_SSE3 and
set that manually in cmake.
The test is breaking for OSS, and I can't look at it in detail right now. The
fact that it breaks is harmless (it's equivalent to yesterday), so disable the
test in the open source case for the moment.
Change: 115128265
Two different mechanisms are required. On the CPU, we push and pop the
appropriate processor flags in the executor (for the master thread) *and*
in each threadpool thread, since the processor flags are thread local. On
the GPU, we set -ftz=true for both nvcc and gcudacc so that kernels that we
build flush denormals to zero using instruction flags.
Caveat: On GPU, only single precision denormals are flushed to zero; double
precision is unchanged.
Change: 115114845