From b6a517c47dd5280f25bf23e25160f95714223ff0 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 11 May 2016 21:26:48 -0700 Subject: Added the ability to load fp16 using the texture path. Improved the performance of some reductions on fp16 --- unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h b/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h index ae4ce3c90..31b361c83 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h @@ -129,6 +129,10 @@ template <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double loadConstant(const double* address) { return __ldg(address); } +template <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +Eigen::half loadConstant(const Eigen::half* address) { + return Eigen::half(internal::raw_uint16_to_half(__ldg(&address->x))); +} #endif } -- cgit v1.2.3