From 20ae4d709ff215adfaa764da320eac17e151e5ba Mon Sep 17 00:00:00 2001 From: Christophe Paquot Date: Tue, 9 Jun 2020 10:07:58 -0700 Subject: [PATCH] Do not deferred stream creation now that we multiplex HW queues SWDEV-239856 Change-Id: I156650faf832f86891f00ee167269509edd844ec --- hipamd/rocclr/hip_stream.cpp | 2 +- .../tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hipamd/rocclr/hip_stream.cpp b/hipamd/rocclr/hip_stream.cpp index e2ab7b18cd..d764e1a5fe 100755 --- a/hipamd/rocclr/hip_stream.cpp +++ b/hipamd/rocclr/hip_stream.cpp @@ -189,7 +189,7 @@ static hipError_t ihipStreamCreate(hipStream_t* stream, const std::vector& cuMask = {}) { hip::Stream* hStream = new hip::Stream(hip::getCurrentDevice(), priority, flags, false, cuMask); - if (hStream == nullptr) { + if (hStream == nullptr || !hStream->Create()) { return hipErrorOutOfMemory; } diff --git a/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp b/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp index ba2b140611..11cd8d95b5 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp @@ -204,7 +204,7 @@ void runTest() // validate that stream priorities are working as expected #define OP(x, y) \ if (enable_priority_##x && enable_priority_##y) { \ - if (time_spent_##x < time_spent_##y) { printf("FAILED!"); exit(-1); } \ + if ((1.05f * time_spent_##x) < time_spent_##y) { printf("FAILED!"); exit(-1); } \ } OP(low, normal) OP(normal, high)