Skip to content

Commit f5c5627

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into georgi/test-hip-usm-copy2d
2 parents 906f788 + ff9e48a commit f5c5627

File tree

6,135 files changed

+215245
-61553
lines changed

Some content is hidden

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

6,135 files changed

+215245
-61553
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function compute-projects-to-test() {
6868
done
6969
;;
7070
clang)
71-
for p in clang-tools-extra compiler-rt flang libc lldb openmp cross-project-tests; do
71+
for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do
7272
echo $p
7373
done
7474
;;
@@ -224,7 +224,7 @@ fi
224224
# needs while letting them run on the infrastructure provided by LLVM.
225225

226226
# Figure out which projects need to be built on each platform
227-
all_projects="bolt clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
227+
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
228228
modified_projects="$(keep-modified-projects ${all_projects})"
229229

230230
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_projects}))

.github/CODEOWNERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ sycl/test-e2e/Plugin/dll-detach-order.cpp @intel/llvm-reviewers-runtime
4747
sycl/plugins/**/cuda/ @intel/llvm-reviewers-cuda
4848
sycl/plugins/**/hip/ @intel/llvm-reviewers-cuda
4949

50+
# Transform Dialect in MLIR.
51+
/mlir/include/mlir/Dialect/Transform/* @ftynse @nicolasvasilache
52+
/mlir/lib/Dialect/Transform/* @ftynse @nicolasvasilache
53+
/mlir/**/*TransformOps* @ftynse @nicolasvasilache
54+
55+
5056
# CUDA specific runtime implementations
5157
sycl/include/sycl/ext/oneapi/experimental/cuda/ @intel/llvm-reviewers-cuda
5258

@@ -134,7 +140,7 @@ sycl/include/sycl/detail/native_cpu.hpp @intel/dpcpp-nativecpu-pi-reviewers
134140
sycl/include/sycl/ext/oneapi/experimental/graph.hpp @intel/sycl-graphs-reviewers
135141
sycl/source/detail/graph_impl.cpp @intel/sycl-graphs-reviewers
136142
sycl/source/detail/graph_impl.hpp @intel/sycl-graphs-reviewers
137-
sycl/unittests/Extensions/CommandGraph.cpp @intel/sycl-graphs-reviewers
143+
sycl/unittests/Extensions/CommandGraph/ @intel/sycl-graphs-reviewers
138144
sycl/doc/design/CommandGraph.md @intel/sycl-graphs-reviewers
139145
sycl/test-e2e/Graph @intel/sycl-graphs-reviewers
140146
sycl/doc/extensions/**/sycl_ext_oneapi_graph.asciidoc @intel/sycl-graphs-reviewers

.github/new-prs-labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ backend:DirectX:
629629
- '**/*DirectX*/**'
630630
- '**/*DXIL*/**'
631631
- '**/*dxil*/**'
632+
- '**/*DXContainer*'
633+
- '**/*DXContainer*/**'
632634

633635
backend:SPIR-V:
634636
- clang/lib/Driver/ToolChains/SPIRV.*
@@ -933,3 +935,6 @@ openmp:libomp:
933935

934936
openmp:libomptarget:
935937
- any: ['openmp/**', '!openmp/runtime/**']
938+
939+
bazel:
940+
- utils/bazel/**

.github/workflows/issue-write.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: Comment on an issue
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Check code formatting"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
pr-comment:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: write
17+
if: >
18+
github.event.workflow_run.event == 'pull_request'
19+
steps:
20+
- name: 'Download artifact'
21+
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
22+
with:
23+
github-token: ${{ secrets.ISSUE_WRITE_DOWNLOAD_ARTIFACT }}
24+
run-id: ${{ github.event.workflow_run.id }}
25+
name: workflow-args
26+
27+
- name: 'Comment on PR'
28+
uses: actions/github-script@v3
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
script: |
32+
var fs = require('fs');
33+
const comments = JSON.parse(fs.readFileSync('./comments'));
34+
if (!comments) {
35+
return;
36+
}
37+
38+
let runInfo = await github.actions.getWorkflowRun({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
run_id: context.payload.workflow_run.id
42+
});
43+
44+
console.log(runInfo);
45+
46+
47+
// Query to find the number of the pull request that triggered this job.
48+
// The associated pull requests are based off of the branch name, so if
49+
// you create a pull request for a branch, close it, and then create
50+
// another pull request with the same branch, then this query will return
51+
// two associated pull requests. This is why we have to fetch all the
52+
// associated pull requests and then iterate through them to find the
53+
// one that is open.
54+
const gql_query = `
55+
query($repo_owner : String!, $repo_name : String!, $branch: String!) {
56+
repository(owner: $repo_owner, name: $repo_name) {
57+
ref (qualifiedName: $branch) {
58+
associatedPullRequests(first: 100) {
59+
nodes {
60+
baseRepository {
61+
owner {
62+
login
63+
}
64+
}
65+
number
66+
state
67+
}
68+
}
69+
}
70+
}
71+
}
72+
`
73+
const gql_variables = {
74+
repo_owner: runInfo.data.head_repository.owner.login,
75+
repo_name: runInfo.data.head_repository.name,
76+
branch: runInfo.data.head_branch
77+
}
78+
const gql_result = await github.graphql(gql_query, gql_variables);
79+
console.log(gql_result);
80+
console.log(gql_result.repository.ref.associatedPullRequests.nodes);
81+
82+
var pr_number = 0;
83+
gql_result.repository.ref.associatedPullRequests.nodes.forEach((pr) => {
84+
if (pr.baseRepository.owner.login = context.repo.owner && pr.state == 'OPEN') {
85+
pr_number = pr.number;
86+
}
87+
});
88+
if (pr_number == 0) {
89+
console.log("Error retrieving pull request number");
90+
return;
91+
}
92+
93+
await comments.forEach(function (comment) {
94+
if (comment.id) {
95+
// Security check: Ensure that this comment was created by
96+
// the github-actions bot, so a malicious input won't overwrite
97+
// a user's comment.
98+
github.issues.getComment({
99+
owner: context.repo.owner,
100+
repo: context.repo.repo,
101+
comment_id: comment.id
102+
}).then((old_comment) => {
103+
console.log(old_comment);
104+
if (old_comment.data.user.login != "github-actions[bot]") {
105+
console.log("Invalid comment id: " + comment.id);
106+
return;
107+
}
108+
github.issues.updateComment({
109+
owner: context.repo.owner,
110+
repo: context.repo.repo,
111+
issue_number: pr_number,
112+
comment_id: comment.id,
113+
body: comment.body
114+
});
115+
});
116+
} else {
117+
github.issues.createComment({
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
issue_number: pr_number,
121+
body: comment.body
122+
});
123+
}
124+
});
125+
126+
- name: Dump comments file
127+
if: always()
128+
run: cat comments

.github/workflows/llvm-project-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ jobs:
118118
else
119119
builddir="$(pwd)"/build
120120
fi
121+
if [ "${{ runner.os }}" == "macOS" ]; then
122+
# Workaround test failure on some lld tests on MacOS
123+
# https://github.com/llvm/llvm-project/issues/81967
124+
extra_cmake_args="-DLLVM_DISABLE_ASSEMBLY_FILES=ON"
125+
fi
121126
echo "llvm-builddir=$builddir" >> "$GITHUB_OUTPUT"
122127
cmake -G Ninja \
123128
-B "$builddir" \

.github/workflows/llvm-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
4343
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
4444
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
45+
BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }}
4546
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
4647
LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
4748
LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
@@ -58,7 +59,14 @@ jobs:
5859
- name: Setup Variables
5960
id: vars
6061
run: |
61-
if [ ${{ steps.version.outputs.LLVM_VERSION_MINOR }} -ne 0 ] || [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
62+
# C++ ABI:
63+
# 18.1.0 we aren't doing ABI checks.
64+
# 18.1.1 We want to check 18.1.0.
65+
# C ABI:
66+
# 18.1.0 We want to check 17.0.x
67+
# 18.1.1 We want to check 18.1.0
68+
echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT"
69+
if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
6270
{
6371
echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))"
6472
echo "ABI_HEADERS=llvm-c"
@@ -82,7 +90,7 @@ jobs:
8290
include:
8391
- name: build-baseline
8492
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
85-
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.0.0
93+
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MINOR }}.0
8694
repo: llvm/llvm-project
8795
- name: build-latest
8896
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}

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

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: "Check code formatting"
22
on:
3-
pull_request_target:
3+
pull_request:
44
branches:
55
- main
6-
7-
permissions:
8-
pull-requests: write
6+
- sycl
7+
- sycl-devops-pr/**
8+
- sycl-rel-**
99

1010
jobs:
1111
code_formatter:
@@ -31,12 +31,13 @@ jobs:
3131
separator: ","
3232
skip_initial_fetch: true
3333

34-
# We need to make sure that we aren't executing/using any code from the
35-
# PR for security reasons as we're using pull_request_target. Checkout
36-
# the target branch with the necessary files.
34+
# We need to pull the script from the main branch, so that we ensure
35+
# we get the latest version of this script.
3736
- name: Fetch code formatting utils
3837
uses: actions/checkout@v4
3938
with:
39+
reository: ${{ github.repository }}
40+
ref: ${{ github.base_ref }}
4041
sparse-checkout: |
4142
llvm/utils/git/requirements_formatting.txt
4243
llvm/utils/git/code-format-helper.py
@@ -53,7 +54,7 @@ jobs:
5354
- name: Install clang-format
5455
uses: aminya/setup-cpp@v1
5556
with:
56-
clangformat: 17.0.1
57+
clangformat: 18.1.1
5758

5859
- name: Setup Python env
5960
uses: actions/setup-python@v5
@@ -75,10 +76,20 @@ jobs:
7576
# to take advantage of the new --diff_from_common_commit option
7677
# explicitly in code-format-helper.py and not have to diff starting at
7778
# the merge base.
79+
# Create an empty comments file so the pr-write job doesn't fail.
7880
run: |
81+
echo "[]" > comments &&
7982
python ./code-format-tools/llvm/utils/git/code-format-helper.py \
83+
--write-comment-to-file \
8084
--token ${{ secrets.GITHUB_TOKEN }} \
8185
--issue-number $GITHUB_PR_NUMBER \
8286
--start-rev $(git merge-base $START_REV $END_REV) \
8387
--end-rev $END_REV \
8488
--changed-files "$CHANGED_FILES"
89+
90+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
91+
if: always()
92+
with:
93+
name: workflow-args
94+
path: |
95+
comments

.github/workflows/sycl-aws.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Start/Stop AWS instance
22

3+
permissions: read-all
4+
35
on:
46
workflow_call:
57
inputs:

.github/workflows/sycl-containers.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ on:
2121
- 'devops/scripts/install_build_tools.sh'
2222
- '.github/workflows/sycl-containers.yaml'
2323

24+
permissions: read-all
25+
2426
jobs:
2527
base_image_ubuntu2204:
2628
if: github.repository == 'intel/llvm'

.github/workflows/sycl-detect-changes.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
description: Matched filters
88
value: ${{ jobs.need_check.outputs.filters }}
99

10+
permissions: read-all
11+
1012
jobs:
1113
need_check:
1214
name: Decide which tests could be affected by the changes

.github/workflows/sycl-docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ on:
1111
- 'clang/docs/**'
1212
- 'sycl/doc/**'
1313

14+
permissions: read-all
15+
1416
jobs:
1517
build:
18+
permissions:
19+
contents: write # for Git to git push
1620
runs-on: ubuntu-latest
1721
if: github.repository == 'intel/llvm'
1822
steps:

.github/workflows/sycl-linux-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ on:
103103
options:
104104
- 3
105105

106+
permissions: read-all
107+
106108
jobs:
107109
build:
108110
name: Build + LIT
@@ -186,6 +188,12 @@ jobs:
186188
# TODO consider moving this to Dockerfile.
187189
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
188190
cmake --build $GITHUB_WORKSPACE/build --target check-sycl
191+
- name: check-sycl-unittests
192+
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
193+
run: |
194+
# TODO consider moving this to Dockerfile.
195+
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
196+
cmake --build $GITHUB_WORKSPACE/build --target check-sycl-unittests
189197
- name: check-llvm-spirv
190198
if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv')
191199
run: |

.github/workflows/sycl-linux-matrix-e2e-on-nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
Format: '{"VAR1":"VAL1","VAR2":"VAL2",...}'
1111
default: '{"LIT_FILTER":""}'
1212

13+
permissions: read-all
14+
1315
jobs:
1416
linux_e2e_on_nightly:
1517
name: E2E on Nightly

.github/workflows/sycl-linux-precommit-aws.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
types:
1515
- completed
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
create-check:
1922
runs-on: [Linux, build]

.github/workflows/sycl-linux-precommit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ concurrency:
2929
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
3030
cancel-in-progress: true
3131

32+
permissions: read-all
33+
3234
jobs:
3335
detect_changes:
3436
uses: ./.github/workflows/sycl-detect-changes.yml

0 commit comments

Comments
 (0)