diff --git a/onnxruntime/core/providers/cuda/math/clip.cc b/onnxruntime/core/providers/cuda/math/clip.cc index ea986798659e7..cceb489bcef00 100644 --- a/onnxruntime/core/providers/cuda/math/clip.cc +++ b/onnxruntime/core/providers/cuda/math/clip.cc @@ -59,33 +59,11 @@ Status Clip_6::ComputeInternal(OpKernelContext* ctx) const { return Status::OK(); } -namespace clip_internal { -template -struct LowMax { - constexpr static T low() { - return std::numeric_limits::lowest(); - } - constexpr static T max() { - return std::numeric_limits::max(); - } -}; - -template <> -struct LowMax { - static MLFloat16 low() { - return MLFloat16::FromBits(math::floatToHalf(std::numeric_limits::lowest())); - } - static MLFloat16 max() { - return MLFloat16::FromBits(math::floatToHalf(std::numeric_limits::max())); - } -}; -} // namespace clip_internal - template struct Clip::ComputeImpl { void operator()(cudaStream_t stream, const Tensor* X, const Tensor* min, const Tensor* max, Tensor* Y) const { - auto min_default = clip_internal::LowMax::low(); - auto max_default = clip_internal::LowMax::max(); + auto min_default = std::numeric_limits::lowest(); + auto max_default = std::numeric_limits::max(); const T* min_data = nullptr; const T* max_data = nullptr;