未验证 提交 2996315f 编写于 作者: T Tao Luo 提交者: GitHub

fix profiler_test on win32 (#25073)

* remove disable profiler_test on win32

* add log

* enlarge the elapsed time

* Revert "add log"

test=develop
上级 9ba585f5
...@@ -124,10 +124,7 @@ else() ...@@ -124,10 +124,7 @@ else()
cc_library(device_memory_aligment SRCS device_memory_aligment.cc DEPS cpu_info place) cc_library(device_memory_aligment SRCS device_memory_aligment.cc DEPS cpu_info place)
endif() endif()
# TODO: Fix this unittest failed on Windows cc_test(profiler_test SRCS profiler_test.cc DEPS profiler)
if(NOT WIN32)
cc_test(profiler_test SRCS profiler_test.cc DEPS profiler)
endif(NOT WIN32)
nv_test(float16_gpu_test SRCS float16_test.cu DEPS lod_tensor) nv_test(float16_gpu_test SRCS float16_test.cu DEPS lod_tensor)
cc_test(float16_test SRCS float16_test.cc DEPS lod_tensor) cc_test(float16_test SRCS float16_test.cc DEPS lod_tensor)
......
...@@ -28,6 +28,9 @@ TEST(Event, CpuElapsedTime) { ...@@ -28,6 +28,9 @@ TEST(Event, CpuElapsedTime) {
while (counter != 1000) { while (counter != 1000) {
counter++; counter++;
} }
#ifdef _WIN32
Sleep(1);
#endif
Event stop_event(EventType::kPopRange, "test", 0); Event stop_event(EventType::kPopRange, "test", 0);
EXPECT_GT(start_event.CpuElapsedMs(stop_event), 0); EXPECT_GT(start_event.CpuElapsedMs(stop_event), 0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册