Skip to content

Commit 163b45f

Browse files
ignore compile warnings
1 parent 9f72458 commit 163b45f

9 files changed

Lines changed: 100 additions & 70 deletions

File tree

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ IncludeCategories:
147147
- Regex: '<([A-Za-z0-9/_\-])+>'
148148
Priority: 5
149149
# Includes that made it this far are third-party headers and will be placed
150-
# below alpaka's includes
150+
# below alpaka's includes
151151
- Regex: '<([A-Za-z0-9./_\-])+>'
152152
Priority: 4
153153
# Macros: []

include/alpaka/block/sync/BlockSyncUniformCudaHipBuiltIn.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace alpaka
4949
# if defined(__HIP_ARCH_HAS_SYNC_THREAD_EXT__) && __HIP_ARCH_HAS_SYNC_THREAD_EXT__ == 0 && ALPAKA_COMP_HIP
5050
# if ALPAKA_COMP_CLANG
5151
# pragma clang diagnostic push
52-
# pragma clang diagnostic ignored "-Wattributes"
52+
# pragma clang diagnostic ignored "-Wunique-object-duplication"
5353
# endif
5454
// workaround for unsupported syncthreads_* operation on AMD hardware without sync extension
5555
__shared__ int tmp;

include/alpaka/core/DemangleTypeNames.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#pragma once
1212

13+
#include "alpaka/core/Config.hpp"
14+
1315
#include <array>
1416
/** The following compilers does not use std::source_location therefore we do not include the header.
1517
* Including the header source_location would lead into compiler issues under the following conditions.
@@ -79,8 +81,14 @@ namespace alpaka::core
7981
std::array<char, length + 1> storage{};
8082
std::copy(embeddedType.data() + start, embeddedType.data() + end, storage.data());
8183
storage[length] = '\0';
82-
84+
#if ALPAKA_COMP_CLANG
85+
# pragma clang diagnostic push
86+
# pragma clang diagnostic ignored "-Wnrvo"
87+
#endif
8388
return storage;
89+
#if ALPAKA_COMP_CLANG
90+
# pragma clang diagnostic pop
91+
#endif
8492
}
8593

8694
// Store the demangled type name as a null-terminated array of bytes.

include/alpaka/mem/view/Traits.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,14 @@ namespace alpaka
9797
if constexpr(dim > 1)
9898
for(TIdx i = TDim::value - 1; i > 0; i--)
9999
pitchBytes[i - 1] = extent[i] * pitchBytes[i];
100+
#if ALPAKA_COMP_CLANG
101+
# pragma clang diagnostic push
102+
# pragma clang diagnostic ignored "-Wunique-object-duplication"
103+
#endif
100104
return pitchBytes;
105+
#if ALPAKA_COMP_CLANG
106+
# pragma clang diagnostic pop
107+
#endif
101108
}
102109

103110
//! Calculate the pitches from the extents and the one-dimensional pitch.

include/alpaka/workdiv/WorkDivHelpers.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,14 @@ namespace alpaka
161161
Vec r;
162162
for(DimLoopInd i(0u); i < TDim::value; ++i)
163163
r[i] = core::divCeil(gridElemExtent[i], clippedThreadElemExtent[i]);
164+
#if ALPAKA_COMP_CLANG
165+
# pragma clang diagnostic push
166+
# pragma clang diagnostic ignored "-Wunique-object-duplication"
167+
#endif
164168
return r;
169+
#if ALPAKA_COMP_CLANG
170+
# pragma clang diagnostic pop
171+
#endif
165172
}();
166173

167174
///////////////////////////////////////////////////////////////////
@@ -279,7 +286,14 @@ namespace alpaka
279286
Vec r;
280287
for(DimLoopInd i = 0; i < TDim::value; ++i)
281288
r[i] = core::divCeil(gridThreadExtent[i], blockThreadExtent[i]);
289+
#if ALPAKA_COMP_CLANG
290+
# pragma clang diagnostic push
291+
# pragma clang diagnostic ignored "-Wunique-object-duplication"
292+
#endif
282293
return r;
294+
#if ALPAKA_COMP_CLANG
295+
# pragma clang diagnostic pop
296+
#endif
283297
}();
284298

285299

script/before_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ else
132132

133133
if [ "$alpaka_SYCL_ONEAPI_CPU" == "OFF" ]; then
134134
echo_yellow "<DEFAULT: SYCL environment variables for enabled backend and disabled CPU device>"
135-
export alpaka_SYCL_ONEAPI_CPU_ISA=""
135+
export alpaka_SYCL_ONEAPI_CPU_ISA=""
136136
fi
137137
if [ "$alpaka_SYCL_ONEAPI_FPGA" == "OFF" ]; then
138138
echo_yellow "<DEFAULT: SYCL environment variables for enabled backend and disabled FPGA device>"

script/job_generator/alpaka_filter.py

Lines changed: 56 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,34 @@
1717

1818

1919
def alpaka_post_filter(row: List) -> bool:
20+
# debug builds with clang 15 and 16 as CUDA compiler produce a compiler error
21+
# see here: https://github.com/llvm/llvm-project/issues/58491
22+
if (
23+
is_in_row(row, BUILD_TYPE)
24+
and row[param_map[BUILD_TYPE]][VERSION] == CMAKE_DEBUG
25+
and row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA)
26+
):
27+
for clang_cuda_version in ["15", "16", "17"]:
28+
if row_check_version(row, HOST_COMPILER, "==", clang_cuda_version):
29+
return False
30+
31+
# Debug builds with nvcc <= 11.6 produce compiler errors
32+
if (
33+
is_in_row(row, BUILD_TYPE)
34+
and row[param_map[BUILD_TYPE]][VERSION] == CMAKE_DEBUG
35+
and row_check_name(row, DEVICE_COMPILER, "==", NVCC)
36+
and row_check_version(row, DEVICE_COMPILER, "<=", "11.6")
37+
):
38+
return False
39+
40+
# because of a compiler bug, we disable mdspan for NVCC <= 11.2
41+
if (
42+
row_check_version(row, MDSPAN, "==", ON_VER)
43+
and row_check_name(row, DEVICE_COMPILER, "==", NVCC)
44+
and row_check_version(row, DEVICE_COMPILER, "<=", "11.2")
45+
):
46+
return False
47+
2048
# OpenMP is not supported for clang as cuda compiler
2149
# https://github.com/alpaka-group/alpaka/issues/639
2250
if row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA) and (
@@ -25,6 +53,18 @@ def alpaka_post_filter(row: List) -> bool:
2553
):
2654
return False
2755

56+
# there is a compiler bug in GCC 11.4 which avoids working with NVCC 11.5
57+
if (
58+
row_check_name(row, DEVICE_COMPILER, "==", NVCC)
59+
and (
60+
row_check_version(row, DEVICE_COMPILER, "==", "11.4")
61+
or row_check_version(row, DEVICE_COMPILER, "==", "11.5")
62+
)
63+
and row_check_name(row, HOST_COMPILER, "==", GCC)
64+
and row_check_version(row, HOST_COMPILER, "==", "11")
65+
):
66+
return False
67+
2868
# cmake 3.24 and older does not support C++20 for nvcc
2969
if (
3070
row_check_name(row, DEVICE_COMPILER, "==", NVCC)
@@ -60,42 +100,24 @@ def alpaka_post_filter(row: List) -> bool:
60100
):
61101
return False
62102

63-
# Clang-CUDA has three support levels, full support, partial support, and if newer, then it throws a warning and continues.
64-
# We only test unitl the partially supported version in the CI
65-
66-
# Clang-CUDA 16 and below officially only partially support as a maximum up to CUDA SDK 11.8, so we disable CI tests for these
67-
if row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA) and row_check_version(row, DEVICE_COMPILER, "<=", "16"):
68-
return False
69-
70-
# Clang-CUDA 17 fully supports up to CUDA SDK 11.8 and partially upto 12.1
71-
if (
72-
row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA)
73-
and row_check_version(row, DEVICE_COMPILER, "==", "17")
74-
and row_check_backend_version(row, ALPAKA_ACC_GPU_CUDA_ENABLE, ">", "12.1")
75-
):
76-
return False
77-
78-
# Clang-CUDA 18 fully supports up to CUDA SDK 12.3 (unless it is 18.0 which fully supports 12.1 only partially supports 12.3)
79-
if (
80-
row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA)
81-
and row_check_version(row, DEVICE_COMPILER, "==", "18")
82-
and row_check_backend_version(row, ALPAKA_ACC_GPU_CUDA_ENABLE, ">", "12.3")
83-
):
84-
return False
85-
86-
# Clang-CUDA 19 fully supports up to CUDA SDK 12.3 and partially upto 12.5
87-
if (
88-
row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA)
89-
and row_check_version(row, DEVICE_COMPILER, "==", "19")
90-
and row_check_backend_version(row, ALPAKA_ACC_GPU_CUDA_ENABLE, ">", "12.5")
91-
):
92-
return False
103+
# Clang-CUDA 18 only supports up to CUDA SDK 12.1
104+
# if (
105+
# row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA)
106+
# and row_check_version(row, DEVICE_COMPILER, "==", "18")
107+
# and row_check_backend_version(row, ALPAKA_ACC_GPU_CUDA_ENABLE, ">", "12.1")
108+
# ):
109+
# return False
93110

94-
# Clang-CUDA 20 fully supports up to CUDA SDK 12.3 and partially upto 12.8
111+
# TODO(SimeonEhrig): disable Clang 18 and 19 as Clang-CUDA because of
112+
# several bugs will be fixed in alpaka 2.0.0
95113
if (
96114
row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA)
97-
and row_check_version(row, DEVICE_COMPILER, "==", "20")
98-
and row_check_backend_version(row, ALPAKA_ACC_GPU_CUDA_ENABLE, ">", "12.8")
115+
and (
116+
row_check_version(row, DEVICE_COMPILER, "==", "18")
117+
or row_check_version(row, DEVICE_COMPILER, "==", "19")
118+
or row_check_version(row, DEVICE_COMPILER, "==", "20")
119+
)
120+
and row_check_backend_version(row, ALPAKA_ACC_GPU_CUDA_ENABLE, "!=", OFF_VER)
99121
):
100122
return False
101123

@@ -121,7 +143,7 @@ def alpaka_post_filter(row: List) -> bool:
121143
# - HIP 6.0 until 6.2
122144
# - If Clang 14 and older is used
123145
# - If CUDA 12.3 and older is used, because the CUDA versions does not support the libstdc++ 13
124-
# which is provided by the Ubuntu host compiler GCC 13
146+
# which is provided by the Ubuntu host compiler GCC 13
125147
# the ROCm Ubuntu support is handled by the alpaka-job-matrix-library
126148
if row_check_version(row, UBUNTU, "==", "22.04"):
127149
for compiler_type in (HOST_COMPILER, DEVICE_COMPILER):

script/job_generator/job_generator.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,15 @@ def get_args() -> argparse.Namespace:
4242
Returns:
4343
argparse.Namespace: The commandline arguments.
4444
"""
45-
parser = argparse.ArgumentParser(
46-
description="Calculate job matrix and create GitLab CI .yml."
47-
)
45+
parser = argparse.ArgumentParser(description="Calculate job matrix and create GitLab CI .yml.")
4846

49-
parser.add_argument(
50-
"version", type=float, help="Version number of the used CI container."
51-
)
47+
parser.add_argument("version", type=float, help="Version number of the used CI container.")
5248
parser.add_argument(
5349
"--print-combinations",
5450
action="store_true",
5551
help="Display combination matrix.",
5652
)
57-
parser.add_argument(
58-
"--verify", action="store_true", help="Verify generated combination matrix"
59-
)
53+
parser.add_argument("--verify", action="store_true", help="Verify generated combination matrix")
6054
parser.add_argument(
6155
"-a",
6256
"--all",
@@ -138,7 +132,7 @@ def get_args() -> argparse.Namespace:
138132
)
139133

140134
add_job_parameters(job_matrix)
141-
135+
142136
job_matrix = add_sycl_fpga_jobs(job_matrix)
143137

144138
if args.print_combinations or args.all:
@@ -182,9 +176,7 @@ def get_args() -> argparse.Namespace:
182176
if striped_line.strip().startswith(COMMIT_MESSAGE_FILTER_PREFIX):
183177
filter_regix = striped_line[len(COMMIT_MESSAGE_FILTER_PREFIX) :].strip()
184178
if striped_line.startswith(COMMIT_MESSAGE_REORDER_PREFIX):
185-
reorder_regix = striped_line[
186-
len(COMMIT_MESSAGE_REORDER_PREFIX) :
187-
].strip()
179+
reorder_regix = striped_line[len(COMMIT_MESSAGE_REORDER_PREFIX) :].strip()
188180

189181
if filter_regix:
190182
job_matrix_yaml = filter_job_list(job_matrix_yaml, filter_regix)

script/readme_generator/generate_supported_compilers.py

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ def config_validator(conf: Dict[str, Dict[str, str]]) -> bool:
6363
print_red(f"[ERROR]: {compiler_name} misses entry {expected_entry}")
6464
return False
6565
if "state" not in compiler_conf[expected_entry]:
66-
print_red(
67-
f"[ERROR]: {compiler_name}/{expected_entry} misses state entry"
68-
)
66+
print_red(f"[ERROR]: {compiler_name}/{expected_entry} misses state entry")
6967
return False
7068
if compiler_conf[expected_entry]["state"] not in get_known_state_names():
7169
print_red(
@@ -135,13 +133,10 @@ def render_table(conf) -> str:
135133
if __name__ == "__main__":
136134
script_path = os.path.dirname(os.path.realpath(__file__))
137135
default_config_path = os.path.join(script_path, "supported_compilers.json")
138-
default_readme_path = os.path.abspath(
139-
os.path.join(script_path, "../..", "README.md")
140-
)
136+
default_readme_path = os.path.abspath(os.path.join(script_path, "../..", "README.md"))
141137

142138
parser = argparse.ArgumentParser(
143-
description="Creates a Markdown table for the supported compilers from "
144-
"the configuration file."
139+
description="Creates a Markdown table for the supported compilers from " "the configuration file."
145140
)
146141
parser.add_argument(
147142
"-c",
@@ -209,18 +204,10 @@ def render_table(conf) -> str:
209204
sys.exit(0)
210205
else:
211206
print()
212-
print(
213-
"Please the check the configuration file "
214-
"'./script/readme_generator/supported_compilers.json'"
215-
)
216-
print(
217-
"Generate a new table with "
218-
"'./script/readme_generator/generate_supported_compilers.py'"
219-
)
207+
print("Please the check the configuration file " "'./script/readme_generator/supported_compilers.json'")
208+
print("Generate a new table with " "'./script/readme_generator/generate_supported_compilers.py'")
220209
print("Copy the output in the README.md")
221210
print(
222-
"Verify the README.md with "
223-
"'./script/readme_generator/generate_supported_compilers.py "
224-
"--verify'"
211+
"Verify the README.md with " "'./script/readme_generator/generate_supported_compilers.py " "--verify'"
225212
)
226213
sys.exit(1)

0 commit comments

Comments
 (0)