Skip to content

Commit afbc7f2

Browse files
authored
Merge pull request #198 from triSYCL/sycl/unified/next
Update stable version from next branch
2 parents bdfea91 + a785d93 commit afbc7f2

File tree

24,857 files changed

+1444395
-1128548
lines changed

Some content is hidden

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

24,857 files changed

+1444395
-1128548
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ d8f0e6caa91e230a486c948ab643174e40bdf215
4343

4444
# Use C++11 default member initializers in LLDB. NFC.
4545
9494c510af56d9c8593ab69017dcaa232210b235
46+
47+
# [libc++][NFC] clang-format <__config>
48+
ac251726f84d5b7e6533a2e3712920184435b61b

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ opencl/ @intel/llvm-reviewers-runtime
1818
# OpenCL "offline" compiler
1919
opencl/opencl-aot/ @intel/dpcpp-tools-reviewers
2020

21+
# libclc library
22+
libclc/ @intel/llvm-reviewers-cuda
23+
2124
# Device library
2225
libdevice/ @intel/llvm-reviewers-runtime
2326

.github/workflows/closed-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
steps:
1111
- uses: andymckay/[email protected]
1212
with:
13-
remove-labels: "awaiting-review"
13+
remove-labels: 'awaiting-review'

.github/workflows/issue-release-workflow.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# /cherry-pick <commit> <...>
55
#
66
# This comment will attempt to cherry-pick the given commits to the latest
7-
# release branch (release/Y.x) and if successful push the result to a branch
7+
# release branch (release/Y.x) and if successful, push the result to a branch
88
# on github.
99
#
1010
# /branch <owner>/<repo>/<branch>
@@ -31,9 +31,9 @@ jobs:
3131
name: Backport Commits
3232
runs-on: ubuntu-20.04
3333
if: >-
34-
(github.repository == 'llvm/llvm-project') &&
35-
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
36-
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
34+
(github.repository == 'llvm/llvm-project') &&
35+
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
36+
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
3737
steps:
3838
- name: Fetch LLVM sources
3939
uses: actions/checkout@v2
@@ -64,16 +64,16 @@ jobs:
6464
name: Create Pull Request
6565
runs-on: ubuntu-20.04
6666
if: >-
67-
(github.repository == 'llvm/llvm-project') &&
68-
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
69-
contains(github.event.comment.body, '/branch')
67+
(github.repository == 'llvm/llvm-project') &&
68+
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
69+
contains(github.event.comment.body, '/branch')
7070
7171
steps:
7272
- name: Fetch LLVM sources
7373
uses: actions/checkout@v2
7474

7575
- name: Setup Environment
76-
run: |
76+
run: |
7777
pip install -r ./llvm/utils/git/requirements.txt
7878
7979
- name: Create Pull Request

.github/workflows/issue-subscriber.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.repository == 'llvm/llvm-project'
1212
steps:
13-
- name: Setup Automation Script
14-
run: |
15-
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py
16-
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt
17-
chmod a+x github-automation.py
18-
pip install -r requirements.txt
13+
- name: Setup Automation Script
14+
run: |
15+
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py
16+
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt
17+
chmod a+x github-automation.py
18+
pip install -r requirements.txt
1919
20-
- name: Update watchers
21-
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
22-
env:
23-
LABEL_NAME: ${{ github.event.label.name }}
24-
run: |
25-
./github-automation.py \
26-
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
27-
issue-subscriber \
28-
--issue-number '${{ github.event.issue.number }}' \
29-
--label-name "$LABEL_NAME"
20+
- name: Update watchers
21+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
22+
env:
23+
LABEL_NAME: ${{ github.event.label.name }}
24+
run: |
25+
./github-automation.py \
26+
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
27+
issue-subscriber \
28+
--issue-number '${{ github.event.issue.number }}' \
29+
--label-name "$LABEL_NAME"

.github/workflows/llvm-bugs.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@ jobs:
1919
MAILGUN_API_KEY: ${{ secrets.LLVM_BUGS_KEY }}
2020
with:
2121
script: |
22-
const Mailgun = require("mailgun.js");
22+
const Mailgun = require('mailgun.js');
2323
const formData = require('form-data');
24-
const mailgun = new Mailgun(formData);
2524
26-
const DOMAIN = "email.llvm.org";
25+
const mailgun = new Mailgun(formData);
26+
const DOMAIN = 'email.llvm.org';
2727
28-
const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY});
28+
const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY });
2929
3030
github.rest.issues.get({
3131
issue_number: context.issue.number,
3232
owner: context.repo.owner,
33-
repo: context.repo.repo,
33+
repo: context.repo.repo
3434
})
35-
.then(function(issue) {
35+
.then((issue) => {
3636
const payload = {
3737
author : issue.data.user.login,
3838
issue : issue.data.number,
3939
title : issue.data.title,
4040
url : issue.data.html_url,
41-
labels : issue.data.labels.map(label => { return label.name }),
42-
assignee : issue.data.assignees.map(assignee => { return assignee.login }),
41+
labels : issue.data.labels.map((label) => label.name),
42+
assignee : issue.data.assignees.map((assignee) => assignee.login),
4343
body : issue.data.body
4444
};
45-
45+
4646
const data = {
47-
from: "LLVM Bugs <[email protected]>",
48-
47+
from: 'LLVM Bugs <[email protected]>',
48+
4949
subject: `[Bug ${issue.data.number}] ${issue.data.title}`,
50-
template: "new-github-issue",
50+
template: 'new-github-issue',
5151
'o:tracking-clicks': 'no',
5252
'h:X-Mailgun-Variables': JSON.stringify(payload)
5353
};
5454
55-
return mg.messages.create(DOMAIN, data)
55+
return mg.messages.create(DOMAIN, data);
5656
})
57-
.then(msg => console.log(msg));
57+
.then((msg) => console.log(msg));

.github/workflows/new-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ jobs:
1010
steps:
1111
- uses: andymckay/[email protected]
1212
with:
13-
add-labels: "new issue"
13+
add-labels: 'new issue'
1414
ignore-if-labeled: true

.github/workflows/sycl_cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run_id: context.payload.workflow_run.id,
2222
});
2323
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
24-
return artifact.name.startsWith("sycl_linux_");
24+
return artifact.name.match(/^sycl_(linux|windows)_/);
2525
});
2626
matchArtifacts.forEach(async (artifact) => {
2727
await github.rest.actions.deleteArtifact({

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ on:
5252
type: string
5353
required: false
5454
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
55+
cuda_image:
56+
type: string
57+
required: false
58+
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
5559
lts_ref:
5660
type: string
5761
required: false
@@ -147,8 +151,6 @@ jobs:
147151
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-cov
148152
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
149153
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
150-
# TODO this should be resolved in CMakeLists.txt
151-
cmake --build $GITHUB_WORKSPACE/build --target install-lld || echo "skipped"
152154
153155
- name: Pack toolchain
154156
run: tar -cJf llvm_sycl.tar.xz -C $GITHUB_WORKSPACE/build/install .

.github/workflows/sycl_nightly.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ jobs:
1919
build_configure_extra_args: ''
2020
lts_config: "ocl_gen9;ocl_x64"
2121

22+
ubuntu2004_opaque_pointers_build_test:
23+
if: github.repository == 'intel/llvm'
24+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
25+
with:
26+
build_cache_root: "/__w/"
27+
build_cache_suffix: opaque_pointers
28+
build_artifact_suffix: opaque_pointers
29+
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DDPCPP_ENABLE_OPAQUE_POINTERS=TRUE"
30+
lts_config: "ocl_gen9;ocl_x64"
31+
2232
windows_default:
2333
name: Windows
2434
if: github.repository == 'intel/llvm'
@@ -60,13 +70,3 @@ jobs:
6070
tags: |
6171
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers-${{ github.sha }}
6272
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers
63-
ubuntu2004_build_test_new_pm:
64-
# Default Linux building and LIT testing using new Pass Manager by default
65-
if: github.repository == 'intel/llvm'
66-
uses: ./.github/workflows/sycl_linux_build_and_test.yml
67-
with:
68-
build_cache_root: "/__w/"
69-
build_cache_suffix: new_pm
70-
build_artifact_suffix: new_pm
71-
build_configure_extra_args: '--hip --cuda --cmake-opt=-DLLVM_ENABLE_NEW_PASS_MANAGER=ON'
72-
lts_config: "hip_amdgpu;ocl_x64"

.github/workflows/sycl_precommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
build_cache_size: "8G"
4242
build_artifact_suffix: "default"
4343
build_cache_suffix: "default"
44-
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu"
44+
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu;cuda"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Update GPU driver
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * 2'
6+
workflow_dispatch:
7+
8+
jobs:
9+
update_driver_linux:
10+
runs-on: ubuntu-latest
11+
if: github.repository == 'intel/llvm'
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Update dependencies file
15+
run: |
16+
version="$(python3 devops/scripts/update_drivers.py linux)"
17+
echo 'NEW_DRIVER_VERSION='$version >> $GITHUB_ENV
18+
- name: Create Pull Request
19+
env:
20+
BRANCH: ci/update_gpu_driver-linux-${{ env.NEW_DRIVER_VERSION }}
21+
LLVMBOT_TOKEN: ${{ secrets.LLVM_MAIN_SYNC_BBSYCL_TOKEN }}
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
run: |
24+
cd $GITHUB_WORKSPACE
25+
# Set fake identity to fulfil git requirements
26+
git config --global user.name "GitHub Actions"
27+
git config --global user.email "[email protected]"
28+
git checkout -B $BRANCH
29+
git add -u
30+
git commit -m "[GHA] Uplift GPU RT version for Linux CI" || exit 0 # exit if commit is empty
31+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
32+
gh pr create --head $BRANCH --title "[GHA] Uplift GPU RT version for Linux CI" --body "Uplift GPU RT version for Linux to $NEW_DRIVER_VERSION"
33+
34+
update_driver_linux_staging:
35+
runs-on: ubuntu-latest
36+
if: github.repository == 'intel/llvm'
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Update dependencies file
40+
run: |
41+
version="$(python3 devops/scripts/update_drivers.py linux_staging)"
42+
echo 'NEW_DRIVER_VERSION='$version >> $GITHUB_ENV
43+
- name: Update sycl Branch
44+
env:
45+
BRANCH: ci/update_gpu_driver-linux_staging-${{ env.NEW_DRIVER_VERSION }}
46+
LLVMBOT_TOKEN: ${{ secrets.LLVM_MAIN_SYNC_BBSYCL_TOKEN }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
run: |
49+
cd $GITHUB_WORKSPACE
50+
# Set fake identity to fulfil git requirements
51+
git config --global user.name "GitHub Actions"
52+
git config --global user.email "[email protected]"
53+
git checkout -B $BRANCH
54+
git add -u
55+
git commit -m "[GHA] Uplift GPU RT version for Nightly Builds" || exit 0 # exit if commit is empty
56+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
57+
gh pr create --head $BRANCH --title "[GHA] Uplift GPU RT version for Nightly Builds" --body "Uplift GPU RT version for Linux to $NEW_DRIVER_VERSION"
58+

.github/workflows/sycl_windows_build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
IF NOT EXIST D:\github\_work\cache MKDIR D:\github\_work\cache
3939
IF NOT EXIST D:\github\_work\cache\sycl_${{inputs.build_cache_suffix}} MKDIR D:\github\_work\cache\${{inputs.build_cache_suffix}}
4040
python.exe src/buildbot/configure.py -o build ^
41-
--ci-default ^
41+
--ci-defaults ^
4242
--cmake-opt="-DCMAKE_C_COMPILER=cl" ^
4343
--cmake-opt="-DCMAKE_CXX_COMPILER=cl" ^
4444
--cmake-opt="-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SYCL for Vitis 2021.2: experimental melting pot with Intel oneAPI DPC++ SYCL and triSYCL for AMD/Xilinx FPGA
1+
# SYCL for Vitis 2022.1: experimental melting pot with Intel oneAPI DPC++ SYCL and triSYCL for AMD/Xilinx FPGA
22

33
This project is about assessing the viability of unifying 2 of the
44
current open-source implementations of the SYCL standard

bolt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Once you have `perf.fdata` ready, you can use it for optimizations with
180180
BOLT. Assuming your environment is setup to include the right path, execute
181181
`llvm-bolt`:
182182
```
183-
$ llvm-bolt <executable> -o <executable>.bolt -data=perf.fdata -reorder-blocks=cache+ -reorder-functions=hfsort -split-functions=2 -split-all-cold -split-eh -dyno-stats
183+
$ llvm-bolt <executable> -o <executable>.bolt -data=perf.fdata -reorder-blocks=ext-tsp -reorder-functions=hfsort -split-functions -split-all-cold -split-eh -dyno-stats
184184
```
185185

186186
If you do need an updated debug info, then add `-update-debug-sections` option

bolt/docs/OptimizingClang.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Notice that we are passing `clang-7` to `perf2bolt` which is the real binary tha
6464
the generated profile:
6565
```bash
6666
$ llvm-bolt $CPATH/clang-7 -o $CPATH/clang-7.bolt -b clang-7.yaml \
67-
-reorder-blocks=cache+ -reorder-functions=hfsort+ -split-functions=3 \
67+
-reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions \
6868
-split-all-cold -dyno-stats -icf=1 -use-gnu-stack
6969
```
7070
The output will look similar to the one below:

bolt/docs/doxygen.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "BOLT"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER =
41+
PROJECT_NUMBER = @PACKAGE_VERSION@
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

bolt/include/bolt/Core/BinaryBasicBlock.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,9 @@ class BinaryBasicBlock {
150150
BinaryBasicBlock &operator=(const BinaryBasicBlock &) = delete;
151151
BinaryBasicBlock &operator=(const BinaryBasicBlock &&) = delete;
152152

153-
explicit BinaryBasicBlock(BinaryFunction *Function, MCSymbol *Label,
154-
uint32_t Offset = INVALID_OFFSET)
153+
explicit BinaryBasicBlock(BinaryFunction *Function, MCSymbol *Label)
155154
: Function(Function), Label(Label) {
156155
assert(Function && "Function must be non-null");
157-
InputRange.first = Offset;
158156
}
159157

160158
// Exclusively managed by BinaryFunction.
@@ -561,6 +559,12 @@ class BinaryBasicBlock {
561559
/// Set minimum alignment for the basic block.
562560
void setAlignment(uint32_t Align) { Alignment = Align; }
563561

562+
/// Set alignment of the block based on the alignment of its offset.
563+
void setDerivedAlignment() {
564+
const uint64_t DerivedAlignment = getOffset() & (1 + ~getOffset());
565+
Alignment = std::min(DerivedAlignment, uint64_t(32));
566+
}
567+
564568
/// Return required alignment for the block.
565569
uint32_t getAlignment() const { return Alignment; }
566570

@@ -630,14 +634,12 @@ class BinaryBasicBlock {
630634

631635
/// Test if BB is a predecessor of this block.
632636
bool isPredecessor(const BinaryBasicBlock *BB) const {
633-
auto Itr = std::find(Predecessors.begin(), Predecessors.end(), BB);
634-
return Itr != Predecessors.end();
637+
return llvm::is_contained(Predecessors, BB);
635638
}
636639

637640
/// Test if BB is a successor of this block.
638641
bool isSuccessor(const BinaryBasicBlock *BB) const {
639-
auto Itr = std::find(Successors.begin(), Successors.end(), BB);
640-
return Itr != Successors.end();
642+
return llvm::is_contained(Successors, BB);
641643
}
642644

643645
/// Test if this BB has a valid execution count.
@@ -787,6 +789,9 @@ class BinaryBasicBlock {
787789
/// at the split point.
788790
BinaryBasicBlock *splitAt(iterator II);
789791

792+
/// Set start offset of this basic block in the input binary.
793+
void setOffset(uint32_t Offset) { InputRange.first = Offset; };
794+
790795
/// Sets address of the basic block in the output.
791796
void setOutputStartAddress(uint64_t Address) {
792797
OutputAddressRange.first = Address;

0 commit comments

Comments
 (0)