Skip to content

Commit 04dc860

Browse files
committed
fix test failures
1 parent c8765d8 commit 04dc860

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/memory.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ template <typename T, typename AccessorTy, CacheHint L1H = CacheHint::None,
439439
CacheHint L3H = CacheHint::None>
440440
ESIMD_INLINE ESIMD_NODEBUG void scalar_store(AccessorTy acc, uint32_t offset,
441441
T val) {
442-
scatter<T>(acc, simd<T, 1, AccessorTy, L1H, L3H>(val),
443-
simd<uint32_t, 1>(offset));
442+
scatter<T, 1, AccessorTy, L1H, L3H>(acc, simd<T, 1>(val),
443+
simd<uint32_t, 1>(offset));
444444
}
445445

446446
/// Store a scalar value into the Shared Local Memory.

sycl/test/esimd/gather_scatter.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,43 @@ using namespace cl::sycl;
1111

1212
void kernel(
1313
accessor<int, 1, access::mode::read_write, access::target::device> &buf)
14-
__attribute__((sycl_device)) {
14+
SYCL_ESIMD_FUNCTION {
1515
simd<uint32_t, 32> offsets(0, 1);
1616
simd<int, 32> v1(0, 1);
1717

18-
auto v0 = gather<int, 32>(buf.get_pointer(), offsets);
18+
auto v0 = gather<int, 32>(buf, offsets);
1919

2020
v0 = v0 + v1;
2121

22-
scatter<int, 32>(buf.get_pointer(), v0, offsets);
22+
scatter<int, 32>(buf, v0, offsets);
2323
}
2424

2525
void kernel(
2626
accessor<uint8_t, 1, access::mode::read_write, access::target::device> &buf)
27-
__attribute__((sycl_device)) {
27+
SYCL_ESIMD_FUNCTION {
2828
simd<uint32_t, 32> offsets(0, 1);
2929
simd<uint8_t, 32> v1(0, 1);
3030

31-
simd<uint8_t, 32> v0 = gather<uint8_t, 32>(buf.get_pointer(), offsets);
31+
simd<uint8_t, 32> v0 = gather<uint8_t, 32>(buf, offsets);
3232

3333
// We honor integer promotion rules: uint8_t + uint8_t yields int
3434
// So we need to convert it back to simd<uint8_t, 32>
3535
v0 = convert<uint8_t>(v0 + v1);
3636

37-
scatter<uint8_t, 32>(buf.get_pointer(), v0, offsets);
37+
scatter<uint8_t, 32>(buf, v0, offsets);
3838
}
3939

4040
void kernel(accessor<uint16_t, 1, access::mode::read_write,
4141
access::target::device> &buf)
42-
__attribute__((sycl_device)) {
42+
SYCL_ESIMD_FUNCTION {
4343
simd<uint32_t, 32> offsets(0, 1);
4444
simd<uint16_t, 32> v1(0, 1);
4545

46-
simd<uint16_t, 32> v0 = gather<uint16_t, 32>(buf.get_pointer(), offsets);
46+
simd<uint16_t, 32> v0 = gather<uint16_t, 32>(buf, offsets);
4747

4848
// We honor integer promotion rules: uint16_t + uint16_t yields int
4949
// So we need to convert it back to simd<uint16_t, 32>
5050
v0 = convert<uint16_t>(v0 + v1);
5151

52-
scatter<uint16_t, 32>(buf.get_pointer(), v0, offsets);
52+
scatter<uint16_t, 32>(buf, v0, offsets);
5353
}

sycl/test/esimd/intrins_trans.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ SYCL_ESIMD_FUNCTION SYCL_EXTERNAL simd<float, 16> foo() {
129129
// CHECK: %[[SI3_VAL:[0-9a-zA-Z_.]+]] = ptrtoint i32 addrspace(1)* %{{[0-9a-zA-Z_.]+}} to i32
130130
// CHECK: store i32 %[[SI3_VAL]], i32 addrspace(4)* %[[SI3_ADDR:[0-9a-zA-Z_.]+]]
131131
// CHECK: %[[SI3:[0-9a-zA-Z_.]+]] = load i32, i32 addrspace(4)* %[[SI3_ADDR]]
132-
// CHECK: %{{[0-9a-zA-Z_.]+}} = call <8 x i32> @llvm.genx.gather.scaled2.v8i32.v8i32(i32 2, i16 0, i32 %[[SI3]], i32 %{{[0-9a-zA-Z_.]+}}, <8 x i32> %{{[0-9a-zA-Z_.]+}})
132+
// CHECK: %{{[0-9a-zA-Z_.]+}} = call <8 x i32> @llvm.genx.gather.masked.scaled2.v8i32.v8i32.v8i1(i32 2, i16 0, i32 %[[SI3]], i32 %{{[0-9a-zA-Z_.]+}}, <8 x i32> %{{[0-9a-zA-Z_.]+}}, <8 x i1> %{{[0-9a-zA-Z_.]+}})
133133

134134
// 4-byte element scatter
135135
scatter<int, 8>(acc, v, offsets, 100, pred);
@@ -143,7 +143,7 @@ SYCL_ESIMD_FUNCTION SYCL_EXTERNAL simd<float, 16> foo() {
143143
// CHECK: %[[SI5_VAL:[0-9a-zA-Z_.]+]] = ptrtoint i32 addrspace(1)* %{{[0-9a-zA-Z_.]+}} to i32
144144
// CHECK: store i32 %[[SI5_VAL]], i32 addrspace(4)* %[[SI5_ADDR:[0-9a-zA-Z_.]+]]
145145
// CHECK: %[[SI5:[0-9a-zA-Z_.]+]] = load i32, i32 addrspace(4)* %[[SI5_ADDR]]
146-
// CHECK: %{{[0-9a-zA-Z_.]+}} = call <8 x i32> @llvm.genx.gather.scaled2.v8i32.v8i32(i32 0, i16 0, i32 %[[SI5]], i32 %{{[0-9a-zA-Z_.]+}}, <8 x i32> %{{[0-9a-zA-Z_.]+}})
146+
// CHECK: %{{[0-9a-zA-Z_.]+}} = call <8 x i32> @llvm.genx.gather.masked.scaled2.v8i32.v8i32.v8i1(i32 0, i16 0, i32 %[[SI5]], i32 %{{[0-9a-zA-Z_.]+}}, <8 x i32> %{{[0-9a-zA-Z_.]+}}, <8 x i1> %{{[0-9a-zA-Z_.]+}})
147147

148148
// 1-byte element scatter
149149
scatter<unsigned char, 8>(acc, v1, offsets, 100, pred);

0 commit comments

Comments
 (0)