From 6125076d6f3528271b02bab5dd59fc3169475f09 Mon Sep 17 00:00:00 2001 From: taosang2 Date: Fri, 15 Mar 2024 10:02:02 -0400 Subject: [PATCH] SWDEV-1 - Add warmup for right timing. Add warmup for right timing in Unit_hipEventRecord test. Change-Id: If0ce1bafa81f1da8b1856ff9175737cdb82a2b84 [ROCm/hip-tests commit: cb7f02e04ef0b8959be9fa60676ad48f1754ae61] --- projects/hip-tests/catch/unit/event/Unit_hipEventRecord.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/hip-tests/catch/unit/event/Unit_hipEventRecord.cc b/projects/hip-tests/catch/unit/event/Unit_hipEventRecord.cc index 30a808e328..022be7df2e 100644 --- a/projects/hip-tests/catch/unit/event/Unit_hipEventRecord.cc +++ b/projects/hip-tests/catch/unit/event/Unit_hipEventRecord.cc @@ -100,6 +100,11 @@ TEST_CASE("Unit_hipEventRecord") { HIP_CHECK(hipMemcpy(A_d, A_h, Nbytes, hipMemcpyHostToDevice)); HIP_CHECK(hipMemcpy(B_d, B_h, Nbytes, hipMemcpyHostToDevice)); + // Warmup + HipTest::launchKernel(HipTest::vectorADD, blocks, 1, 0, 0, + static_cast(A_d), static_cast(B_d), + C_d, N); + HIP_CHECK(hipDeviceSynchronize()); for (int i = 0; i < iterations; i++) { //--- START TIMED REGION long long hostStart = HipTest::get_time();