Skip to content

Commit e284110

Browse files
authored
Merge branch 'main' into reuse-input-sparsity-pattern
2 parents 9230019 + c65db1f commit e284110

7,358 files changed

Lines changed: 443892 additions & 218659 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
/libcxx/ @llvm/reviewers-libcxx
1616
/libcxxabi/ @llvm/reviewers-libcxxabi
1717
/libunwind/ @llvm/reviewers-libunwind
18-
/runtimes/ @llvm/reviewers-libcxx
1918

2019
/llvm/lib/Analysis/BasicAliasAnalysis.cpp @nikic
2120
/llvm/lib/Analysis/HashRecognize.cpp @artagnon @pfusik

.github/new-prs-labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,7 @@ backend:SPIR-V:
961961
- llvm/test/CodeGen/SPIRV/**
962962
- llvm/test/Frontend/HLSL/**
963963
- llvm/docs/SPIRVUsage.rst
964+
- llvm/tools/spirv-tools/**
964965

965966
mlgo:
966967
- changed-files:

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,20 @@ jobs:
8888
cpp_compiler: clang++-23
8989
target: armv7em-none-eabi
9090
testing: SKIP
91-
- name: baremetal-armv8m
91+
- name: baremetal-armv8m-softfp
9292
os: ubuntu-24.04
9393
build_type: MinSizeRel
9494
c_compiler: clang-23
9595
cpp_compiler: clang++-23
9696
target: armv8m.main-none-eabi
9797
testing: SKIP
98+
- name: baremetal-armv8m-hard
99+
os: ubuntu-24.04
100+
build_type: MinSizeRel
101+
c_compiler: clang-23
102+
cpp_compiler: clang++-23
103+
target: armv8m.main-none-eabihf
104+
testing: SKIP
98105
- name: baremetal-armv8.1m
99106
os: ubuntu-24.04
100107
build_type: MinSizeRel

.github/workflows/libc-overlay-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
native:
1313
if: github.repository_owner == 'llvm'
1414
name: ${{ matrix.os }} - ${{ matrix.compiler.c_compiler }}
15-
timeout-minutes: 30
15+
timeout-minutes: 60
1616
runs-on: ${{ matrix.os }}
1717
container: ${{ matrix.container || null }}
1818
strategy:

.github/workflows/libcxx-benchmark-commit.yml

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# it requires several inputs that allow customizing its behavior.
44

55
name: "[libc++] Run benchmark suite against commit"
6+
7+
# Keep in sync with libcxx/utils/ci/lnt/dispatch-benchmarks
68
run-name: "[libc++] Run benchmark suite against ${{ inputs.commit }} on ${{ inputs.lnt-machine }}"
79

810
permissions:
@@ -18,15 +20,15 @@ on:
1820
lnt-machine:
1921
description: 'The LNT machine to run the benchmarks on'
2022
required: true
21-
type: choice
22-
options:
23-
- macos-26.5-arm64
24-
- linux-x86_64
25-
benchmark-suite-version:
26-
description: 'The version of the benchmark suite to use (a LLVM monorepo SHA)'
23+
type: string
24+
benchmark-suite-override:
25+
description: |
26+
Override the version of the benchmark suite to use (a LLVM monorepo SHA). By default, the version pinned
27+
for this machine in machines.json is used. This override can be used to dry-run benchmarks with arbitrary
28+
commits of the benchmark suite, but only the version pinned in machines.json can be used when actually
29+
submitting to LNT.
2730
required: false
2831
type: string
29-
default: 0eefb2682bf8c04954c46e91916b5164d8424702
3032
filter:
3133
description: 'An optional filter to determine which benchmarks to run'
3234
required: false
@@ -49,37 +51,50 @@ jobs:
4951
outputs:
5052
matrix: ${{ steps.select.outputs.matrix }}
5153
steps:
54+
- name: Checkout the machine definitions
55+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
56+
with:
57+
persist-credentials: false
58+
# Disabling cone mode allows checking out exactly the single file we need.
59+
sparse-checkout: libcxx/utils/ci/lnt/machines.json
60+
sparse-checkout-cone-mode: false
61+
5262
- name: Select the configuration to benchmark on
5363
id: select
5464
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
5565
env:
5666
LNT_MACHINE: ${{ inputs.lnt-machine }}
67+
BENCHMARK_SUITE_OVERRIDE: ${{ inputs.benchmark-suite-override }}
68+
SUBMIT_LNT: ${{ inputs.submit-lnt }}
5769
with:
5870
script: |
59-
const MACHINES = [
60-
{
61-
'lnt-machine': 'macos-26.5-arm64',
62-
runner: ['self-hosted', 'macOS', 'ARM64', '26', '26.5'],
63-
cxx: 'clang++',
64-
'running-on': 'macos',
65-
'xcode-version': '26.5',
66-
},
67-
{
68-
'lnt-machine': 'linux-x86_64',
69-
runner: 'llvm-premerge-libcxx-runners',
70-
cxx: 'clang++-22',
71-
'running-on': 'linux',
72-
},
73-
];
71+
const config = JSON.parse(require('fs').readFileSync('libcxx/utils/ci/lnt/machines.json', 'utf8'));
7472
7573
const requested = process.env.LNT_MACHINE;
76-
const selected = MACHINES.filter(m => m['lnt-machine'] === requested);
74+
const selected = config.filter(cfg => cfg['lnt-machine'] === requested);
7775
if (selected.length === 0) {
78-
const known = MACHINES.map(m => m['lnt-machine']).join(', ');
76+
const known = config.map(cfg => cfg['lnt-machine']).join(', ');
7977
core.setFailed(`Unknown LNT machine '${requested}' (known machines: ${known})`);
8078
return;
8179
}
8280
81+
// Honor benchmark suite version override and make sure we don't submit if an incorrect
82+
// override is provided.
83+
const version_override = (process.env.BENCHMARK_SUITE_OVERRIDE || '').trim().toLowerCase();
84+
for (const cfg of selected) {
85+
const pinned = cfg['benchmark-suite-version'];
86+
if (process.env.SUBMIT_LNT === 'true' && version_override && version_override !== pinned) {
87+
core.setFailed(`Refusing to submit results for ${cfg['lnt-machine']}, since the benchmark suite was `
88+
+ `overridden to version ${version_override}, which is different from the version `
89+
+ `pinned in machines.json (${pinned}).`);
90+
return;
91+
}
92+
93+
if (version_override) {
94+
cfg['benchmark-suite-version'] = version_override;
95+
}
96+
}
97+
8398
core.setOutput('matrix', JSON.stringify(selected));
8499
85100
run-benchmarks:
@@ -125,13 +140,20 @@ jobs:
125140
"${COMPILER}" --version
126141
python3 --version
127142
143+
- name: Setup virtual environment
144+
run: |
145+
python3 -m venv .venv
146+
source .venv/bin/activate
147+
pip install -r libcxx/utils/requirements.txt
148+
128149
- name: Run the benchmarks
129150
env:
130151
COMMIT: ${{ inputs.commit }}
131-
BENCHMARK_SUITE_VERSION: ${{ inputs.benchmark-suite-version }}
152+
BENCHMARK_SUITE_VERSION: ${{ matrix.benchmark-suite-version }}
132153
FILTER: ${{ inputs.filter }}
133154
LNT_MACHINE: ${{ matrix.lnt-machine }}
134155
run: |
156+
source .venv/bin/activate
135157
filter_arg=()
136158
if [ -n "${FILTER}" ]; then
137159
filter_arg=(--filter "${FILTER}")
@@ -152,6 +174,7 @@ jobs:
152174
COMMIT: ${{ inputs.commit }}
153175
LNT_URL: ${{ inputs.lnt-url }}
154176
run: |
177+
source .venv/bin/activate
155178
libcxx/utils/ci/lnt/submit-benchmarks \
156179
--lnt-url "${LNT_URL}" \
157180
--test-suite libcxx \
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# This file defines a workflow that periodically requests benchmark runs for the commits
2+
# that should have historical performance data but don't yet.
3+
#
4+
# The workflow keeps no state: on every invocation, the commits that should be benchmarked
5+
# are recomputed from Git and the ones that have been benchmarked are recomputed from LNT
6+
# and from the Github Actions API. It then dispatches libcxx-benchmark-commit.yml for the
7+
# difference, within a budget. This makes the system converge towards having data for all
8+
# the desired commits, without necessarily ever reaching that state (as new commits land).
9+
#
10+
# The actual configuration driving this job is in libcxx/utils/ci/lnt/machines.json.
11+
12+
name: "[libc++] Request historical benchmark data"
13+
14+
permissions:
15+
contents: read
16+
17+
on:
18+
schedule:
19+
# Trigger every hour, off the hour boundary to avoid popular times.
20+
- cron: '37 * * * *'
21+
workflow_dispatch:
22+
inputs:
23+
dry-run:
24+
description: 'Report what would be requested, but request nothing'
25+
required: false
26+
type: boolean
27+
default: false
28+
allow-missing-machine:
29+
description: 'Plan for machines that have no data in LNT yet. Needed to seed a new machine.'
30+
required: false
31+
type: boolean
32+
default: false
33+
34+
concurrency:
35+
group: ${{ github.workflow }}
36+
cancel-in-progress: false
37+
38+
jobs:
39+
# Turn the machine definitions stored in libcxx/utils/ci/lnt/machines.json into actual
40+
# dispatch jobs.
41+
select-machines:
42+
if: github.repository_owner == 'llvm'
43+
runs-on: ubuntu-24.04
44+
outputs:
45+
matrix: ${{ steps.select.outputs.matrix }}
46+
steps:
47+
- name: Checkout the machine definitions
48+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
49+
with:
50+
persist-credentials: false
51+
# Disabling cone mode allows checking out exactly the single file we need.
52+
sparse-checkout: libcxx/utils/ci/lnt/machines.json
53+
sparse-checkout-cone-mode: false
54+
55+
- name: Select the machines to request runs for
56+
id: select
57+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
58+
with:
59+
script: |
60+
const config = JSON.parse(require('fs').readFileSync('libcxx/utils/ci/lnt/machines.json', 'utf8'));
61+
core.setOutput('matrix', JSON.stringify(config.map(cfg => ({
62+
machine: cfg['lnt-machine'],
63+
...cfg.coverage,
64+
}))));
65+
66+
request-runs:
67+
permissions:
68+
contents: read
69+
actions: write # to dispatch libcxx-benchmark-commit.yml
70+
needs:
71+
- select-machines
72+
strategy:
73+
matrix:
74+
include: ${{ fromJSON(needs.select-machines.outputs.matrix) }}
75+
fail-fast: false
76+
name: "Request ${{ matrix.machine }}"
77+
runs-on: ubuntu-24.04
78+
timeout-minutes: 30
79+
env:
80+
MACHINE: ${{ matrix.machine }}
81+
SINCE: ${{ matrix.since }}
82+
EVERY: ${{ matrix.every }}
83+
SAMPLES: ${{ matrix.samples }}
84+
MAX_IN_FLIGHT: ${{ matrix.max-in-flight }}
85+
LNT_URL: ${{ matrix.lnt-url }}
86+
87+
ALLOW_MISSING_MACHINE: ${{ inputs.allow-missing-machine || 'false' }}
88+
DRY_RUN: ${{ inputs.dry-run || 'false' }}
89+
steps:
90+
- name: Checkout the LLVM monorepo
91+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
92+
with:
93+
persist-credentials: false
94+
# Selecting anchor commits requires full Git history, but not the blob content.
95+
fetch-depth: 0
96+
filter: blob:none
97+
98+
- name: Install Python
99+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
100+
with:
101+
python-version: '3.14'
102+
cache: pip
103+
cache-dependency-path: libcxx/utils/requirements.txt
104+
105+
- name: Install dependencies
106+
run: pip install -r libcxx/utils/requirements.txt
107+
108+
- name: Determine which commits should have benchmark data
109+
run: |
110+
libcxx/utils/ci/lnt/select-anchor-commits --since "${SINCE}" --every "${EVERY}" --output anchors.txt
111+
# Anchor commits go from oldest to newest. Reverse them to prioritize newer commits first.
112+
tac anchors.txt > tmp.txt
113+
mv tmp.txt anchors.txt
114+
115+
- name: Determine which of them are missing from LNT
116+
run: |
117+
allow_missing=()
118+
if [ "${ALLOW_MISSING_MACHINE}" = "true" ]; then
119+
allow_missing=(--allow-missing-machine)
120+
fi
121+
122+
libcxx/utils/ci/lnt/plan-benchmarks --commit-list anchors.txt --lnt-url "${LNT_URL}" --test-suite libcxx \
123+
--machine "${MACHINE}" --samples "${SAMPLES}" "${allow_missing[@]}" \
124+
--output plan.jsonl
125+
126+
- name: Request the missing runs
127+
env:
128+
GITHUB_TOKEN: ${{ github.token }}
129+
run: |
130+
dry_run=()
131+
if [ "${DRY_RUN}" = "true" ]; then
132+
dry_run=(--dry-run)
133+
fi
134+
135+
libcxx/utils/ci/lnt/dispatch-benchmarks --work-items plan.jsonl --lnt-url "${LNT_URL}" \
136+
--max-in-flight "${MAX_IN_FLIGHT}" \
137+
--output dispatched.jsonl "${dry_run[@]}"

0 commit comments

Comments
 (0)