Skip to content

Commit b3bf6f8

Browse files
committed
[CTS] fix 2 errors in urEnequeuKernelLaunch on PVC
Fix urEnqueueKernelLaunchUSMLinkedList by providing required alignment and calling urKernelSetExecInfo. Also, skip InvalidKernelArgs for L0 as L0 cannot check kernel arguments.
1 parent 3a8bf2c commit b3bf6f8

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/multi_device.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ jobs:
6363

6464
- name: Test adapters
6565
working-directory: ${{github.workspace}}/build
66-
run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" -E "enqueue|kernel|program|integration|exp_command_buffer|exp_enqueue_native|exp_launch_properties|exp_usm_p2p" --timeout 180
66+
run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" -E "kernel|program|integration|exp_command_buffer|exp_enqueue_native|exp_launch_properties|exp_usm_p2p" --timeout 180

test/conformance/enqueue/enqueue_adapter_level_zero.match

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
{{OPT}}urEnqueueKernelLaunchTest.InvalidKernelArgs/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
44
{{OPT}}urEnqueueKernelLaunchKernelWgSizeTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
55
{{OPT}}urEnqueueKernelLaunchKernelSubGroupTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
6-
{{OPT}}urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}__UsePoolEnabled
7-
{{OPT}}urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}__UsePoolDisabled
86
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___copy_2d_3d
97
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___copy_3d_2d
108
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_non_zero_offsets_2D

test/conformance/enqueue/enqueue_adapter_level_zero_v2.match

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
urEnqueueKernelLaunchTest.InvalidKernelArgs/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
33
urEnqueueKernelLaunchKernelWgSizeTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
44
urEnqueueKernelLaunchWithVirtualMemory.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
5-
urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UsePoolEnabled
6-
urEnqueueKernelLaunchUSMLinkedList.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UsePoolDisabled
75
{{OPT}}urEnqueueKernelLaunchIncrementTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UseEventsEnabled
86
{{OPT}}urEnqueueKernelLaunchIncrementTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UseEventsDisabled
97
{{OPT}}urEnqueueKernelLaunchIncrementMultiDeviceMultiThreadTest.Success/UseEventsNoQueuePerThread

test/conformance/enqueue/urEnqueueKernelLaunch.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ TEST_P(urEnqueueKernelLaunchTest, InvalidKernelArgs) {
139139
nullptr));
140140

141141
if (backend == UR_PLATFORM_BACKEND_CUDA ||
142-
backend == UR_PLATFORM_BACKEND_HIP) {
143-
GTEST_FAIL() << "AMD and Nvidia can't check kernel arguments.";
142+
backend == UR_PLATFORM_BACKEND_HIP ||
143+
backend == UR_PLATFORM_BACKEND_LEVEL_ZERO) {
144+
GTEST_FAIL() << "AMD, L0 and Nvidia can't check kernel arguments.";
144145
}
145146

146147
// Enqueue kernel without setting any args
@@ -561,16 +562,16 @@ TEST_P(urEnqueueKernelLaunchUSMLinkedList, Success) {
561562
}
562563

563564
// Build linked list with USM allocations
564-
ASSERT_SUCCESS(urUSMSharedAlloc(context, device, nullptr, pool,
565-
sizeof(Node),
565+
ur_usm_desc_t desc{UR_STRUCTURE_TYPE_USM_DESC, nullptr, 0, alignof(Node)};
566+
ASSERT_SUCCESS(urUSMSharedAlloc(context, device, &desc, pool, sizeof(Node),
566567
reinterpret_cast<void **>(&list_head)));
567568
ASSERT_NE(list_head, nullptr);
568569
Node *list_cur = list_head;
569570
for (int i = 0; i < num_nodes; i++) {
570571
list_cur->num = i * 2;
571572
if (i < num_nodes - 1) {
572573
ASSERT_SUCCESS(
573-
urUSMSharedAlloc(context, device, nullptr, pool, sizeof(Node),
574+
urUSMSharedAlloc(context, device, &desc, pool, sizeof(Node),
574575
reinterpret_cast<void **>(&list_cur->next)));
575576
ASSERT_NE(list_cur->next, nullptr);
576577
} else {
@@ -579,6 +580,11 @@ TEST_P(urEnqueueKernelLaunchUSMLinkedList, Success) {
579580
list_cur = list_cur->next;
580581
}
581582

583+
ur_bool_t indirect = true;
584+
ASSERT_SUCCESS(urKernelSetExecInfo(kernel,
585+
UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS,
586+
sizeof(indirect), nullptr, &indirect));
587+
582588
// Run kernel which will iterate the list and modify the values
583589
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, list_head));
584590
ASSERT_SUCCESS(urEnqueueKernelLaunch(queue, kernel, 1, &global_offset,

0 commit comments

Comments
 (0)