Skip to content

Commit 34c6e0d

Browse files
[SYCL] Use new vec/swizzle in preview mode (#18225)
Before this PR it could only be enabled by explicitly defining a macro, now it's on by default in preview. We plan on keeping the macro to allow using old implementation until the first minor release after the next major one.
1 parent b96fdbd commit 34c6e0d

File tree

7 files changed

+366
-354
lines changed

7 files changed

+366
-354
lines changed

sycl/include/sycl/detail/type_traits/vec_marray_traits.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515

1616
#ifndef __SYCL_USE_LIBSYCL8_VEC_IMPL
1717
#if defined(__INTEL_PREVIEW_BREAKING_CHANGES)
18-
// Several specification changes need to be implemented together to keep CTS
19-
// passing. We'll switch to `0` once they all land.
20-
// `__SYCL_USE_PLAIN_ARRAY_AS_VEC_STORAGE` needs to be changed to use this
21-
// `__SYCL_USE_LIBSYCL8_VEC_IMPL` at that time as well.
22-
#define __SYCL_USE_LIBSYCL8_VEC_IMPL 1
18+
#define __SYCL_USE_LIBSYCL8_VEC_IMPL 0
2319
#else
2420
#define __SYCL_USE_LIBSYCL8_VEC_IMPL 1
2521
#endif

sycl/include/sycl/vector.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@
2424

2525
// See vec::DataType definitions for more details
2626
#ifndef __SYCL_USE_PLAIN_ARRAY_AS_VEC_STORAGE
27-
#if defined(__INTEL_PREVIEW_BREAKING_CHANGES)
28-
#define __SYCL_USE_PLAIN_ARRAY_AS_VEC_STORAGE 1
29-
#else
30-
#define __SYCL_USE_PLAIN_ARRAY_AS_VEC_STORAGE 0
31-
#endif
27+
#define __SYCL_USE_PLAIN_ARRAY_AS_VEC_STORAGE !__SYCL_USE_LIBSYCL8_VEC_IMPL
3228
#endif
3329

3430
#if !defined(__HAS_EXT_VECTOR_TYPE__) && defined(__SYCL_DEVICE_ONLY__)

sycl/test/basic_tests/vectors/assign.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// TODO: Remove `__SYCL_USE_LIBSYCL8_VEC_IMPL` once it's auto-set.
2-
// RUN: %clangxx -fsycl -fsyntax-only %s -fpreview-breaking-changes -D__SYCL_USE_LIBSYCL8_VEC_IMPL=0
1+
// RUN: %clangxx -fsycl -fsyntax-only %s -fpreview-breaking-changes
32
// RUN: %clangxx -fsycl -fsyntax-only %s
43

54
#include <sycl/sycl.hpp>
@@ -55,11 +54,7 @@ static_assert( !std::is_assignable_v<vec<half, 2>, sw_double_2>)
5554
static_assert( std::is_assignable_v<vec<float, 1>, half>);
5655
static_assert( std::is_assignable_v<vec<float, 1>, float>);
5756
static_assert( std::is_assignable_v<vec<float, 1>, double>);
58-
#if __SYCL_DEVICE_ONLY__
59-
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<float, 1>, vec<half, 1>>);
60-
#else
6157
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<float, 1>, vec<half, 1>>);
62-
#endif
6358
static_assert( std::is_assignable_v<vec<float, 1>, vec<float, 1>>);
6459
static_assert( std::is_assignable_v<vec<float, 1>, vec<double, 1>>);
6560
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<float, 1>, sw_half_1>);

sycl/test/basic_tests/vectors/cxx_conversions.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// TODO: Remove `__SYCL_USE_LIBSYCL8_VEC_IMPL` once it's auto-set.
2-
// RUN: %clangxx -fsycl -fsyntax-only %s -fpreview-breaking-changes -D__SYCL_USE_LIBSYCL8_VEC_IMPL=0
1+
// RUN: %clangxx -fsycl -fsyntax-only %s -fpreview-breaking-changes
32
// RUN: %clangxx -fsycl -fsyntax-only %s
43

54
#include <sycl/sycl.hpp>

sycl/test/check_device_code/vector/bf16_builtins_preview.cpp

+132-132
Large diffs are not rendered by default.

sycl/test/check_device_code/vector/convert_bfloat_preview.cpp

+83-61
Large diffs are not rendered by default.

sycl/test/check_device_code/vector/math_ops_preview.cpp

+147-143
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)