Skip to content

Commit 1c70600

Browse files
author
Abhinav Arora
committed
Fix compile error
1 parent c08752c commit 1c70600

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

paddle/fluid/framework/tensor_util_test.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ TEST(TensorContainsNAN, CPU) {
242242

243243
{
244244
paddle::framework::Tensor src;
245-
float16* buf = src.mutable_data<float16>({3}, paddle::platform::CPUPlace());
245+
paddle::platform::float16* buf =
246+
src.mutable_data<paddle::platform::float16>(
247+
{3}, paddle::platform::CPUPlace());
246248
buf[0] = 0.0;
247249
buf[1].x = 0x7fff;
248250
buf[2] = 0.0;
@@ -266,7 +268,9 @@ TEST(TensorContainsInf, CPU) {
266268

267269
{
268270
paddle::framework::Tensor src;
269-
float16* buf = src.mutable_data<float16>({3}, paddle::platform::CPUPlace());
271+
paddle::platform::float16* buf =
272+
src.mutable_data<paddle::platform::float16>(
273+
{3}, paddle::platform::CPUPlace());
270274
buf[0] = 1.0;
271275
buf[1].x = 0x7c00;
272276
buf[2] = 0.0;

0 commit comments

Comments
 (0)