message: [JAX] Flush denormals and set rounding mode to FE_TONEAREST.
  Introduce a new PJRT CPU backend based on TFRT (9).
diff: @@ -43,6 +43,8 @@ limitations under the License.
  #include "tensorflow/compiler/xla/shape.h"
  #include "tensorflow/compiler/xla/statusor.h"
  #include "tensorflow/compiler/xla/xla_data.pb.h"
  +#include "tensorflow/core/platform/denormal.h"
  +#include "tensorflow/core/platform/setround.h"
  #include "tensorflow/core/profiler/lib/connected_traceme.h"
  #include "tfrt/host_context/async_dispatch.h" // from @tf_runtime
  #include "tfrt/host_context/async_value_ref.h" // from @tf_runtime
  @@ -1431,6 +1433,13 @@ TfrtCpuExecutable::ExecuteHelper(
  if (input_deps.empty()) {
  // Synchronously call generated function.
  execute_event = GetOrCreateReadyEvent(host_context);
  +
  + // Set denormal and rounding behavior to match the default TF
  + // ThreadPool behavior.
  + tensorflow::port::ScopedFlushDenormal flush;
  + tensorflow::port::ScopedSetRound round(FE_TONEAREST);
  +
  + // Call generated function.
  cpu_executable->compute_function()(result_buffer, &run_options, nullptr,
  buffer_pointers.data(), nullptr);
  } else {
  @@ -1467,6 +1476,11 @@ TfrtCpuExecutable::ExecuteHelper(
  }
  }
  + // Set denormal and rounding behavior to match the default TF
  + // ThreadPool behavior.
  + tensorflow::port::ScopedFlushDenormal flush;
  + tensorflow::port::ScopedSetRound round(FE_TONEAREST);
  +
  // Call generated function.
  cpu_executable->compute_function()(result_buffer, &run_options,
  nullptr, buffer_pointers.data(),
  