Skip to content

Commit 28ef9a0

Browse files
committed
Merge remote-tracking branch 'upstream/main' into propeller_bb_hash_2
2 parents d15e3af + 7102ff4 commit 28ef9a0

File tree

2,332 files changed

+243870
-61963
lines changed

Some content is hidden

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

2,332 files changed

+243870
-61963
lines changed

.ci/premerge_advisor_explain.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
"""Script for getting explanations from the premerge advisor."""
5+
6+
import argparse
7+
import os
8+
import platform
9+
import sys
10+
11+
import requests
12+
13+
import generate_test_report_lib
14+
15+
PREMERGE_ADVISOR_URL = (
16+
"http://premerge-advisor.premerge-advisor.svc.cluster.local:5000/explain"
17+
)
18+
19+
20+
def main(commit_sha: str, build_log_files: list[str]):
21+
junit_objects, ninja_logs = generate_test_report_lib.load_info_from_files(
22+
build_log_files
23+
)
24+
test_failures = generate_test_report_lib.get_failures(junit_objects)
25+
current_platform = f"{platform.system()}-{platform.machine()}".lower()
26+
explanation_request = {
27+
"base_commit_sha": commit_sha,
28+
"platform": current_platform,
29+
"failures": [],
30+
}
31+
if test_failures:
32+
for _, failures in test_failures.items():
33+
for name, failure_messsage in failures:
34+
explanation_request["failures"].append(
35+
{"name": name, "message": failure_messsage}
36+
)
37+
else:
38+
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
39+
for name, failure_message in ninja_failures:
40+
explanation_request["failures"].append(
41+
{"name": name, "message": failure_message}
42+
)
43+
advisor_response = requests.get(PREMERGE_ADVISOR_URL, json=explanation_request)
44+
if advisor_response.status_code == 200:
45+
print(advisor_response.json())
46+
else:
47+
print(advisor_response.reason)
48+
49+
50+
if __name__ == "__main__":
51+
parser = argparse.ArgumentParser()
52+
parser.add_argument("commit_sha", help="The base commit SHA for the test.")
53+
parser.add_argument(
54+
"build_log_files", help="Paths to JUnit report files and ninja logs.", nargs="*"
55+
)
56+
args = parser.parse_args()
57+
58+
# Skip looking for results on AArch64 for now because the premerge advisor
59+
# service is not available on AWS currently.
60+
if platform.machine() == "arm64":
61+
sys.exit(0)
62+
63+
main(args.commit_sha, args.build_log_files)

.ci/premerge_advisor_upload.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ def main(commit_sha, workflow_run_number, build_log_files):
3232
"platform": current_platform,
3333
}
3434
if test_failures:
35-
for name, failure_message in test_failures:
36-
failure_info["failures"].append({"name": name, "message": failure_message})
35+
for _, failures in test_failures.items():
36+
for name, failure_message in failures:
37+
failure_info["failures"].append(
38+
{"name": name, "message": failure_message}
39+
)
3740
else:
3841
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
3942
for name, failure_message in ninja_failures:

.ci/utils.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ function at-exit {
4343
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_upload.py \
4444
$(git rev-parse HEAD~1) $GITHUB_RUN_NUMBER \
4545
"${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log
46+
if [[ "$GITHUB_ACTIONS" != "" ]]; then
47+
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_explain.py \
48+
$(git rev-parse HEAD~1) "${BUILD_DIR}"/test-results.*.xml \
49+
"${MONOREPO_ROOT}"/ninja*.log
50+
fi
4651
fi
4752
}
4853
trap at-exit EXIT

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@
5353
/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.* @matthias-springer
5454
/mlir/lib/Interfaces/DestinationStyleOpInterface.* @matthias-springer
5555

56+
# AMDGPU and ROCDL dialects in MLIR.
57+
/mlir/include/mlir/Dialect/AMDGPU @krzysz00 @kuhar
58+
/mlir/lib/Dialect/AMDGPU @krzysz00 @kuhar
59+
/mlir/lib/Conversion/*AMDGPU* @krzysz00 @kuhar
60+
/mlir/lib/Conversion/*ToROCDL @krzysz00 @kuhar
61+
/mlir/include/mlir/Dialect/LLVMIR/ROCDL* @krzysz00 @kuhar
62+
5663
# Bufferization Dialect in MLIR.
5764
/mlir/include/mlir/Dialect/Bufferization @matthias-springer
5865
/mlir/lib/Dialect/Bufferization @matthias-springer

.github/workflows/containers/github-action-ci-tooling/Dockerfile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
ARG LLVM_VERSION=21.1.0
2+
# FIXME: Use "${LLVM_VERSION%%.*}" instead of "LLVM_VERSION_MAJOR" once we update runners to Ubuntu-26.04 with Buildah >= 1.37
3+
ARG LLVM_VERSION_MAJOR=21
24

35
FROM docker.io/library/ubuntu:24.04 AS llvm-downloader
46
ARG LLVM_VERSION
7+
ARG LLVM_VERSION_MAJOR
58

69
RUN apt-get update && \
710
apt-get install -y wget xz-utils && \
811
wget -O llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/LLVM-${LLVM_VERSION}-Linux-X64.tar.xz && \
912
mkdir -p /llvm-extract && \
1013
tar -xvJf llvm.tar.xz -C /llvm-extract \
1114
# Only unpack these tools to save space on Github runner.
15+
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-${LLVM_VERSION_MAJOR} \
16+
LLVM-${LLVM_VERSION}-Linux-X64/lib/clang/${LLVM_VERSION_MAJOR}/include \
1217
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \
1318
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
1419
LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format && \
@@ -50,12 +55,27 @@ RUN pip install -r requirements_formatting.txt --break-system-packages && \
5055

5156
FROM base AS ci-container-code-lint
5257
ARG LLVM_VERSION
58+
ARG LLVM_VERSION_MAJOR
5359

54-
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy ${LLVM_SYSROOT}/bin/
60+
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \
61+
/llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-${LLVM_VERSION_MAJOR} \
62+
${LLVM_SYSROOT}/bin/
63+
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/lib/clang/${LLVM_VERSION_MAJOR}/include \
64+
${LLVM_SYSROOT}/lib/clang/${LLVM_VERSION_MAJOR}/include
5565
COPY clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py ${LLVM_SYSROOT}/bin/clang-tidy-diff.py
5666

67+
RUN ln -s ${LLVM_SYSROOT}/bin/clang-${LLVM_VERSION_MAJOR} ${LLVM_SYSROOT}/bin/clang && \
68+
ln -s ${LLVM_SYSROOT}/bin/clang ${LLVM_SYSROOT}/bin/clang++
69+
5770
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
5871

72+
RUN apt-get update && \
73+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
74+
cmake \
75+
ninja-build && \
76+
apt-get clean && \
77+
rm -rf /var/lib/apt/lists/*
78+
5979
# Install dependencies for 'pr-code-lint.yml' job
6080
COPY llvm/utils/git/requirements_linting.txt requirements_linting.txt
6181
RUN pip install -r requirements_linting.txt --break-system-packages && \

.github/workflows/libcxx-run-benchmarks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,21 @@ jobs:
6464
path: repo # Avoid nuking the workspace, where we have the Python virtualenv
6565

6666
- name: Run baseline
67+
env:
68+
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
6769
run: |
6870
source .venv/bin/activate && cd repo
6971
python -m pip install -r libcxx/utils/requirements.txt
7072
baseline_commit=$(git merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }})
71-
./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
73+
./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed "$BENCHMARKS"
7274
./libcxx/utils/consolidate-benchmarks build/baseline | tee baseline.lnt
7375
7476
- name: Run candidate
77+
env:
78+
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
7579
run: |
7680
source .venv/bin/activate && cd repo
77-
./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
81+
./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed "$BENCHMARKS"
7882
./libcxx/utils/consolidate-benchmarks build/candidate | tee candidate.lnt
7983
8084
- name: Compare baseline and candidate runs

.github/workflows/pr-code-lint.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run:
2121
shell: bash
2222
container:
23-
image: 'ghcr.io/llvm/ci-ubuntu-24.04:latest'
23+
image: 'ghcr.io/llvm/ci-ubuntu-24.04-lint'
2424
timeout-minutes: 60
2525
concurrency:
2626
group: ${{ github.workflow }}-${{ github.ref }}
@@ -31,6 +31,11 @@ jobs:
3131
with:
3232
fetch-depth: 2
3333

34+
# FIXME: same as in ".github/workflows/pr-code-format.yml"
35+
- name: Set Safe Directory
36+
run: |
37+
chown -R root $(pwd)
38+
3439
- name: Get changed files
3540
id: changed-files
3641
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
@@ -46,22 +51,6 @@ jobs:
4651
run: |
4752
echo "Changed files:"
4853
echo "$CHANGED_FILES"
49-
50-
# The clang tidy version should always be upgraded to the first version
51-
# of a release cycle (x.1.0) or the last version of a release cycle, or
52-
# if there have been relevant clang-format backports.
53-
- name: Install clang-tidy
54-
uses: aminya/setup-cpp@a276e6e3d1db9160db5edc458e99a30d3b109949 # v1.7.1
55-
with:
56-
clang-tidy: 21.1.0
57-
58-
- name: Setup Python env
59-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
60-
with:
61-
python-version: '3.13'
62-
63-
- name: Install Python dependencies
64-
run: python3 -m pip install -r llvm/utils/git/requirements_linting.txt
6554
6655
# TODO: create special mapping for 'codegen' targets, for now build predefined set
6756
# TODO: add entrypoint in 'compute_projects.py' that only adds a project and its direct dependencies

.github/workflows/premerge.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
with:
6363
fetch-depth: 2
6464
- name: Build and Test
65+
timeout-minutes: 120
6566
continue-on-error: ${{ runner.arch == 'ARM64' }}
6667
run: |
6768
git config --global --add safe.directory '*'
@@ -149,6 +150,7 @@ jobs:
149150
echo "windows-runtimes=${runtimes_to_build}" >> $GITHUB_OUTPUT
150151
echo "windows-runtimes-check-targets=${runtimes_check_targets}" >> $GITHUB_OUTPUT
151152
- name: Build and Test
153+
timeout-minutes: 180
152154
if: ${{ steps.vars.outputs.windows-projects != '' }}
153155
shell: cmd
154156
run: |
@@ -191,7 +193,7 @@ jobs:
191193
uses: llvm/actions/install-ninja@main
192194
- name: Build and Test
193195
run: |
194-
source <(git diff --name-only HEAD~2..HEAD | python3 .ci/compute_projects.py)
196+
source <(git diff --name-only HEAD~1...HEAD | python3 .ci/compute_projects.py)
195197
196198
if [[ "${projects_to_build}" == "" ]]; then
197199
echo "No projects to build"

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ jobs:
230230
cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
231231
${{ needs.prepare.outputs.target-cmake-flags }} \
232232
-C clang/cmake/caches/Release.cmake \
233-
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
234233
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
235234
236235
- name: Build

.github/workflows/release-documentation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
description: 'Upload documentation'
2626
required: false
2727
type: boolean
28+
secrets:
29+
WWW_RELEASES_TOKEN:
30+
description: "Secret used to create a PR with the documentation changes."
31+
required: false
2832

2933
jobs:
3034
release-documentation:

0 commit comments

Comments
 (0)