Skip to content

Commit 20d4bec

Browse files
[SYCL][E2E] Make layout_array.cpp use specific headers (#16822)
The layout_array test is currently prone to failure if any of the types it checks are instantiated by the headers rather than by the test itself. This means that unrelated changes to the SYCL headers may make the test fail due to one of the types being instantiated earlier than the test instantiates other types that go before it. To avoid this issue, this commit makes the test use specific headers, reducing the chance of instantiations. This commit also fixes a faulty expectation in the `nd_item` test case. --------- Signed-off-by: Larsen, Steffen <[email protected]> Co-authored-by: Daniel Skrobot <[email protected]>
1 parent adeaea8 commit 20d4bec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sycl/test/abi/layout_array.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
// clang-format off
77

8-
// TODO fix individual headers and include them instead of sycl.hpp
9-
#include <sycl/sycl.hpp>
8+
#include <sycl/id.hpp>
9+
#include <sycl/nd_item.hpp>
10+
#include <sycl/nd_range.hpp>
1011

1112

1213
SYCL_EXTERNAL void id(sycl::id<2>) {}
@@ -30,7 +31,7 @@ SYCL_EXTERNAL void range(sycl::range<2>) {}
3031
//----------------------------
3132

3233
SYCL_EXTERNAL void nd_item(sycl::nd_item<2>) {}
33-
// CHECK: 0 | class sycl::nd_item<> (empty)
34+
// CHECK: 0 | class sycl::nd_item<2> (empty)
3435
// CHECK-NEXT: | [sizeof=1, dsize=0, align=1,
3536
// CHECK-NEXT: | nvsize=0, nvalign=1]
3637

0 commit comments

Comments
 (0)