@@ -8,10 +8,27 @@ option(TEST_SUITE_HECBENCH_FORCE_ALL "Execute all HeCBench tests, even those kno
8
8
set (TEST_SUITE_OFFLOADING_FLAGS --offload-arch=native CACHE STRING "Compiler arguments for OpenMP offloading" )
9
9
set (TEST_SUITE_OFFLOADING_LDFLAGS --offload-arch=native CACHE STRING "Linker arguments for OpenMP offloading" )
10
10
11
- set (TEST_SUITE_HECBENCH_EXPECT_PASS
11
+ set (ALL_LIST_OPTIONS
12
+ AMD
13
+ AMD_RUNTIME_REDLIST
14
+ AMD_COMPILER_REDLIST
15
+ AMD_REDLIST
16
+ INTEL
17
+ INTEL_RUNTIME_REDLIST
18
+ INTEL_COMPILER_REDLIST
19
+ INTEL_REDLIST
20
+ NVIDIA
21
+ NVIDIA_RUNTIME_REDLIST
22
+ NVIDIA_COMPILER_REDLIST
23
+ NVIDIA_REDLIST
24
+ )
25
+
26
+ set (CHOOSEN_LISTS )
27
+
28
+ set (NVIDIA
12
29
ace-omp/main.cpp
13
30
1
14
-
31
+
15
32
adam-omp/main.cpp
16
33
1
17
34
1
@@ -30,6 +47,37 @@ set(TEST_SUITE_HECBENCH_EXPECT_PASS
30
47
1
31
48
)
32
49
50
+ set (NVIDIA_RUNTIME_REDLIST )
51
+ set (NVIDIA_COMPILER_REDLIST )
52
+
53
+ set (AMD
54
+ ace-omp/main.cpp
55
+ 1
56
+
57
+ adam-omp/main.cpp
58
+ 1
59
+ 1
60
+ 1
61
+
62
+ aidw-omp/main.cpp
63
+ 1
64
+ 1
65
+ 1
66
+
67
+ aobench-omp/ao.cpp
68
+ 1
69
+
70
+ atan2-omp/main.cpp
71
+ 1
72
+ 1
73
+ )
74
+ set (AMD_RUNTIME_REDLIST )
75
+ set (AMD_COMPILER_REDLIST )
76
+
77
+ set (INTEL )
78
+ set (INTEL_RUNTIME_REDLIST )
79
+ set (INTEL_COMPILER_REDLIST )
80
+
33
81
function (add_hecbench LANG )
34
82
if (NOT OpenMP_${LANG}_FOUND )
35
83
message (FATAL_ERROR "OpenMP for ${LANG} not found" )
@@ -41,12 +89,12 @@ function (add_hecbench LANG)
41
89
get_filename_component (_directory "${_file} " DIRECTORY )
42
90
set (_name "hecbench-${_directory} " )
43
91
44
- if (NOT TEST_SUITE_HECBENCH_FORCE_ALL AND NOT "${_file} " IN_LIST TEST_SUITE_HECBENCH_EXPECT_PASS )
92
+ if (NOT TEST_SUITE_HECBENCH_FORCE_ALL AND NOT "${_file} " IN_LIST CHOOSEN_LISTS )
45
93
message (STATUS "Skipping HeCBench Benchmark ${_file} " )
46
94
continue ()
47
95
endif ()
48
96
49
- list (FIND TEST_SUITE_HECBENCH_EXPECT_PASS "${_file} " _index )
97
+ list (FIND CHOOSEN_LISTS "${_file} " _index )
50
98
if (${_index} EQUAL -1 )
51
99
message (STATUS "Skipping HeCBench Benchmark ${_file} " )
52
100
continue ()
@@ -55,7 +103,7 @@ function (add_hecbench LANG)
55
103
set (_args_for_benchmark "" )
56
104
set (IN_DIRECTORY FALSE )
57
105
58
- foreach (item IN LISTS TEST_SUITE_HECBENCH_EXPECT_PASS )
106
+ foreach (item IN LISTS CHOOSEN_LISTS )
59
107
if (item MATCHES ".*-omp.*" )
60
108
61
109
if (IN_DIRECTORY )
@@ -110,7 +158,6 @@ function (add_hecbench LANG)
110
158
message (STATUS "Makefile not found in ${BENCHMARK_DIR} ." )
111
159
endif ()
112
160
113
-
114
161
set (_includedir "${TEST_SUITE_HECBENCH_ROOT} /src/${CFLAGS_INCLUDE} " )
115
162
116
163
llvm_test_executable (${_name} "${TEST_SUITE_HECBENCH_ROOT} /src/${_file} " )
@@ -138,9 +185,56 @@ if (TEST_SUITE_HECBENCH_ROOT AND NOT TEST_SUITE_BENCHMARKING_ONLY)
138
185
return ()
139
186
endif ()
140
187
188
+ list (REMOVE_DUPLICATES SYSTEM_GPU )
189
+ foreach (list_option ${SYSTEM_GPU} )
190
+ string (TOUPPER ${list_option} list_option )
191
+ if (list_option IN_LIST ALL_LIST_OPTIONS )
192
+ if (list_option STREQUAL "AMD" )
193
+ list (APPEND CHOOSEN_LISTS ${AMD} )
194
+ message (STATUS "adding AMD" )
195
+ endif ()
196
+ if (list_option STREQUAL "AMD_RUNTIME_REDLIST" OR list_option STREQUAL "AMD_REDLIST" )
197
+ list (APPEND CHOOSEN_LISTS ${AMD_RUNTIME_REDLIST} )
198
+ message (STATUS "adding AMD_RUNTIME_REDLIST" )
199
+ endif ()
200
+ if (list_option STREQUAL "AMD_COMPILER_REDLIST" OR list_option STREQUAL "AMD_REDLIST" )
201
+ list (APPEND CHOOSEN_LISTS ${AMD_COMPILER_REDLIST} )
202
+ message (STATUS "adding AMD_COMPILER_REDLIST" )
203
+ endif ()
204
+ if (list_option STREQUAL "NVIDIA" )
205
+ list (APPEND CHOOSEN_LISTS ${NVIDIA} )
206
+ message (STATUS "adding NVIDIA" )
207
+ endif ()
208
+ if (list_option STREQUAL "NVIDIA_RUNTIME_REDLIST" OR list_option STREQUAL "NVIDIA_REDLIST" )
209
+ list (APPEND CHOOSEN_LISTS ${NVIDIA_RUNTIME_REDLIST} )
210
+ message (STATUS "adding NVIDIA_RUNTIME_REDLIST" )
211
+ endif ()
212
+ if (list_option STREQUAL "NVIDIA_COMPILER_REDLIST" OR list_option STREQUAL "NVIDIA_REDLIST" )
213
+ list (APPEND CHOOSEN_LISTS ${NVIDIA_COMPILER_REDLIST} )
214
+ message (STATUS "adding NVIDIA_COMPILER_REDLIST" )
215
+ endif ()
216
+ if (list_option STREQUAL "INTEL" )
217
+ list (APPEND CHOOSEN_LISTS ${INTEL} )
218
+ message (STATUS "adding INTEL" )
219
+ endif ()
220
+ if (list_option STREQUAL "INTEL_RUNTIME_REDLIST" OR list_option STREQUAL "INTEL_REDLIST" )
221
+ list (APPEND CHOOSEN_LISTS ${INTEL_RUNTIME_REDLIST} )
222
+ message (STATUS "adding INTEL_RUNTIME_REDLIST" )
223
+ endif ()
224
+ if (list_option STREQUAL "INTEL_COMPILER_REDLIST" OR list_option STREQUAL "INTEL_REDLIST" )
225
+ list (APPEND CHOOSEN_LISTS ${INTEL_COMPILER_REDLIST} )
226
+ message (STATUS "adding INTEL_COMPILER_REDLIST" )
227
+ endif ()
228
+ else ()
229
+ message (STATUS "Option is unrecognized (${list_option} )" )
230
+ endif ()
231
+ endforeach ()
232
+ #list(REMOVE_DUPLICATES CHOOSEN_LISTS)
233
+
141
234
foreach (_lang in CXX )
142
235
if (CMAKE_${_lang}_COMPILER )
143
236
add_hecbench (${_lang} )
144
237
endif ()
145
238
endforeach ()
146
239
endif ()
240
+
0 commit comments