[XLA/GPU] Disable std::pow(1, nan) for exhaustive testing.

PiperOrigin-RevId: 327479427
Change-Id: I325b5f29e32fbaeb44de0013da32bce1e41fcecb
diff --git a/tensorflow/compiler/xla/tests/exhaustive_binary_16_bit_test.cc b/tensorflow/compiler/xla/tests/exhaustive_binary_16_bit_test.cc
index 09c91d4..dca8e31 100644
--- a/tensorflow/compiler/xla/tests/exhaustive_binary_16_bit_test.cc
+++ b/tensorflow/compiler/xla/tests/exhaustive_binary_16_bit_test.cc
@@ -123,8 +123,16 @@
 })
 
 // TODO(bixia): Pow fails with bfloat16 on CPU.
-BINARY_TEST_16BIT(DISABLED_ON_CPU(Pow),
-                  { Run(AddEmptyBroadcastDimension(Pow), std::pow); })
+BINARY_TEST_16BIT(DISABLED_ON_CPU(Pow), {
+  // See b/162664705.
+  known_incorrect_fn_ = [](int64 val) {
+    Eigen::bfloat16 f;
+    uint16_t val_16 = val;
+    memcpy(&f, &val_16, 2);
+    return std::isnan(f);
+  };
+  Run(AddEmptyBroadcastDimension(Pow), std::pow);
+})
 
 // TODO(bixia): Atan2 fails with bfloat16 on CPU.
 BINARY_TEST_16BIT(DISABLED_ON_CPU(Atan2),