Skip to content

Commit

Permalink
[SYCL][E2E] Fix buffer_location test for GPU (#15452)
Browse files Browse the repository at this point in the history
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 <steffen.larsen@intel.com>
  • Loading branch information
steffenlarsen authored Sep 24, 2024
1 parent 4901f2e commit 3e98b3a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sycl/test-e2e/USM/buffer_location.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// UNSUPPORTED: gpu
// REQUIRES: aspect-usm_device_allocations
// RUN: %{build} -o %t1.out
// RUN: %{run} %t1.out

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3e98b3a

Please sign in to comment.