Skip to content

Commit e11ac89

Browse files
Reduce the number of the generated KT tests (#2099)
1 parent 1029fe9 commit e11ac89

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

test/kt/CMakeLists.txt

+15-6
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,14 @@ function(_generate_esimd_sort_tests _key_value_pairs)
109109
if(_key_value_pairs)
110110
foreach (_base_file ${_base_file_by_key_all})
111111
foreach (_val_type ${_type_all})
112-
_generate_esimd_sort_test(${_base_file} ${_data_per_work_item} ${_work_group_size} ${_key_type} ${_val_type} 20)
112+
# ~1-2 tests: (2/1000) * (16 * 6 * 6 * 2)
113+
_generate_esimd_sort_test(${_base_file} ${_data_per_work_item} ${_work_group_size} ${_key_type} ${_val_type} 2)
113114
endforeach()
114115
endforeach()
115116
else()
116117
foreach (_base_file ${_base_file_all})
117-
_generate_esimd_sort_test(${_base_file} ${_data_per_work_item} ${_work_group_size} ${_key_type} "" 200)
118+
# ~1-2 test: (10/1000) * (16 * 6 * 2)
119+
_generate_esimd_sort_test(${_base_file} ${_data_per_work_item} ${_work_group_size} ${_key_type} "" 10)
118120
endforeach()
119121
endif()
120122
endforeach()
@@ -127,10 +129,11 @@ if (ONEDPL_TEST_ENABLE_KT_ESIMD)
127129
_generate_esimd_sort_tests(TRUE) # esimd_radix_sort_by_key, random
128130

129131
# Pin some cases to track them
130-
_generate_esimd_sort_test("esimd_radix_sort_by_key_out_of_place" "96" "64" "uint32_t" "uint32_t" 1000) # common use-case
132+
_generate_esimd_sort_test("esimd_radix_sort_by_key_out_of_place" "96" "64" "uint32_t" "uint32_t" 1000)
133+
_generate_esimd_sort_test("esimd_radix_sort" "384" "64" "int32_t" "" 1000)
131134
endif()
132135

133-
function (_generate_gpu_scan_test _data_per_work_item _work_group_size _type)
136+
function (_generate_gpu_scan_test _data_per_work_item _work_group_size _type _probability_permille)
134137
if ((NOT TARGET build-scan-kt-tests) AND (NOT TARGET run-scan-kt-tests))
135138
add_custom_target(build-scan-kt-tests COMMENT "Build all scan kernel template tests")
136139
add_custom_target(run-scan-kt-tests
@@ -143,7 +146,7 @@ function (_generate_gpu_scan_test _data_per_work_item _work_group_size _type)
143146
set(_target_name "single_pass_scan_dpwi${_data_per_work_item}_wgs${_work_group_size}_${_type_short}")
144147
set(_test_path "single_pass_scan.cpp")
145148

146-
_generate_test(${_target_name} ${_test_path})
149+
_generate_test_randomly(${_target_name} ${_test_path} ${_probability_permille})
147150
if(TARGET ${_target_name})
148151
add_dependencies(build-scan-kt-tests ${_target_name})
149152
add_dependencies(run-scan-kt-tests ${_target_name})
@@ -162,12 +165,18 @@ function(_generate_gpu_scan_tests)
162165
foreach (_data_per_work_item ${_data_per_work_item_all})
163166
foreach (_work_group_size ${_work_group_size_all})
164167
foreach (_type ${_type_all})
165-
_generate_gpu_scan_test(${_data_per_work_item} ${_work_group_size} ${_type})
168+
# ~1-2 test: (10/1000) * (6 * 5 * 6)
169+
_generate_gpu_scan_test(${_data_per_work_item} ${_work_group_size} ${_type} 10)
166170
endforeach()
167171
endforeach()
168172
endforeach()
169173
endfunction()
170174

171175
if (ONEDPL_TEST_ENABLE_KT_SYCL)
172176
_generate_gpu_scan_tests()
177+
178+
# Pin some cases to track them
179+
_generate_gpu_scan_test("8" "512" "uint32_t" 1000)
180+
_generate_gpu_scan_test("4" "256" "float" 1000)
181+
_generate_gpu_scan_test("16" "64" "int64_t" 1000)
173182
endif()

0 commit comments

Comments
 (0)