File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,9 @@ TEST(TensorContainsNAN, CPU) {
242
242
243
243
{
244
244
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 ());
246
248
buf[0 ] = 0.0 ;
247
249
buf[1 ].x = 0x7fff ;
248
250
buf[2 ] = 0.0 ;
@@ -266,7 +268,9 @@ TEST(TensorContainsInf, CPU) {
266
268
267
269
{
268
270
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 ());
270
274
buf[0 ] = 1.0 ;
271
275
buf[1 ].x = 0x7c00 ;
272
276
buf[2 ] = 0.0 ;
You can’t perform that action at this time.
0 commit comments