fix profiler_test on win32 (#25073)

* remove disable profiler_test on win32

* add log

* enlarge the elapsed time

* Revert "add log"

test=develop
fix-sync_batch_norm-hang-in-fleet
Tao Luo 5 years ago committed by GitHub
parent 9ba585f5bf
commit 2996315fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

@ -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);
}

Loading…
Cancel
Save