From 0530048504b3b8ea9d40e2843e8ad4c35138c252 Mon Sep 17 00:00:00 2001 From: Alberto Cabrera Date: Wed, 13 Mar 2024 12:18:30 +0000 Subject: [PATCH] [SYCL][COMPAT] Removed usm_shared from math_extend tests --- sycl/test-e2e/syclcompat/math/math_extend.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sycl/test-e2e/syclcompat/math/math_extend.cpp b/sycl/test-e2e/syclcompat/math/math_extend.cpp index 1323d2121b22b..3dc877e782ab4 100644 --- a/sycl/test-e2e/syclcompat/math/math_extend.cpp +++ b/sycl/test-e2e/syclcompat/math/math_extend.cpp @@ -40,6 +40,7 @@ #include #include +#include #define CHECK(S, REF) \ { \ @@ -169,14 +170,16 @@ void test(const sycl::stream &s, int *ec) { int main() { sycl::queue q = syclcompat::get_default_queue(); - int *ec = nullptr; - ec = sycl::malloc_shared(1, q); - *ec = 0; + int *ec = syclcompat::malloc(1); + syclcompat::fill(ec, 0, 1); q.submit([&](sycl::handler &cgh) { sycl::stream out(1024, 256, cgh); cgh.parallel_for(1, [=](sycl::item<1> it) { test(out, ec); }); }); q.wait_and_throw(); - return *ec; + int ec_h; + syclcompat::memcpy(&ec_h, ec, 1); + + return ec_h; }