From 60f39552492dd635a3ae547202b43006add83ff0 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Thu, 5 Jan 2023 04:20:51 -0500 Subject: [PATCH] [SYCL] Add non-standard vec aliases back to fix SYCL-CTS 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. --- sycl/include/sycl/aliases.hpp | 7 +++++++ sycl/test/basic_tests/vectors/aliases.cpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/sycl/include/sycl/aliases.hpp b/sycl/include/sycl/aliases.hpp index cc3fc0ab06352..ad6c63b18742a 100644 --- a/sycl/include/sycl/aliases.hpp +++ b/sycl/include/sycl/aliases.hpp @@ -65,8 +65,15 @@ class half; // FIXME: OpenCL vector aliases are not defined by SYCL 2020 spec and should be // removed from here. See intel/llvm#7888 +// FIXME: schar, longlong and ulonglong aliases are not defined by SYCL 2020 +// spec, but they are preserved in SYCL 2020 mode, because SYCL-CTS is +// still using them. +// See KhronosGroup/SYCL-CTS#446 and KhronosGroup/SYCL-Docs#335 #define __SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(N) \ __SYCL_MAKE_VECTOR_ALIASES_FOR_OPENCL_TYPES(N) \ + __SYCL_MAKE_VECTOR_ALIAS(schar, std::int8_t, N) \ + __SYCL_MAKE_VECTOR_ALIAS(longlong, std::int64_t, N) \ + __SYCL_MAKE_VECTOR_ALIAS(ulonglong, std::uint64_t, N) \ __SYCL_MAKE_VECTOR_ALIAS(char, std::int8_t, N) \ __SYCL_MAKE_VECTOR_ALIAS(uchar, std::uint8_t, N) \ __SYCL_MAKE_VECTOR_ALIAS(short, std::int16_t, N) \ diff --git a/sycl/test/basic_tests/vectors/aliases.cpp b/sycl/test/basic_tests/vectors/aliases.cpp index 399d32e1ac71c..3cc7a7b9c2aaf 100644 --- a/sycl/test/basic_tests/vectors/aliases.cpp +++ b/sycl/test/basic_tests/vectors/aliases.cpp @@ -10,6 +10,9 @@ std::is_same_v>); #define CHECK_ALIASES_FOR_VEC_LENGTH(N) \ + CHECK_ALIAS(schar, std::int8_t, N) \ + CHECK_ALIAS(longlong, std::int64_t, N) \ + CHECK_ALIAS(ulonglong, std::uint64_t, N) \ CHECK_ALIAS(char, std::int8_t, N) \ CHECK_ALIAS(uchar, std::uint8_t, N) \ CHECK_ALIAS(short, std::int16_t, N) \