Skip to content

Commit 18f2cda

Browse files
[SYCL] Add non-standard vec aliases back to fix SYCL-CTS (#7925)
SYCL-CTS are still using some aliases which were removed from SYCL 2020 specification, see KhronosGroup/SYCL-CTS#446. Those tests are part of our post-commit and to make it green, this commit temporary adds those aliases back. Note that it is not entierly clear if those aliases should have been removed in the first place, see KhronosGroup/SYCL-Docs#335.
1 parent 32e4311 commit 18f2cda

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sycl/include/sycl/aliases.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,15 @@ class half;
6565

6666
// FIXME: OpenCL vector aliases are not defined by SYCL 2020 spec and should be
6767
// removed from here. See intel/llvm#7888
68+
// FIXME: schar, longlong and ulonglong aliases are not defined by SYCL 2020
69+
// spec, but they are preserved in SYCL 2020 mode, because SYCL-CTS is
70+
// still using them.
71+
// See KhronosGroup/SYCL-CTS#446 and KhronosGroup/SYCL-Docs#335
6872
#define __SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(N) \
6973
__SYCL_MAKE_VECTOR_ALIASES_FOR_OPENCL_TYPES(N) \
74+
__SYCL_MAKE_VECTOR_ALIAS(schar, std::int8_t, N) \
75+
__SYCL_MAKE_VECTOR_ALIAS(longlong, std::int64_t, N) \
76+
__SYCL_MAKE_VECTOR_ALIAS(ulonglong, std::uint64_t, N) \
7077
__SYCL_MAKE_VECTOR_ALIAS(char, std::int8_t, N) \
7178
__SYCL_MAKE_VECTOR_ALIAS(uchar, std::uint8_t, N) \
7279
__SYCL_MAKE_VECTOR_ALIAS(short, std::int16_t, N) \

sycl/test/basic_tests/vectors/aliases.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
std::is_same_v<sycl::type##elems, sycl::vec<storage_type, elems>>);
1111

1212
#define CHECK_ALIASES_FOR_VEC_LENGTH(N) \
13+
CHECK_ALIAS(schar, std::int8_t, N) \
14+
CHECK_ALIAS(longlong, std::int64_t, N) \
15+
CHECK_ALIAS(ulonglong, std::uint64_t, N) \
1316
CHECK_ALIAS(char, std::int8_t, N) \
1417
CHECK_ALIAS(uchar, std::uint8_t, N) \
1518
CHECK_ALIAS(short, std::int16_t, N) \

0 commit comments

Comments
 (0)