diff --git a/tensorflow/core/framework/tensor_testutil.cc b/tensorflow/core/framework/tensor_testutil.cc index 1bae7b08d51..cc117ad19ec 100644 --- a/tensorflow/core/framework/tensor_testutil.cc +++ b/tensorflow/core/framework/tensor_testutil.cc @@ -22,7 +22,7 @@ namespace test { template bool IsClose(const T& x, const T& y, double atol, double rtol) { // Need x == y so that infinities are close to themselves - return x == y || fabs(x - y) < atol + rtol * fabs(x); + return x == y || std::abs(x - y) < atol + rtol * std::abs(x); } template