SWDEV-408958 - Use LaunchDelayKernel and modify it to use same kernel based on real time clock for gfx10 and gfx11. (#370)

Change-Id: Iea8a48e8cbfa1745c7d5535dc5820133a4104087
This commit is contained in:
ROCm CI Service Account
2023-07-20 10:16:56 +05:30
committed by GitHub
parent faa2dd7cfb
commit 04080c2e2e
14 changed files with 79 additions and 209 deletions
+2 -6
View File
@@ -23,7 +23,7 @@ THE SOFTWARE.
#include <hip_test_common.hh>
#include <hip_test_checkers.hh>
#include <iostream>
#include <utils.hh>
/**
* @addtogroup hipEventElapsedTime hipEventElapsedTime
* @{
@@ -158,10 +158,7 @@ TEST_CASE("Unit_hipEventElapsedTime_NotReady_Negative") {
// Record start event
HIP_CHECK(hipEventRecord(start, nullptr));
HipTest::BlockingContext b_context{nullptr};
b_context.block_stream(); // blocked stream
REQUIRE(b_context.is_blocked());
LaunchDelayKernel(std::chrono::milliseconds(1000));
// Record stop event
HIP_CHECK(hipEventRecord(stop, nullptr));
@@ -169,7 +166,6 @@ TEST_CASE("Unit_hipEventElapsedTime_NotReady_Negative") {
float tElapsed = 1.0f;
HIP_CHECK_ERROR(hipEventQuery(stop), hipErrorNotReady);
HIP_ASSERT(hipEventElapsedTime(&tElapsed, start, stop) == hipErrorNotReady);
b_context.unblock_stream();
HIP_CHECK(hipStreamSynchronize(nullptr));
HIP_CHECK(hipEventDestroy(start));