SWDEV-425248 - numerous bug fixes
https://gerrit-git.amd.com/c/compute/ec/clr/+/849086 changed stream sync behaviour and accordingly updated Unit_hipStreamCreateWithFlags_DefaultStreamInteraction. Update error code to match for hipStreamWaitEvent. Thread detach makes executions all async and while that is happening, It is unexpected effect for device reset so join thread is better. Change-Id: I1affa84089626dee478d8bcc5aaa318e320fd6b0
Ta zmiana jest zawarta w:
1 rodzic
0f3750cf2c
złożenie
be88e1dffc
3 plików zmienionych
+10
-7
Żadne pliki nie pasują do Twojego wyszukiwania
@@ -59,10 +59,7 @@ TEST_CASE("Unit_hipStreamCreateWithFlags_Default") {
|
||||
TEST_CASE("Unit_hipStreamCreateWithFlags_DefaultStreamInteraction") {
|
||||
const hipStream_t defaultStream = GENERATE(static_cast<hipStream_t>(nullptr), hipStreamPerThread);
|
||||
const unsigned int flagUnderTest = GENERATE(hipStreamDefault, hipStreamNonBlocking);
|
||||
const hipError_t expectedError = (flagUnderTest == hipStreamDefault) && (defaultStream == nullptr)
|
||||
? hipErrorNotReady
|
||||
: hipSuccess;
|
||||
CAPTURE(defaultStream, flagUnderTest, expectedError, hipGetErrorString(expectedError));
|
||||
CAPTURE(defaultStream, flagUnderTest);
|
||||
|
||||
hipStream_t stream{};
|
||||
HIP_CHECK(hipStreamCreateWithFlags(&stream, flagUnderTest));
|
||||
@@ -70,12 +67,15 @@ TEST_CASE("Unit_hipStreamCreateWithFlags_DefaultStreamInteraction") {
|
||||
constexpr auto delay = std::chrono::milliseconds(500);
|
||||
|
||||
SECTION("default stream waiting for created stream") {
|
||||
const hipError_t expectedError = (flagUnderTest == hipStreamDefault) && (defaultStream == nullptr)
|
||||
? hipErrorNotReady
|
||||
: hipSuccess;
|
||||
LaunchDelayKernel(delay, stream);
|
||||
REQUIRE(hipStreamQuery(defaultStream) == expectedError);
|
||||
}
|
||||
SECTION("created stream waiting for default stream") {
|
||||
LaunchDelayKernel(delay, defaultStream);
|
||||
REQUIRE(hipStreamQuery(stream) == expectedError);
|
||||
REQUIRE(hipStreamQuery(stream) == hipSuccess);
|
||||
}
|
||||
|
||||
HIP_CHECK(hipDeviceSynchronize());
|
||||
|
||||
Reference in new issue
Zablokuj użytkownika