From 8b90d603a9359af361fc4dad7883f533dd365f32 Mon Sep 17 00:00:00 2001 From: Dhananjay Nakrani Date: Thu, 5 Oct 2017 14:53:21 -0700 Subject: Fix ASAN test. ASAN correctly complains about the overflow on `CT(Eigen::NumTraits::highest())`. This fixes the issue by providing correct CT for half and floats. PiperOrigin-RevId: 171212745 --- tensorflow/core/kernels/random_poisson_op.cc | 17 ----------------- 1 file changed, 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 struct PoissonComputeType { - typedef T ComputeType; -}; - -template <> -struct PoissonComputeType { - typedef float ComputeType; -}; - -template <> -struct PoissonComputeType { - typedef double ComputeType; -}; - -template <> -struct PoissonComputeType { typedef double ComputeType; }; -- cgit v1.2.3