Skip to content

Commit 1b5503c

Browse files
authored
Merge branch 'sycl' into tf32-joint-matrix
2 parents 077e0f4 + ae284f1 commit 1b5503c

File tree

11,729 files changed

+700673
-414886
lines changed

Some content is hidden

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

11,729 files changed

+700673
-414886
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ clang/ @intel/dpcpp-cfe-reviewers
66
# Clang driver
77
clang/**/Driver/ @intel/dpcpp-clang-driver-reviewers
88

9+
# Clang tools
10+
clang-tools-extra/ @intel/dpcpp-cfe-reviewers
11+
912
# LLVM-SPIRV translator
1013
llvm-spirv/ @intel/dpcpp-spirv-reviewers
1114

@@ -45,11 +48,16 @@ xptifw/ @intel/llvm-reviewers-runtime
4548
llvm/ @intel/dpcpp-tools-reviewers
4649

4750
# Clang offload tools
48-
clang/tools/clang-offload-*/ @intel/dpcpp-tools-reviewers
51+
clang/tools/clang-offload-*/ @sndmitriev @intel/dpcpp-tools-reviewers
4952

5053
# Explicit SIMD
5154
ESIMD/ @intel/dpcpp-esimd-reviewers
5255
esimd/ @intel/dpcpp-esimd-reviewers
5356
sycl/include/sycl/ext/intel/esimd.hpp @intel/dpcpp-esimd-reviewers
5457
sycl/doc/extensions/experimental/sycl_ext_intel_esimd/ @intel/dpcpp-esimd-reviewers
5558
llvm/lib/SYCLLowerIR/CMakeLists.txt @intel/dpcpp-tools-reviewers @intel/dpcpp-esimd-reviewers
59+
60+
# DevOps configs
61+
.github/workflows/ @intel/dpcpp-devops-reviewers
62+
buildbot/ @intel/dpcpp-devops-reviewers
63+
devops/ @intel/dpcpp-devops-reviewers

.github/workflows/llvm-bugs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
4949
subject: `[Bug ${issue.data.number}] ${issue.data.title}`,
5050
template: "new-github-issue",
51+
'o:tracking-clicks': 'no',
5152
'h:X-Mailgun-Variables': JSON.stringify(payload)
5253
};
5354

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ on:
3232
build_configure_extra_args:
3333
type: string
3434
required: false
35-
default: "--hip --cuda"
35+
default: "--hip --cuda --enable-esimd-emulator"
3636
build_artifact_suffix:
3737
type: string
3838
required: true
3939
intel_drivers_image:
4040
type: string
4141
required: false
42-
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:unstable"
42+
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:latest"
4343
lts_config:
4444
type: string
4545
required: false
@@ -172,10 +172,13 @@ jobs:
172172
outputs:
173173
lts: ${{ steps.work.outputs.lts }}
174174
steps:
175-
- name: Download scripts
175+
- name: Download scripts and configs
176176
run: |
177177
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/generate_test_matrix.js
178178
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/test_configs.json
179+
wget raw.githubusercontent.com/intel/llvm/sycl/devops/dependencies.json
180+
mv dependencies.json dependencies.sycl.json
181+
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/dependencies.json
179182
- id: work
180183
uses: actions/github-script@v6
181184
name: Generate matrix
@@ -196,13 +199,28 @@ jobs:
196199
include: ${{ fromJSON(needs.resolve_matrix.outputs.lts) }}
197200
name: ${{ matrix.name }}
198201
runs-on: ${{ matrix.runs-on }}
202+
env: ${{ matrix.env }}
199203
container:
200204
image: ${{ matrix.image }}
201205
options: ${{ matrix.container_options }}
202206
steps:
207+
- name: Reset GPU
208+
if: ${{ contains(matrix.config, 'gen9') }}
209+
run: |
210+
sudo mount -t debugfs none /sys/kernel/debug
211+
sudo bash -c 'echo 1 > /sys/kernel/debug/dri/0/i915_wedged'
203212
- run: cp -r /actions .
204213
- name: Register cleanup after job is finished
205214
uses: ./actions/cleanup
215+
- name: Install drivers
216+
if: env.compute_runtime_tag != ''
217+
run: |
218+
if [ -e /opt/install_drivers.sh ]; then
219+
# TODO pack this script into container
220+
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/get_release.py
221+
sudo mv get_release.py /opt/
222+
sudo -E /opt/install_drivers.sh --all
223+
fi
206224
# FIXME cached_checkout fails here, but works everywhere else
207225
- uses: actions/checkout@v2
208226
with:

.github/workflows/sycl_nightly.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ jobs:
1616
with:
1717
build_cache_root: "/__w/"
1818
build_artifact_suffix: default
19-
lts_config: "ocl_gen9;ocl_x64;hip_amdgpu"
19+
build_configure_extra_args: ''
20+
lts_config: "ocl_gen9;ocl_x64"
2021

2122
windows_default:
22-
name: Windows (experimental)
23+
name: Windows
2324
if: github.repository == 'intel/llvm'
2425
uses: ./.github/workflows/sycl_windows_build_and_test.yml
2526

.github/workflows/sycl_post_commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,5 @@ jobs:
9898

9999
windows_default:
100100
name: Windows
101+
if: github.repository == 'intel/llvm'
101102
uses: ./.github/workflows/sycl_windows_build_and_test.yml

.github/workflows/sycl_precommit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- sycl
77
# Do not run builds if changes are only in the following locations
88
paths-ignore:
9+
- '.github/ISSUE_TEMPLATE/**'
10+
- '.github/CODEOWNERS'
911
- 'devops/containers/**'
1012
- 'devops/scripts/install_drivers.sh'
1113
- 'devops/scripts/install_build_tools.sh'
@@ -39,4 +41,4 @@ jobs:
3941
build_cache_size: "8G"
4042
build_artifact_suffix: "default"
4143
build_cache_suffix: "default"
42-
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9"
44+
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu"

.github/workflows/sycl_windows_build_and_test.yml

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,80 @@ name: SYCL Windows Test
22

33
on:
44
workflow_call:
5+
inputs:
6+
build_cache_suffix:
7+
type: string
8+
required: false
9+
default: "default"
510

611
jobs:
712
build:
813
name: Build
9-
runs-on: windows-2022
14+
runs-on: [Windows, build]
15+
# TODO use cached checkout
1016
steps:
11-
- uses: actions/checkout@v2
12-
with:
13-
path: src
14-
fetch-depth: 1
15-
- name: Install dependencies
16-
shell: cmd
17-
run: |
18-
choco install -y ninja
19-
choco install -y sccache --version 0.2.15
20-
refreshenv
2117
- uses: ilammy/msvc-dev-cmd@9f8ae839b01883414208f29e3e24524387f48e1f
2218
with:
2319
arch: amd64
24-
- name: Setup Cache
25-
uses: actions/cache@v2
26-
if: ${{ github.event_name != 'pull_request' }}
27-
id: cache
20+
- name: Set env
21+
run: |
22+
git config --system core.longpaths true
23+
git config --global core.autocrlf false
24+
echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
25+
echo "SCCACHE_DIR=D:\github\_work\cache\${{ inputs.build_cache_suffix }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
26+
- uses: actions/checkout@v2
2827
with:
29-
path: cache
30-
key: sycl-win-build-${{ github.sha }}
31-
restore-keys: |
32-
sycl-win-build-
33-
- name: Build
28+
path: src
29+
fetch-depth: 1
30+
- name: Register cleanup after job is finished
31+
uses: ./src/devops/actions/cleanup
32+
- name: Configure
3433
shell: cmd
3534
# TODO switch to clang-cl and lld when this is fixed https://github.com/oneapi-src/level-zero/issues/83
36-
# TODO enable sccache, when problems with PDB are resolved
3735
run: |
3836
mkdir build
3937
mkdir install
40-
IF NOT EXIST cache MKDIR cache
41-
set SCCACHE_DIR=%GITHUB_WORKSPACE%\cache
42-
set PATH=C:\ProgramData\chocolatey\lib\sccache\tools\sccache-v0.2.15-x86_64-pc-windows-msvc;%PATH%
38+
IF NOT EXIST D:\github\_work\cache MKDIR D:\github\_work\cache
39+
IF NOT EXIST D:\github\_work\cache\sycl_${{inputs.build_cache_suffix}} MKDIR D:\github\_work\cache\${{inputs.build_cache_suffix}}
4340
python.exe src/buildbot/configure.py -o build ^
41+
--ci-default ^
4442
--cmake-opt="-DCMAKE_C_COMPILER=cl" ^
4543
--cmake-opt="-DCMAKE_CXX_COMPILER=cl" ^
4644
--cmake-opt="-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^
4745
--cmake-opt="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" ^
4846
--cmake-opt="-DCMAKE_C_COMPILER_LAUNCHER=sccache"
47+
- name: Build
48+
id: build
49+
run: |
4950
cmake --build build --target sycl-toolchain
5051
sccache --show-stats
52+
- name: check-llvm
53+
shell: bash
54+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
55+
run: |
56+
cmake --build build --target check-llvm
57+
- name: check-clang
58+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
59+
shell: bash
60+
run: |
61+
cmake --build build --target check-clang
62+
- name: check-sycl
63+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
64+
shell: bash
65+
run: |
66+
cmake --build build --target check-sycl
67+
- name: check-llvm-spirv
68+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
69+
shell: bash
70+
run: |
71+
cmake --build build --target check-llvm-spirv
72+
- name: check-xptifw
73+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
74+
shell: bash
75+
run: |
76+
cmake --build build --target check-xptifw
5177
- name: Install
52-
shell: cmd
78+
shell: bash
5379
run: cmake --build build --target deploy-sycl-toolchain
5480
- name: Upload toolchain
5581
uses: actions/upload-artifact@v2

.mailmap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Combinations of both are possible too, see
1717
# https://git-scm.com/docs/gitmailmap for format details.
1818
#
19-
# You can commit changes for your own names and email addresses without review.
19+
# You can commit changes for your own names and email addresses without review.
2020
# If you want to add entries for other people, please have them review the
2121
# addition.
2222
#

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Intel LLVM-based projects:
1010

1111
[![](https://spec.oneapi.io/oneapi-logo-white-scaled.jpg)](https://www.oneapi.io/)
1212

13-
[![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
14-
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
13+
[![SYCL Post Commit](https://github.com/intel/llvm/actions/workflows/sycl_post_commit.yml/badge.svg?branch=sycl)](https://github.com/intel/llvm/actions/workflows/sycl_post_commit.yml)
14+
[![Generate Doxygen documentation](https://github.com/intel/llvm/actions/workflows/gh_pages.yml/badge.svg?branch=sycl)](https://github.com/intel/llvm/actions/workflows/gh_pages.yml)
1515

1616
The Data Parallel C++ or DPC++ is a LLVM-based compiler project that implements
1717
compiler and runtime support for the SYCL\* language. The project is hosted in

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ class BinaryContext {
489489
void adjustCodePadding();
490490

491491
/// Regular page size.
492-
static constexpr unsigned RegularPageSize = 0x1000;
492+
unsigned RegularPageSize{0x1000};
493+
static constexpr unsigned RegularPageSizeX86 = 0x1000;
494+
static constexpr unsigned RegularPageSizeAArch64 = 0x10000;
493495

494496
/// Huge page size to use.
495497
static constexpr unsigned HugePageSize = 0x200000;

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,10 +1299,11 @@ class BinaryFunction {
12991299
case ELF::R_X86_64_32:
13001300
case ELF::R_X86_64_32S:
13011301
case ELF::R_X86_64_64:
1302+
case ELF::R_X86_64_PC8:
1303+
case ELF::R_X86_64_PC32:
1304+
case ELF::R_X86_64_PC64:
13021305
Relocations[Offset] = Relocation{Offset, Symbol, RelType, Addend, Value};
13031306
return;
1304-
case ELF::R_X86_64_PC32:
1305-
case ELF::R_X86_64_PC8:
13061307
case ELF::R_X86_64_PLT32:
13071308
case ELF::R_X86_64_GOTPCRELX:
13081309
case ELF::R_X86_64_REX_GOTPCRELX:

bolt/include/bolt/Core/DebugData.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ class DebugInfoBinaryPatcher : public SimpleBinaryPatcher {
490490
PatchBaseClass,
491491
PatchValue32,
492492
PatchValue64to32,
493+
PatchValue32GenericSize,
493494
PatchValue64,
494495
PatchValueVariable,
495496
ReferencePatchValue,
@@ -536,6 +537,22 @@ class DebugInfoBinaryPatcher : public SimpleBinaryPatcher {
536537
uint32_t Value;
537538
};
538539

540+
/// Patch for 4 byte entry, where original entry size is not 4 bytes or 8
541+
/// bytes.
542+
struct DebugPatch32GenericSize : public Patch {
543+
DebugPatch32GenericSize(uint32_t O, uint32_t V, uint32_t OVS)
544+
: Patch(O, DebugPatchKind::PatchValue32GenericSize) {
545+
Value = V;
546+
OldValueSize = OVS;
547+
}
548+
549+
static bool classof(const Patch *Writer) {
550+
return Writer->getKind() == DebugPatchKind::PatchValue32GenericSize;
551+
}
552+
uint32_t Value;
553+
uint32_t OldValueSize;
554+
};
555+
539556
struct DebugPatch64 : public Patch {
540557
DebugPatch64(uint32_t O, uint64_t V)
541558
: Patch(O, DebugPatchKind::PatchValue64) {
@@ -693,6 +710,9 @@ class DebugInfoBinaryPatcher : public SimpleBinaryPatcher {
693710
case DebugPatchKind::PatchValue64to32:
694711
delete reinterpret_cast<DebugPatch64to32 *>(P);
695712
break;
713+
case DebugPatchKind::PatchValue32GenericSize:
714+
delete reinterpret_cast<DebugPatch32GenericSize *>(P);
715+
break;
696716
case DebugPatchKind::PatchValue64:
697717
delete reinterpret_cast<DebugPatch64 *>(P);
698718
break;

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,7 @@ class MCPlusBuilder {
424424

425425
/// Return a register number that is guaranteed to not match with
426426
/// any real register on the underlying architecture.
427-
virtual MCPhysReg getNoRegister() const {
428-
llvm_unreachable("not implemented");
429-
}
427+
MCPhysReg getNoRegister() const { return MCRegister::NoRegister; }
430428

431429
/// Return a register corresponding to a function integer argument \p ArgNo
432430
/// if the argument is passed in a register. Or return the result of
@@ -528,11 +526,6 @@ class MCPlusBuilder {
528526
return false;
529527
}
530528

531-
virtual bool isMOVSX64rm32(const MCInst &Inst) const {
532-
llvm_unreachable("not implemented");
533-
return false;
534-
}
535-
536529
virtual bool isLeave(const MCInst &Inst) const {
537530
llvm_unreachable("not implemented");
538531
return false;
@@ -1289,7 +1282,18 @@ class MCPlusBuilder {
12891282

12901283
/// Replace instruction with a shorter version that could be relaxed later
12911284
/// if needed.
1292-
virtual bool shortenInstruction(MCInst &Inst) const {
1285+
virtual bool shortenInstruction(MCInst &Inst,
1286+
const MCSubtargetInfo &STI) const {
1287+
llvm_unreachable("not implemented");
1288+
return false;
1289+
}
1290+
1291+
/// Convert a move instruction into a conditional move instruction, given a
1292+
/// condition code.
1293+
virtual bool
1294+
convertMoveToConditionalMove(MCInst &Inst, unsigned CC,
1295+
bool AllowStackMemOp = false,
1296+
bool AllowBasePtrStackMemOp = false) const {
12931297
llvm_unreachable("not implemented");
12941298
return false;
12951299
}
@@ -1327,6 +1331,16 @@ class MCPlusBuilder {
13271331
return IndirectBranchType::UNKNOWN;
13281332
}
13291333

1334+
/// Analyze branch \p Instruction in PLT section and try to determine
1335+
/// associated got entry address.
1336+
virtual uint64_t analyzePLTEntry(MCInst &Instruction,
1337+
InstructionIterator Begin,
1338+
InstructionIterator End,
1339+
uint64_t BeginPC) const {
1340+
llvm_unreachable("not implemented");
1341+
return 0;
1342+
}
1343+
13301344
virtual bool analyzeVirtualMethodCall(InstructionIterator Begin,
13311345
InstructionIterator End,
13321346
std::vector<MCInst *> &MethodFetchInsns,

bolt/include/bolt/Core/Relocation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct Relocation {
4949
/// Used to validate relocation correctness.
5050
uint64_t Value;
5151

52-
/// Return size of the given relocation \p Type.
52+
/// Return size in bytes of the given relocation \p Type.
5353
static size_t getSizeForType(uint64_t Type);
5454

5555
/// Return size of this relocation.

0 commit comments

Comments
 (0)