Skip to content

Commit b799a65

Browse files
authored
Merge branch 'llvm:main' into find_compiler_rt
2 parents 984ce4c + 77418e0 commit b799a65

38 files changed

+3072
-736
lines changed

External/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ add_subdirectory(Povray)
77
add_subdirectory(SPEC)
88
add_subdirectory(skidmarks10)
99
add_subdirectory(sollve_vv)
10+
add_subdirectory(smoke)

External/CUDA/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ set(SUPPORTED_GPU_CUDA_12_0
4747
sm_60 sm_61 sm_62
4848
sm_70 sm_72 sm_75
4949
sm_80 sm_86 sm_87 sm_89
50-
sm_90
50+
sm_90 sm_90a
5151
)
5252
set(SUPPORTED_GPU_CUDA_12_1 ${SUPPORTED_GPU_CUDA_12_0})
5353
set(SUPPORTED_GPU_CUDA_12_2 ${SUPPORTED_GPU_CUDA_12_1})
@@ -349,7 +349,8 @@ macro(create_cuda_tests)
349349
# Tell clang to use libc++
350350
# We also need to add compiler's include path for cxxabi.h
351351
get_filename_component(_compiler_path ${CMAKE_CXX_COMPILER} DIRECTORY)
352-
set(_Stdlib_CPPFLAGS -stdlib=libc++ -I${_compiler_path}/../include/c++/v1 -DSTDLIB_VERSION=2017)
352+
set(_Stdlib_CPPFLAGS -stdlib=libc++ -I${_compiler_path}/../include/c++/v1
353+
-DSTDLIB_VERSION=2017 -D_ALLOW_UNSUPPORTED_LIBCPP)
353354
set(_Stdlib_LDFLAGS -stdlib=libc++)
354355
set(_Stdlib_Libs libcxx)
355356
create_cuda_test_variant(${_Std} "${_Cuda_Suffix}-${_Std_Suffix}-libc++")

External/HeCBench/CMakeLists.txt

Lines changed: 100 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,27 @@ option(TEST_SUITE_HECBENCH_FORCE_ALL "Execute all HeCBench tests, even those kno
88
set(TEST_SUITE_OFFLOADING_FLAGS --offload-arch=native CACHE STRING "Compiler arguments for OpenMP offloading")
99
set(TEST_SUITE_OFFLOADING_LDFLAGS --offload-arch=native CACHE STRING "Linker arguments for OpenMP offloading")
1010

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
1229
ace-omp/main.cpp
1330
1
14-
31+
1532
adam-omp/main.cpp
1633
1
1734
1
@@ -30,6 +47,37 @@ set(TEST_SUITE_HECBENCH_EXPECT_PASS
3047
1
3148
)
3249

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+
3381
function (add_hecbench LANG)
3482
if (NOT OpenMP_${LANG}_FOUND)
3583
message(FATAL_ERROR "OpenMP for ${LANG} not found")
@@ -41,12 +89,12 @@ function (add_hecbench LANG)
4189
get_filename_component(_directory "${_file}" DIRECTORY)
4290
set(_name "hecbench-${_directory}")
4391

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)
4593
message(STATUS "Skipping HeCBench Benchmark ${_file}")
4694
continue ()
4795
endif ()
4896

49-
list(FIND TEST_SUITE_HECBENCH_EXPECT_PASS "${_file}" _index)
97+
list(FIND CHOOSEN_LISTS "${_file}" _index)
5098
if (${_index} EQUAL -1)
5199
message(STATUS "Skipping HeCBench Benchmark ${_file}")
52100
continue ()
@@ -55,7 +103,7 @@ function (add_hecbench LANG)
55103
set(_args_for_benchmark "")
56104
set(IN_DIRECTORY FALSE)
57105

58-
foreach(item IN LISTS TEST_SUITE_HECBENCH_EXPECT_PASS)
106+
foreach(item IN LISTS CHOOSEN_LISTS)
59107
if(item MATCHES ".*-omp.*")
60108

61109
if(IN_DIRECTORY)
@@ -110,7 +158,6 @@ function (add_hecbench LANG)
110158
message(STATUS "Makefile not found in ${BENCHMARK_DIR}.")
111159
endif()
112160

113-
114161
set(_includedir "${TEST_SUITE_HECBENCH_ROOT}/src/${CFLAGS_INCLUDE}" )
115162

116163
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)
138185
return ()
139186
endif ()
140187

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+
141234
foreach (_lang in CXX)
142235
if (CMAKE_${_lang}_COMPILER)
143236
add_hecbench(${_lang})
144237
endif()
145238
endforeach ()
146239
endif ()
240+

External/HeCBench/README

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ This directory contains a CMakeLists.txt for the HeCBench so it can be built as
55
of the LLVM test-suite. Its sources are not part of the test-suite but
66
have to be fetched separately from https://github.com/zjin-lcf/HeCBench.
77

8+
The CMakeLists.txt contains internal greenlists and redlists that the user
9+
must declare which options to use with SYSTEM_GPU. The user is able to
10+
declare multiple lists to use.
11+
12+
here are all of the options:
13+
-amd (this is the greenlist that contains tests that passes)
14+
-amd_runtime_redlist
15+
-amd_compiler_redlist
16+
-amd_redlist(this is the combination of both runtime and compiler redlists)
17+
-nvidia (this is the greenlist that contains tests that passes)
18+
-nvidia_runtime_redlist
19+
-nvidia_compiler_redlist
20+
-nvidia_redlist(this is the combination of both runtime and compiler redlists)
21+
-intel (this is the greenlist that contains tests that passes)
22+
-intel_runtime_redlist
23+
-intel_compiler_redlist
24+
-intel_redlist(this is the combination of both runtime and compiler redlists)
25+
826
An example run is:
927

1028
$ cmake ../llvm-test-suite \
@@ -14,8 +32,9 @@ $ cmake ../llvm-test-suite \
1432
-DCMAKE_C_COMPILER=${HOME}/install/llvm-project/release/bin/clang \
1533
-DCMAKE_CXX_COMPILER=${HOME}/install/llvm-project/release/bin/clang++ \
1634
-DTEST_SUITE_SUBDIRS=External/HeCBench \
17-
-DTEST_SUITE_HECBENCH_OFFLOADING_CFLAGS=--offload-arch=native \
18-
-DTEST_SUITE_HECBENCH_OFFLOADING_LDFLAGS=--offload-arch=native;-lopenmptarget \
35+
-DTEST_SUITE__OFFLOADING_CFLAGS=--offload-arch=native \
36+
-DTEST_SUITE_OFFLOADING_LDFLAGS=--offload-arch=native;-lopenmptarget \
37+
-DSYSTEM_GPU="amd\;amd_runtime_redlist" \
1938
-DTEST_SUITE_LIT_FLAGS=-svj1
2039

2140
$ LD_LIBRARY_PATH=${HOME}/install/llvm-project/release/lib ninja check

0 commit comments

Comments
 (0)