diff options
author | 2017-10-05 14:53:21 -0700 | |
---|---|---|
committer | 2017-10-05 14:57:05 -0700 | |
commit | 8b90d603a9359af361fc4dad7883f533dd365f32 (patch) | |
tree | 830b495a8518eccf8815d83407b048ae57bb002f | |
parent | 2198b8cfe8acb5af7bb5a1dac54c18ff72c98002 (diff) |
Fix ASAN test.
ASAN correctly complains about the overflow on `CT(Eigen::NumTraits<U>::highest())`. This fixes the issue by providing correct CT for half and floats.
PiperOrigin-RevId: 171212745
-rw-r--r-- | tensorflow/core/kernels/random_poisson_op.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/tensorflow/core/kernels/random_poisson_op.cc b/tensorflow/core/kernels/random_poisson_op.cc index 3f635dbbaf..bf1d83ec75 100644 --- a/tensorflow/core/kernels/random_poisson_op.cc +++ b/tensorflow/core/kernels/random_poisson_op.cc @@ -58,25 +58,8 @@ static constexpr int kReservedSamplesPerOutput = 256; typedef Eigen::ThreadPoolDevice CPUDevice; -// We will compute half-precision Poisson samples with float precision -// intermediate calculations. template <typename T> struct PoissonComputeType { - typedef T ComputeType; -}; - -template <> -struct PoissonComputeType<Eigen::half> { - typedef float ComputeType; -}; - -template <> -struct PoissonComputeType<int32> { - typedef double ComputeType; -}; - -template <> -struct PoissonComputeType<int64> { typedef double ComputeType; }; |