Skip to content

Commit

Permalink
Merge pull request #2144 from aarongreig/aaron/checkMaxSubgroupsInTest
Browse files Browse the repository at this point in the history
Add missing code to enforce subgroup size in subgroup test.
  • Loading branch information
aarongreig authored Oct 1, 2024
2 parents 0247d09 + e07608c commit cc2d590
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions test/conformance/device_code/subgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ struct KernelFunctor {
KernelFunctor(sycl::accessor<size_t, 1, sycl::access_mode::write> Acc)
: Acc(Acc) {}

auto get(sycl::ext::oneapi::experimental::properties_tag) {
return sycl::ext::oneapi::experimental::properties{
sycl::ext::oneapi::experimental::sub_group_size<8>};
}

void operator()(sycl::nd_item<1> NdItem) const {
auto SG = NdItem.get_sub_group();
if (NdItem.get_global_linear_id() == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
urEnqueueDeviceGetGlobalVariableReadTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
urEnqueueKernelLaunchTest.InvalidKernelArgs/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
urEnqueueKernelLaunchKernelWgSizeTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
urEnqueueKernelLaunchKernelSubGroupTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
urEnqueueKernelLaunchWithVirtualMemory.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UsePoolEnabled
urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UsePoolDisabled
Expand Down
1 change: 0 additions & 1 deletion test/conformance/enqueue/enqueue_adapter_opencl.match
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{NONDETERMINISTIC}}
{{OPT}}urEnqueueDeviceGetGlobalVariableReadTest.Success/Intel_R__OpenCL___{{.*}}_
urEnqueueKernelLaunchKernelWgSizeTest.Success/Intel_R__OpenCL___{{.*}}_
urEnqueueKernelLaunchKernelSubGroupTest.Success/Intel_R__OpenCL___{{.*}}_
{{OPT}}urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__OpenCL___{{.*}}_UsePoolEnabled
2 changes: 2 additions & 0 deletions test/conformance/enqueue/urEnqueueKernelLaunch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ TEST_P(urEnqueueKernelLaunchKernelSubGroupTest, Success) {
queue, kernel, n_dimensions, global_offset.data(), global_size.data(),
nullptr, 0, nullptr, nullptr));
ASSERT_SUCCESS(urQueueFinish(queue));
// We specify this subgroup size in the kernel source, and then the kernel
// queries for its subgroup size at runtime and writes it to the buffer.
ValidateBuffer<size_t>(buffer, sizeof(size_t), 8);
}

Expand Down

0 comments on commit cc2d590

Please sign in to comment.