aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-23 16:00:06 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-23 16:00:06 -0700
commit7a570e50ef0a79d52d5762d086954564afce9d61 (patch)
treeeb24d5b2c1ac0cd4008248137a16fc8fd6320cec
parent7168afde5e9c3b05823b939a499c6752d2db10f7 (diff)
Fixed contractions of fp16
-rw-r--r--Eigen/src/Core/arch/CUDA/Half.h2
-rw-r--r--unsupported/test/cxx11_tensor_of_float16_cuda.cu6
2 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h
index 08f6005e4..61131828f 100644
--- a/Eigen/src/Core/arch/CUDA/Half.h
+++ b/Eigen/src/Core/arch/CUDA/Half.h
@@ -63,7 +63,7 @@ static inline EIGEN_DEVICE_FUNC float half_to_float(__half h);
// Class definition.
struct half : public __half {
- EIGEN_DEVICE_FUNC half() : __half(internal::raw_uint16_to_half(0)) {}
+ EIGEN_DEVICE_FUNC half() {}
EIGEN_DEVICE_FUNC half(const __half& h) : __half(h) {}
EIGEN_DEVICE_FUNC half(const half& h) : __half(h) {}
diff --git a/unsupported/test/cxx11_tensor_of_float16_cuda.cu b/unsupported/test/cxx11_tensor_of_float16_cuda.cu
index 29b5637e7..cb917bb37 100644
--- a/unsupported/test/cxx11_tensor_of_float16_cuda.cu
+++ b/unsupported/test/cxx11_tensor_of_float16_cuda.cu
@@ -134,7 +134,7 @@ void test_cuda_elementwise() {
gpu_device.deallocate(d_res_float);
}
-/*
+
void test_cuda_contractions() {
Eigen::CudaStreamDevice stream;
Eigen::GpuDevice gpu_device(&stream);
@@ -181,7 +181,7 @@ void test_cuda_contractions() {
gpu_device.deallocate(d_float2);
gpu_device.deallocate(d_res_half);
gpu_device.deallocate(d_res_float);
-}*/
+}
void test_cuda_reductions() {
@@ -244,7 +244,7 @@ void test_cxx11_tensor_of_float16_cuda()
CALL_SUBTEST_1(test_cuda_conversion());
CALL_SUBTEST_1(test_cuda_unary());
CALL_SUBTEST_1(test_cuda_elementwise());
-// CALL_SUBTEST_2(test_cuda_contractions());
+ CALL_SUBTEST_2(test_cuda_contractions());
CALL_SUBTEST_3(test_cuda_reductions());
}
else {