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:
@@ -83,8 +83,14 @@ TEST_CASE("Unit_hipStreamDestroy_WithPendingWork") {
|
|||||||
|
|
||||||
LaunchDelayKernel(std::chrono::milliseconds(500), stream);
|
LaunchDelayKernel(std::chrono::milliseconds(500), stream);
|
||||||
setToOne<<<1, numDataPoints, 0, stream>>>(deviceData, numDataPoints);
|
setToOne<<<1, numDataPoints, 0, stream>>>(deviceData, numDataPoints);
|
||||||
HIP_CHECK_ERROR(hipStreamQuery(stream), hipErrorNotReady);
|
SECTION("Without stream query") {
|
||||||
HIP_CHECK_ERROR(hipStreamQuery(nullptr), hipErrorNotReady);
|
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));
|
HIP_CHECK(hipStreamDestroy(stream));
|
||||||
checkDataSet<numDataPoints>(deviceData);
|
checkDataSet<numDataPoints>(deviceData);
|
||||||
HIP_CHECK(hipFree(deviceData));
|
HIP_CHECK(hipFree(deviceData));
|
||||||
|
|||||||
Reference in New Issue
Block a user