diff --git a/paddle/fluid/platform/CMakeLists.txt b/paddle/fluid/platform/CMakeLists.txt index e9929dfe0bcc2ba9234641b96de3dc44c495d1cb..c49989db3d525fbc33cfd64db1cc9db1f241f253 100644 --- a/paddle/fluid/platform/CMakeLists.txt +++ b/paddle/fluid/platform/CMakeLists.txt @@ -124,10 +124,7 @@ else() cc_library(device_memory_aligment SRCS device_memory_aligment.cc DEPS cpu_info place) endif() -# TODO: Fix this unittest failed on Windows -if(NOT WIN32) - cc_test(profiler_test SRCS profiler_test.cc DEPS profiler) -endif(NOT WIN32) +cc_test(profiler_test SRCS profiler_test.cc DEPS profiler) nv_test(float16_gpu_test SRCS float16_test.cu DEPS lod_tensor) cc_test(float16_test SRCS float16_test.cc DEPS lod_tensor) diff --git a/paddle/fluid/platform/profiler_test.cc b/paddle/fluid/platform/profiler_test.cc index d8bfa5445cc53566ac72fb5600706478e97c5a76..4d340a06342822ffd44bac7ebc6114424d9bab60 100644 --- a/paddle/fluid/platform/profiler_test.cc +++ b/paddle/fluid/platform/profiler_test.cc @@ -28,6 +28,9 @@ TEST(Event, CpuElapsedTime) { while (counter != 1000) { counter++; } +#ifdef _WIN32 + Sleep(1); +#endif Event stop_event(EventType::kPopRange, "test", 0); EXPECT_GT(start_event.CpuElapsedMs(stop_event), 0); }