Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 5c4c4ec

Browse files
authored
[SYCL][ESIMD] Fix tests that fail under emulator (#1669)
1 parent e2d4330 commit 5c4c4ec

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

SYCL/ESIMD/lsc/Inputs/lsc_surf_load.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ bool test(uint32_t pmask = 0xffffffff) {
6262
sycl::nd_range<1> Range{GlobalRange * LocalRange, LocalRange};
6363

6464
using aligned_allocator =
65-
sycl::usm_allocator<T, sycl::usm::alloc::host,
65+
sycl::usm_allocator<T, sycl::usm::alloc::shared,
6666
Flags::template alignment<__ESIMD_DNS::__raw_t<T>>>;
6767
aligned_allocator Allocator(q);
6868

SYCL/ESIMD/lsc/Inputs/lsc_surf_store.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ bool test(uint32_t pmask = 0xffffffff) {
6262
sycl::range<1> LocalRange{Threads};
6363
sycl::nd_range<1> Range{GlobalRange * LocalRange, LocalRange};
6464
using aligned_allocator =
65-
sycl::usm_allocator<T, sycl::usm::alloc::host,
65+
sycl::usm_allocator<T, sycl::usm::alloc::shared,
6666
Flags::template alignment<__ESIMD_DNS::__raw_t<T>>>;
6767
aligned_allocator Allocator(q);
6868

SYCL/ESIMD/lsc/Inputs/lsc_usm_block_load_prefetch.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ bool test(queue Q, uint32_t Groups, uint32_t Threads) {
3939
sycl::range<1> LocalRange{Threads};
4040
sycl::nd_range<1> Range{GlobalRange * LocalRange, LocalRange};
4141

42-
T *Out = static_cast<T *>(sycl::aligned_alloc_shared(
43-
Flags::template alignment<__ESIMD_DNS::__raw_t<T>>, Size, Q));
44-
T *In = static_cast<T *>(sycl::aligned_alloc_shared(
45-
Flags::template alignment<__ESIMD_DNS::__raw_t<T>>, Size, Q));
42+
T *Out = sycl::aligned_alloc_shared<T>(
43+
Flags::template alignment<__ESIMD_DNS::__raw_t<T>>, Size, Q);
44+
T *In = sycl::aligned_alloc_shared<T>(
45+
Flags::template alignment<__ESIMD_DNS::__raw_t<T>>, Size, Q);
4646
for (int i = 0; i < Size; i++) {
4747
In[i] = get_rand<T>();
4848
Out[i] = 0;

SYCL/ESIMD/lsc/Inputs/lsc_usm_store.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ bool test(uint32_t pmask = 0xffffffff) {
6969
sycl::range<1> LocalRange{Threads};
7070
sycl::nd_range<1> Range{GlobalRange * LocalRange, LocalRange};
7171

72-
T *out = static_cast<T *>(sycl::aligned_alloc_shared(
72+
T *out = sycl::aligned_alloc_shared<T>(
7373
Flags::template alignment<__ESIMD_DNS::__raw_t<T>>, Size * sizeof(T), dev,
74-
ctx));
74+
ctx);
7575
for (int i = 0; i < Size; i++)
7676
out[i] = old_val;
7777

0 commit comments

Comments
 (0)