SWDEV-467540 - Verify awaitCompletion()

Update the existing test case to verify
awaitCompletion() for unfinished command.

Change-Id: I0fbcdba9ffb8633d861312c221ac12df1772c6e6


[ROCm/hip-tests commit: 3e0b749b76]
This commit is contained in:
Tao Sang
2024-06-27 10:53:21 -04:00
committed by Rakesh Roy
vanhempi 2a9aa0a14c
commit d32df0957c
@@ -83,8 +83,14 @@ TEST_CASE("Unit_hipStreamDestroy_WithPendingWork") {
LaunchDelayKernel(std::chrono::milliseconds(500), stream);
setToOne<<<1, numDataPoints, 0, stream>>>(deviceData, numDataPoints);
HIP_CHECK_ERROR(hipStreamQuery(stream), hipErrorNotReady);
HIP_CHECK_ERROR(hipStreamQuery(nullptr), hipErrorNotReady);
SECTION("Without stream query") {
fprintf(stderr, "Without stream query\n");
}
SECTION("With stream query") {
fprintf(stderr, "With stream query\n");
HIP_CHECK_ERROR(hipStreamQuery(stream), hipErrorNotReady);
HIP_CHECK_ERROR(hipStreamQuery(nullptr), hipErrorNotReady);
}
HIP_CHECK(hipStreamDestroy(stream));
checkDataSet<numDataPoints>(deviceData);
HIP_CHECK(hipFree(deviceData));