Skip to content

Commit 568ac3f

Browse files
committed
Isolate fixed sub-group kernel for CTS.
1 parent ed6cc9d commit 568ac3f

7 files changed

+41
-15
lines changed

test/conformance/device_code/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/saxpy.cpp)
159159
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/saxpy_usm.cpp)
160160
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/indexers_usm.cpp)
161161
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/build_failure.cpp)
162+
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/fixed_sg_size.cpp)
162163
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/fixed_wg_size.cpp)
163164
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/max_wg_size.cpp)
164165
add_device_binary(${CMAKE_CURRENT_SOURCE_DIR}/sequence.cpp)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (C) 2024 Intel Corporation
2+
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
3+
// See LICENSE.TXT
4+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
6+
#include <sycl/sycl.hpp>
7+
8+
struct KernelFunctor {
9+
void operator()(sycl::nd_item<3>) const {}
10+
void operator()(sycl::item<3>) const {}
11+
12+
auto get(sycl::ext::oneapi::experimental::properties_tag) {
13+
return sycl::ext::oneapi::experimental::properties{
14+
sycl::ext::oneapi::experimental::sub_group_size<8>};
15+
}
16+
};
17+
18+
int main() {
19+
sycl::queue myQueue;
20+
myQueue.submit([&](sycl::handler &cgh) {
21+
cgh.parallel_for<class FixedSgSize>(sycl::range<3>(8, 8, 8),
22+
KernelFunctor{});
23+
});
24+
25+
myQueue.wait();
26+
return 0;
27+
}

test/conformance/device_code/fixed_wg_size.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ struct KernelFunctor {
1111

1212
auto get(sycl::ext::oneapi::experimental::properties_tag) {
1313
return sycl::ext::oneapi::experimental::properties{
14-
sycl::ext::oneapi::experimental::work_group_size<8, 4, 2>,
15-
sycl::ext::oneapi::experimental::sub_group_size<8>};
14+
sycl::ext::oneapi::experimental::work_group_size<8, 4, 2>};
1615
}
1716
};
1817

test/conformance/kernel/kernel_adapter_level_zero.match

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Match tests that use fixed_wg_size.cpp as it fails to compile on some
1+
# Match tests that use fixed_sg_size.cpp as it fails to compile on some
22
# hardware.
3-
urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxWorkGroupSize/*
4-
urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxLinearWorkGroupSize/*
5-
urKernelGetSubGroupInfoFixedSubGroupSizeTest.CompileNumSubGroups/*
3+
{{OPT}}urKernelGetSubGroupInfoFixedSubGroupSizeTest.CompileNumSubGroups/*
64

75
urKernelSetExecInfoTest.SuccessIndirectAccess/*
86
urKernelSetExecInfoUSMPointersTest.SuccessHost/*

test/conformance/kernel/kernel_adapter_level_zero_v2.match

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Match tests that use fixed_wg_size.cpp as it fails to compile on some
1+
# Match tests that use fixed_sg_size.cpp as it fails to compile on some
22
# hardware.
3-
urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxWorkGroupSize/*
4-
urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxLinearWorkGroupSize/*
5-
urKernelGetSubGroupInfoFixedSubGroupSizeTest.CompileNumSubGroups/*
3+
{{OPT}}urKernelGetSubGroupInfoFixedSubGroupSizeTest.CompileNumSubGroups/*
64

75
urKernelSetExecInfoTest.SuccessIndirectAccess/*
86
urKernelSetExecInfoUSMPointersTest.SuccessHost/*
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Match tests that use fixed_wg_size.cpp as it fails to compile on some
22
# hardware.
3-
urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxWorkGroupSize/*
4-
urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxLinearWorkGroupSize/*
5-
urKernelGetSubGroupInfoFixedSubGroupSizeTest.CompileNumSubGroups/*
3+
{{OPT}}urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxWorkGroupSize/*
4+
{{OPT}}urKernelGetGroupInfoMaxWorkGroupSizeTest.CompileMaxLinearWorkGroupSize/*
5+
6+
# Match tests that use fixed_sg_size.cpp as it fails to compile on some
7+
# hardware.
8+
{{OPT}}urKernelGetSubGroupInfoFixedSubGroupSizeTest.CompileNumSubGroups/*

test/conformance/kernel/urKernelGetSubGroupInfo.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
struct urKernelGetSubGroupInfoFixedSubGroupSizeTest : uur::urKernelTest {
1010
void SetUp() override {
11-
program_name = "fixed_wg_size";
11+
program_name = "fixed_sg_size";
1212
UUR_RETURN_ON_FATAL_FAILURE(urKernelTest::SetUp());
1313
}
1414

15-
// This value correlates to sub_group_size<8> in fixed_wg_size.cpp.
15+
// This value correlates to sub_group_size<8> in fixed_sg_size.cpp.
1616
uint32_t num_sub_groups{8};
1717
};
1818
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(

0 commit comments

Comments
 (0)