Skip to content

Commit

Permalink
[NFC] Clean up match files for conf. testing
Browse files Browse the repository at this point in the history
Clean up the match files to hopefully make them more easily readable. As
we now use cts_exe.py, we don't need as many workarounds.

This changes the following:
* Removes the "{{NONDETERMINISTIC}}" tag, which isn't needed any more.
* Removes the notice about only being supported in cts_exe.py - all
  suites now require cts_exe.py.
* Device names have been simplified down to a single wildcard -
  should make it easier to read them and copy between files if needed.
* If all tests for a specific enum fail, it has been folded into a
  single wildcard.
  • Loading branch information
RossBrunton committed Nov 13, 2024
1 parent cd92e72 commit b1d2fe5
Show file tree
Hide file tree
Showing 55 changed files with 851 additions and 1,968 deletions.
2 changes: 0 additions & 2 deletions scripts/core/CONTRIB.rst
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ The format of the match files are as follows:
matches a single character.
* Empty lines or lines beginning with ``#`` are ignored.
* A line beginning with ``{{OPT}}`` is a optional test; see below.
* For compatibility with an older version of the matching logic, ``{{.*}}`` is
interpreted as ``*`` and ``{{NONDETERMINISTIC}}`` is ignored.

Normally tests in the match file must fail (either by crashing or having a test
failure) for the given adapter. However this can be disabled by prepending
Expand Down
1 change: 0 additions & 1 deletion test/conformance/adapter/adapter_adapter_native_cpu.match
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{NONDETERMINISTIC}}
# These pass when the adapter is launched by the loader
{{OPT}}urAdapterGetLastErrorTest.Success
{{OPT}}urAdapterGetLastErrorTest.InvalidHandle
Expand Down
3 changes: 1 addition & 2 deletions test/conformance/context/context_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{NONDETERMINISTIC}}
{{OPT}}urContextSetExtendedDeleterTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urContextSetExtendedDeleterTest.Success/*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{OPT}}urContextSetExtendedDeleterTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}__
{{OPT}}urContextSetExtendedDeleterTest.Success/*
2 changes: 1 addition & 1 deletion test/conformance/context/context_adapter_native_cpu.match
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{OPT}}urContextSetExtendedDeleterTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}urContextSetExtendedDeleterTest.Success/*
3 changes: 0 additions & 3 deletions test/conformance/cts_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,9 @@ def _run_cmd(cmd, comment, filter):
for l in f:
optional = "{{OPT}}" in l
l = l.replace("{{OPT}}", "")
l = l.replace("{{.*}}", "*")

if l.startswith("#"):
continue
if l.startswith("{{NONDETERMINISTIC}}"):
continue
if l.strip() == "":
continue

Expand Down
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_cuda.match
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{NONDETERMINISTIC}}
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_hip.match
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{NONDETERMINISTIC}}
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{NONDETERMINISTIC}}
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_level_zero_v2.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{NONDETERMINISTIC}}
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
{{OPT}}urDeviceGetInfoTest.Success/UR_DEVICE_INFO_GLOBAL_MEM_FREE
1 change: 0 additions & 1 deletion test/conformance/device/device_adapter_native_cpu.match
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{NONDETERMINISTIC}}
urDeviceCreateWithNativeHandleTest.InvalidNullHandlePlatform
urDeviceCreateWithNativeHandleTest.InvalidNullPointerDevice
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
Expand Down
21 changes: 10 additions & 11 deletions test/conformance/enqueue/enqueue_adapter_cuda.match
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{{NONDETERMINISTIC}}
urEnqueueKernelLaunchTest.InvalidKernelArgs/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueKernelLaunchKernelWgSizeTest.NonMatchingLocalSize/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueKernelLaunchKernelSubGroupTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemBufferMapTestWithWriteFlagParam.SuccessWrite/NVIDIA_CUDA_BACKEND___{{.*}}___UR_MAP_FLAG_WRITE_INVALIDATE_REGION
urEnqueueUSMAdviseWithParamTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_USM_ADVICE_FLAG_DEFAULT
urEnqueueUSMAdviseTest.MultipleParamsSuccess/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueUSMPrefetchWithParamTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_USM_MIGRATION_FLAG_DEFAULT
urEnqueueUSMPrefetchWithParamTest.CheckWaitEvent/NVIDIA_CUDA_BACKEND___{{.*}}___UR_USM_MIGRATION_FLAG_DEFAULT
urEnqueueTimestampRecordingExpTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueTimestampRecordingExpTest.SuccessBlocking/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueKernelLaunchTest.InvalidKernelArgs/*
urEnqueueKernelLaunchKernelWgSizeTest.NonMatchingLocalSize/*
urEnqueueKernelLaunchKernelSubGroupTest.Success/*
urEnqueueMemBufferMapTestWithWriteFlagParam.SuccessWrite/*__UR_MAP_FLAG_WRITE_INVALIDATE_REGION
urEnqueueUSMAdviseWithParamTest.Success/*__UR_USM_ADVICE_FLAG_DEFAULT
urEnqueueUSMAdviseTest.MultipleParamsSuccess/*
urEnqueueUSMPrefetchWithParamTest.Success/*__UR_USM_MIGRATION_FLAG_DEFAULT
urEnqueueUSMPrefetchWithParamTest.CheckWaitEvent/*__UR_USM_MIGRATION_FLAG_DEFAULT
urEnqueueTimestampRecordingExpTest.Success/*
urEnqueueTimestampRecordingExpTest.SuccessBlocking/*
29 changes: 14 additions & 15 deletions test/conformance/enqueue/enqueue_adapter_hip.match
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{{NONDETERMINISTIC}}
# HIP can't check kernel arguments
urEnqueueKernelLaunchTest.InvalidKernelArgs/AMD_HIP_BACKEND___{{.*}}_
urEnqueueKernelLaunchKernelWgSizeTest.NonMatchingLocalSize/AMD_HIP_BACKEND___{{.*}}_
urEnqueueKernelLaunchKernelSubGroupTest.Success/AMD_HIP_BACKEND___{{.*}}_
urEnqueueKernelLaunchUSMLinkedList.Success/AMD_HIP_BACKEND___{{.*}}___UsePoolEnabled
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___copy_row_2D
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___copy_3d_2d
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___write_row_2D
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___write_3d_2d
urEnqueueKernelLaunchTest.InvalidKernelArgs/*
urEnqueueKernelLaunchKernelWgSizeTest.NonMatchingLocalSize/*
urEnqueueKernelLaunchKernelSubGroupTest.Success/*
urEnqueueKernelLaunchUSMLinkedList.Success/*__UsePoolEnabled
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/*__copy_row_2D
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/*__copy_3d_2d
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/*__write_row_2D
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/*__write_3d_2d

# HIP doesn't ignore unsupported USM advice or prefetching. Instead of
# returning UR_RESULT_SUCCESS as per the spec, it instead returns
# UR_RESULT_ERROR_ADAPTER_SPECIFIC to issue a warning. These tests will fail
# until this is rectified.
urEnqueueUSMAdviseWithParamTest.Success/AMD_HIP_BACKEND___{{.*}}___UR_USM_ADVICE_FLAG_DEFAULT
urEnqueueUSMAdviseTest.MultipleParamsSuccess/AMD_HIP_BACKEND___{{.*}}_
urEnqueueUSMPrefetchWithParamTest.Success/AMD_HIP_BACKEND___{{.*}}___UR_USM_MIGRATION_FLAG_DEFAULT
urEnqueueUSMPrefetchWithParamTest.CheckWaitEvent/AMD_HIP_BACKEND___{{.*}}___UR_USM_MIGRATION_FLAG_DEFAULT
urEnqueueUSMAdviseWithParamTest.Success/*__UR_USM_ADVICE_FLAG_DEFAULT
urEnqueueUSMAdviseTest.MultipleParamsSuccess/*
urEnqueueUSMPrefetchWithParamTest.Success/*__UR_USM_MIGRATION_FLAG_DEFAULT
urEnqueueUSMPrefetchWithParamTest.CheckWaitEvent/*__UR_USM_MIGRATION_FLAG_DEFAULT

urEnqueueTimestampRecordingExpTest.Success/AMD_HIP_BACKEND___{{.*}}
urEnqueueTimestampRecordingExpTest.SuccessBlocking/AMD_HIP_BACKEND___{{.*}}
urEnqueueTimestampRecordingExpTest.Success/*
urEnqueueTimestampRecordingExpTest.SuccessBlocking/*
41 changes: 19 additions & 22 deletions test/conformance/enqueue/enqueue_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
# Note: This file is only for use with cts_exe.py
{{OPT}}urEnqueueEventsWaitTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueKernelLaunchTest.InvalidKernelArgs/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueKernelLaunchKernelWgSizeTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueKernelLaunchKernelSubGroupTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___copy_2d_3d
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___copy_3d_2d
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_non_zero_offsets_2D
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_different_buffer_sizes_2D
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_column_2D
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_3d_with_offsets
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_2d_3d
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_3d_2d
{{OPT}}urEnqueueEventsWaitTest.Success/*
{{OPT}}urEnqueueKernelLaunchTest.InvalidKernelArgs/*
{{OPT}}urEnqueueKernelLaunchKernelWgSizeTest.Success/*
{{OPT}}urEnqueueKernelLaunchKernelSubGroupTest.Success/*
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/*__copy_2d_3d
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/*__copy_3d_2d
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/*__write_non_zero_offsets_2D
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/*__write_different_buffer_sizes_2D
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/*__write_column_2D
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/*__write_3d_with_offsets
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/*__write_2d_3d
{{OPT}}urEnqueueMemBufferReadRectTestWithParam.Success/*__write_3d_2d
{{OPT}}urEnqueueMemBufferMapMultiDeviceTest.*
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_3d_with_offsets
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_2d_3d
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___write_3d_2d
{{OPT}}urEnqueueMemImageCopyTest.InvalidSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___1D
{{OPT}}urEnqueueMemImageCopyTest.InvalidSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___2D
{{OPT}}urEnqueueMemImageCopyTest.InvalidSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___3D
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin1D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin2D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin3D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/*__write_3d_with_offsets
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/*__write_2d_3d
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/*__write_3d_2d
{{OPT}}urEnqueueMemImageCopyTest.InvalidSize/*
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin1D/*
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin2D/*
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin3D/*
{{OPT}}urEnqueueEventsWaitMultiDeviceMTTest/*
{{OPT}}urEnqueueEventsWaitWithBarrierOrderingTest.SuccessEventDependencies/*
{{OPT}}urEnqueueEventsWaitWithBarrierOrderingTest.SuccessEventDependenciesBarrierOnly/*
Expand Down
Loading

0 comments on commit b1d2fe5

Please sign in to comment.