fix build issue test=develop

revert-15207-remove_op_handle_lock_and_fix_var
peizhilin 6 years ago
parent 25523bb8e6
commit fd4f4d0e5f

@ -15,7 +15,7 @@
#include <gtest/gtest.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <random>
#define PADDLE_CUDA_FP16

@ -271,11 +271,13 @@ TEST(float16, isinf) {
float16 b = float16(INFINITY);
// underflow to 0
float16 native_a(5e-40f);
// overflow to inf
float16 native_b(5e40f);
EXPECT_EQ(std::isinf(a), true);
EXPECT_EQ(std::isinf(b), true);
#ifndef _WIN32
// overflow to inf
float16 native_b(5e40f);
EXPECT_EQ(std::isinf(native_b), true);
#endif
EXPECT_EQ(native_a, float16(0));
}

Loading…
Cancel
Save