From 1c70600d09c48cfa2d14c7433d28c89f8e700632 Mon Sep 17 00:00:00 2001 From: Abhinav Arora Date: Fri, 20 Apr 2018 18:40:31 -0700 Subject: [PATCH] Fix compile error --- paddle/fluid/framework/tensor_util_test.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/tensor_util_test.cc b/paddle/fluid/framework/tensor_util_test.cc index 994d88532bc..6e10885890c 100644 --- a/paddle/fluid/framework/tensor_util_test.cc +++ b/paddle/fluid/framework/tensor_util_test.cc @@ -242,7 +242,9 @@ TEST(TensorContainsNAN, CPU) { { paddle::framework::Tensor src; - float16* buf = src.mutable_data({3}, paddle::platform::CPUPlace()); + paddle::platform::float16* buf = + src.mutable_data( + {3}, paddle::platform::CPUPlace()); buf[0] = 0.0; buf[1].x = 0x7fff; buf[2] = 0.0; @@ -266,7 +268,9 @@ TEST(TensorContainsInf, CPU) { { paddle::framework::Tensor src; - float16* buf = src.mutable_data({3}, paddle::platform::CPUPlace()); + paddle::platform::float16* buf = + src.mutable_data( + {3}, paddle::platform::CPUPlace()); buf[0] = 1.0; buf[1].x = 0x7c00; buf[2] = 0.0; -- GitLab