diff --git a/sycl/test-e2e/HostInteropTask/host-task-failure.cpp b/sycl/test-e2e/HostInteropTask/host-task-failure.cpp index 97a57e645a972..fe40c083ea4ac 100644 --- a/sycl/test-e2e/HostInteropTask/host-task-failure.cpp +++ b/sycl/test-e2e/HostInteropTask/host-task-failure.cpp @@ -1,9 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// UNSUPPORTED: linux && arch-intel_gpu_pvc -// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/20961 - +#include #include using namespace sycl; @@ -15,6 +13,10 @@ template class Modifier; template class Init; +std::mutex cvMutex; +std::condition_variable cv; +bool ready = false; + template void copy(buffer &Src, buffer &Dst, queue &Q) { Q.submit([&](handler &CGH) { @@ -24,6 +26,11 @@ void copy(buffer &Src, buffer &Dst, queue &Q) { CGH.host_task([=]() { for (size_t Idx = 0; Idx < SrcA.size(); ++Idx) DstA[Idx] = SrcA[Idx]; + { + std::unique_lock lk(cvMutex); + ready = true; + } + cv.notify_one(); }); }); } @@ -49,6 +56,9 @@ void test() { init(Buffer1, Buffer2, Q); copy(Buffer1, Buffer2, Q); + + std::unique_lock lk(cvMutex); + cv.wait(lk, [&] { return ready; }); } int main() {