Skip to content

Commit a26049a

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into addc
2 parents 43ecf76 + 34a2fac commit a26049a

File tree

12,410 files changed

+714643
-220099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

12,410 files changed

+714643
-220099
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ echo "Directories modified:" >&2
5353
echo "$modified_dirs" >&2
5454

5555
function compute-projects-to-test() {
56+
isForWindows=$1
57+
shift
5658
projects=${@}
5759
for project in ${projects}; do
5860
echo "${project}"
@@ -63,20 +65,44 @@ function compute-projects-to-test() {
6365
done
6466
;;
6567
llvm)
66-
for p in bolt clang clang-tools-extra flang lld lldb mlir polly; do
68+
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
6769
echo $p
6870
done
71+
# Flang is not stable in Windows CI at the moment
72+
if [[ $isForWindows == 0 ]]; then
73+
echo flang
74+
fi
6975
;;
7076
clang)
71-
for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
77+
# lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
78+
for p in clang-tools-extra compiler-rt cross-project-tests; do
7279
echo $p
7380
done
7481
;;
7582
clang-tools-extra)
7683
echo libc
7784
;;
7885
mlir)
79-
echo flang
86+
# Flang is not stable in Windows CI at the moment
87+
if [[ $isForWindows == 0 ]]; then
88+
echo flang
89+
fi
90+
;;
91+
*)
92+
# Nothing to do
93+
;;
94+
esac
95+
done
96+
}
97+
98+
function compute-runtimes-to-test() {
99+
projects=${@}
100+
for project in ${projects}; do
101+
case ${project} in
102+
clang)
103+
for p in libcxx libcxxabi libunwind; do
104+
echo $p
105+
done
80106
;;
81107
*)
82108
# Nothing to do
@@ -128,7 +154,6 @@ function exclude-linux() {
128154
for project in ${projects}; do
129155
case ${project} in
130156
cross-project-tests) ;; # tests failing
131-
lldb) ;; # tests failing
132157
openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410
133158
*)
134159
echo "${project}"
@@ -145,7 +170,7 @@ function exclude-windows() {
145170
compiler-rt) ;; # tests taking too long
146171
openmp) ;; # TODO: having trouble with the Perl installation
147172
libc) ;; # no Windows support
148-
lldb) ;; # tests failing
173+
lldb) ;; # custom environment requirements (https://github.com/llvm/llvm-project/pull/94208#issuecomment-2146256857)
149174
bolt) ;; # tests are not supported yet
150175
*)
151176
echo "${project}"
@@ -178,8 +203,17 @@ function check-targets() {
178203
cross-project-tests)
179204
echo "check-cross-project"
180205
;;
206+
libcxx)
207+
echo "check-cxx"
208+
;;
209+
libcxxabi)
210+
echo "check-cxxabi"
211+
;;
212+
libunwind)
213+
echo "check-unwind"
214+
;;
181215
lldb)
182-
echo "check-all" # TODO: check-lldb may not include all the LLDB tests?
216+
echo "check-lldb"
183217
;;
184218
pstl)
185219
echo "check-all"
@@ -207,17 +241,6 @@ if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cma
207241
EOF
208242
fi
209243

210-
# If clang changed.
211-
if echo "$modified_dirs" | grep -q -E "^(clang)$"; then
212-
cat <<EOF
213-
- trigger: "clang-ci"
214-
build:
215-
message: "${buildMessage}"
216-
commit: "${BUILDKITE_COMMIT}"
217-
branch: "${BUILDKITE_BRANCH}"
218-
EOF
219-
fi
220-
221244
# Generic pipeline for projects that have not defined custom steps.
222245
#
223246
# Individual projects should instead define the pre-commit CI tests that suits their
@@ -227,11 +250,15 @@ fi
227250
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
228251
modified_projects="$(keep-modified-projects ${all_projects})"
229252

230-
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_projects}))
253+
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
231254
linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
232255
linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
233256

234-
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects}))
257+
linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
258+
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
259+
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
260+
261+
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
235262
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
236263
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
237264

@@ -255,7 +282,7 @@ if [[ "${linux_projects}" != "" ]]; then
255282
CC: 'clang'
256283
CXX: 'clang++'
257284
commands:
258-
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"'
285+
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"'
259286
EOF
260287
fi
261288

.ci/monolithic-linux.sh

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set -o pipefail
1818

1919
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
2020
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
21+
INSTALL_DIR="${BUILD_DIR}/install"
2122
rm -rf "${BUILD_DIR}"
2223

2324
ccache --zero-stats
@@ -38,6 +39,7 @@ targets="${2}"
3839

3940
echo "--- cmake"
4041
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
42+
pip install -q -r "${MONOREPO_ROOT}"/lldb/test/requirements.txt
4143
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4244
-D LLVM_ENABLE_PROJECTS="${projects}" \
4345
-G Ninja \
@@ -49,8 +51,79 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4951
-D LLVM_ENABLE_LLD=ON \
5052
-D CMAKE_CXX_FLAGS=-gmlt \
5153
-D LLVM_CCACHE_BUILD=ON \
52-
-D MLIR_ENABLE_BINDINGS_PYTHON=ON
54+
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
55+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
5356

5457
echo "--- ninja"
5558
# Targets are not escaped as they are passed as separate arguments.
5659
ninja -C "${BUILD_DIR}" -k 0 ${targets}
60+
61+
runtimes="${3}"
62+
runtime_targets="${4}"
63+
64+
# Compiling runtimes with just-built Clang and running their tests
65+
# as an additional testing for Clang.
66+
if [[ "${runtimes}" != "" ]]; then
67+
if [[ "${runtime_targets}" == "" ]]; then
68+
echo "Runtimes to build are specified, but targets are not."
69+
exit 1
70+
fi
71+
72+
echo "--- ninja install-clang"
73+
74+
ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers
75+
76+
RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes"
77+
INSTALL_DIR="${BUILD_DIR}/install"
78+
mkdir -p ${RUNTIMES_BUILD_DIR}
79+
80+
echo "--- cmake runtimes C++03"
81+
82+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
83+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
84+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
85+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
86+
-D LIBCXX_CXX_ABI=libcxxabi \
87+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
88+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
89+
-D LIBCXX_TEST_PARAMS="std=c++03" \
90+
-D LIBCXXABI_TEST_PARAMS="std=c++03"
91+
92+
echo "--- ninja runtimes C++03"
93+
94+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
95+
96+
echo "--- cmake runtimes C++26"
97+
98+
rm -rf "${RUNTIMES_BUILD_DIR}"
99+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
100+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
101+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
102+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
103+
-D LIBCXX_CXX_ABI=libcxxabi \
104+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
105+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
106+
-D LIBCXX_TEST_PARAMS="std=c++26" \
107+
-D LIBCXXABI_TEST_PARAMS="std=c++26"
108+
109+
echo "--- ninja runtimes C++26"
110+
111+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
112+
113+
echo "--- cmake runtimes clang modules"
114+
115+
rm -rf "${RUNTIMES_BUILD_DIR}"
116+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
117+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
118+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
119+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
120+
-D LIBCXX_CXX_ABI=libcxxabi \
121+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
122+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
123+
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
124+
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang"
125+
126+
echo "--- ninja runtimes clang modules"
127+
128+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
129+
fi

.ci/monolithic-windows.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
4444
# see https://github.com/llvm/llvm-project/pull/82393 and
4545
# https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/40
4646
# for further information.
47+
# We limit the number of parallel compile jobs to 24 control memory
48+
# consumption and improve build reliability.
4749
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4850
-D LLVM_ENABLE_PROJECTS="${projects}" \
4951
-G Ninja \
@@ -58,7 +60,9 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
5860
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
5961
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
6062
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
61-
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
63+
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
64+
-D LLVM_PARALLEL_COMPILE_JOBS=16 \
65+
-D LLVM_PARALLEL_LINK_JOBS=4
6266

6367
echo "--- ninja"
6468
# Targets are not escaped as they are passed as separate arguments.

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81
8181

8282
# [NFC] clang-format utils/TableGen (#80973)
8383
b9079baaddfed5e604fbfaa1d81a7a1c38e78c26
84+
85+
# [libc++][NFC] Run clang-format on libcxx/include again (#95874)
86+
e2c2ffbe7a1b5d9e32a2ce64279475b50c4cba5b

.github/CODEOWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ sycl/test-e2e/KernelFusion @intel/dpcpp-kernel-fusion-reviewers
126126
sycl/include/sycl/ext/oneapi/matrix/ @intel/sycl-matrix-reviewers
127127
sycl/test-e2e/Matrix @intel/sycl-matrix-reviewers
128128
sycl/test/matrix @intel/sycl-matrix-reviewers
129+
sycl/test/check_device_code/matrix @intel/sycl-matrix-reviewers
129130

130131
# Native CPU
131132
llvm/**/*SYCLNativeCPU* @intel/dpcpp-nativecpu-pi-reviewers
@@ -164,3 +165,15 @@ sycl/test-e2e/DeviceCodeSplit/ @intel/dpcpp-tools-reviewers
164165
sycl/test-e2e/SeparateCompile/ @intel/dpcpp-tools-reviewers
165166
sycl/test-e2e/Printf/ @intel/dpcpp-tools-reviewers @intel/llvm-reviewers-runtime
166167
sycl/test-e2e/SpecConstants/ @intel/dpcpp-tools-reviewers
168+
169+
# Sanitizer
170+
clang/lib/Driver/SanitizerArgs.cpp @intel/dpcpp-sanitizers-review
171+
libdevice/sanitizer_utils.cpp @intel/dpcpp-sanitizers-review
172+
libdevice/include/asan_libdevice.hpp @intel/dpcpp-sanitizers-review
173+
libdevice/include/sanitizer_utils.hpp @intel/dpcpp-sanitizers-review
174+
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @intel/dpcpp-sanitizers-review
175+
sycl/test-e2e/AddressSanitizer/ @intel/dpcpp-sanitizers-review
176+
llvm/test/Instrumentation/AddressSanitizer/ @intel/dpcpp-sanitizers-review
177+
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h @intel/dpcpp-sanitizers-review
178+
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h @intel/dpcpp-sanitizers-review
179+
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h @intel/dpcpp-sanitizers-review

.github/ISSUE_TEMPLATE/1-bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: To reproduce
1616
description: Please describe the steps to reproduce the behavior
17-
placeholder: |
17+
value: |
1818
1. Include a code snippet that is as short as possible
1919
2. Specify the command which should be used to compile the program
2020
3. Specify the command which should be used to launch the program
@@ -26,7 +26,7 @@ body:
2626
attributes:
2727
label: Environment
2828
description: Please complete the following information
29-
placeholder: |
29+
value: |
3030
- OS: [e.g Windows/Linux]
3131
- Target device and vendor: [e.g. Intel GPU]
3232
- DPC++ version: [e.g. commit hash or output of `clang++ --version`]

.github/ISSUE_TEMPLATE/2-bug-report-cuda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body:
1717
attributes:
1818
label: To reproduce
1919
description: Please describe the steps to reproduce the behavior
20-
placeholder: |
20+
value: |
2121
1. Include code snippet as short as possible
2222
2. Specify the command which should be used to compile the program
2323
3. Specify the command which should be used to launch the program
@@ -29,7 +29,7 @@ body:
2929
attributes:
3030
label: Environment
3131
description: Please complete the following information
32-
placeholder: |
32+
value: |
3333
- OS: [e.g Windows/Linux]
3434
- Target device and vendor: [e.g. Nvidia GPU]
3535
- DPC++ version: [e.g. commit hash or output of `clang++ --version`]

.github/ISSUE_TEMPLATE/3-bug-report-hip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body:
1717
attributes:
1818
label: To reproduce
1919
description: Please describe the steps to reproduce the behavior
20-
placeholder: |
20+
value: |
2121
1. Include code snippet as short as possible
2222
2. Specify the command which should be used to compile the program
2323
3. Specify the command which should be used to launch the program
@@ -29,7 +29,7 @@ body:
2929
attributes:
3030
label: Environment
3131
description: Please complete the following information
32-
placeholder: |
32+
value: |
3333
- OS: [e.g Windows/Linux]
3434
- Target device and vendor: [e.g. AMD GPU]
3535
- DPC++ version: [e.g. commit hash or output of `clang++ --version`]

0 commit comments

Comments
 (0)