From ffbfe94acad071571cdab8c381a23228e5f2d49e Mon Sep 17 00:00:00 2001 From: Sergei Vinogradov Date: Thu, 25 Sep 2025 16:26:56 +0200 Subject: [PATCH 1/3] Add layout test for the CompileTimeKernelInfoTy --- .../abi/layout_compile_time_kernel_info.cpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sycl/test/abi/layout_compile_time_kernel_info.cpp diff --git a/sycl/test/abi/layout_compile_time_kernel_info.cpp b/sycl/test/abi/layout_compile_time_kernel_info.cpp new file mode 100644 index 0000000000000..9b2b47e28fc8a --- /dev/null +++ b/sycl/test/abi/layout_compile_time_kernel_info.cpp @@ -0,0 +1,26 @@ +// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s +// REQUIRES: linux +// UNSUPPORTED: libcxx + +// clang-format off + +#include + +void foo(sycl::detail::compile_time_kernel_info_v1::CompileTimeKernelInfoTy) {} + +// CHECK: 0 | class sycl::detail::compile_time_kernel_info_v1::CompileTimeKernelInfoTy +// CHECK-NEXT: 0 | class sycl::detail::string_view Name +// CHECK-NEXT: 0 | const char * str +// CHECK-NEXT: 8 | unsigned int NumParams +// CHECK-NEXT: 12 | _Bool IsESIMD +// CHECK-NEXT: 16 | class sycl::detail::string_view FileName +// CHECK-NEXT: 16 | const char * str +// CHECK-NEXT: 24 | class sycl::detail::string_view FunctionName +// CHECK-NEXT: 24 | const char * str +// CHECK-NEXT: 32 | unsigned int LineNumber +// CHECK-NEXT: 36 | unsigned int ColumnNumber +// CHECK-NEXT: 40 | int64_t KernelSize +// CHECK-NEXT: 48 | ParamDescGetterT ParamDescGetter +// CHECK-NEXT: 56 | _Bool HasSpecialCaptures +// CHECK-NEXT: | [sizeof=64, dsize=57, align=8, +// CHECK-NEXT: | nvsize=57, nvalign=8] From bb6b5f68b84861c16a7d32bd9600eae2d5474272 Mon Sep 17 00:00:00 2001 From: Sergei Vinogradov Date: Thu, 25 Sep 2025 18:18:56 +0200 Subject: [PATCH 2/3] Fix the test --- sycl/test/abi/layout_compile_time_kernel_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test/abi/layout_compile_time_kernel_info.cpp b/sycl/test/abi/layout_compile_time_kernel_info.cpp index 9b2b47e28fc8a..fd5a63d79cbc3 100644 --- a/sycl/test/abi/layout_compile_time_kernel_info.cpp +++ b/sycl/test/abi/layout_compile_time_kernel_info.cpp @@ -8,7 +8,7 @@ void foo(sycl::detail::compile_time_kernel_info_v1::CompileTimeKernelInfoTy) {} -// CHECK: 0 | class sycl::detail::compile_time_kernel_info_v1::CompileTimeKernelInfoTy +// CHECK: 0 | struct sycl::detail::CompileTimeKernelInfoTy // CHECK-NEXT: 0 | class sycl::detail::string_view Name // CHECK-NEXT: 0 | const char * str // CHECK-NEXT: 8 | unsigned int NumParams From 6c77d9efff8d64aa6a2ad390eb28d9caaff36b72 Mon Sep 17 00:00:00 2001 From: Sergei Vinogradov Date: Thu, 25 Sep 2025 21:39:29 +0200 Subject: [PATCH 3/3] Fix layout test --- sycl/test/abi/layout_compile_time_kernel_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test/abi/layout_compile_time_kernel_info.cpp b/sycl/test/abi/layout_compile_time_kernel_info.cpp index fd5a63d79cbc3..348d268c49a9e 100644 --- a/sycl/test/abi/layout_compile_time_kernel_info.cpp +++ b/sycl/test/abi/layout_compile_time_kernel_info.cpp @@ -9,7 +9,7 @@ void foo(sycl::detail::compile_time_kernel_info_v1::CompileTimeKernelInfoTy) {} // CHECK: 0 | struct sycl::detail::CompileTimeKernelInfoTy -// CHECK-NEXT: 0 | class sycl::detail::string_view Name +// CHECK: 0 | class sycl::detail::string_view Name // CHECK-NEXT: 0 | const char * str // CHECK-NEXT: 8 | unsigned int NumParams // CHECK-NEXT: 12 | _Bool IsESIMD