From 3e98b3a09254863423f82d10aa7d40a8b64dbdd3 Mon Sep 17 00:00:00 2001 From: Steffen Larsen Date: Tue, 24 Sep 2024 12:31:01 +0200 Subject: [PATCH] [SYCL][E2E] Fix buffer_location test for GPU (#15452) This commit fixes and issue in buffer_location where the code would attempt to read from a device USM allocation. According to the SYCL specification, these allocations must be explicitly copied to/from host. Signed-off-by: Larsen, Steffen --- sycl/test-e2e/USM/buffer_location.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/USM/buffer_location.cpp b/sycl/test-e2e/USM/buffer_location.cpp index d528105e3f94b..a7f78ac839ffb 100644 --- a/sycl/test-e2e/USM/buffer_location.cpp +++ b/sycl/test-e2e/USM/buffer_location.cpp @@ -1,4 +1,4 @@ -// UNSUPPORTED: gpu +// REQUIRES: aspect-usm_device_allocations // RUN: %{build} -o %t1.out // RUN: %{run} %t1.out @@ -72,7 +72,10 @@ int main() { }); e2.wait(); - if (*test_src_ptr != dst_val) { + int res_val = 0; + q.copy(test_src_ptr, &res_val, 1).wait(); + + if (res_val != dst_val) { return -1; }