Skip to content

Commit 8f2d9c4

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into optimize-build
2 parents 231a1a3 + 5deccd2 commit 8f2d9c4

File tree

9,412 files changed

+491186
-316040
lines changed

Some content is hidden

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

9,412 files changed

+491186
-316040
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ CheckOptions:
1818
value: 1
1919
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
2020
value: 1
21+
- key: modernize-use-default-member-init.UseAssignment
22+
value: 1

.github/workflows/issue-subscriber.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,16 @@ 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+
chmod a+x github-automation.py
17+
pip install PyGithub
18+
1319
- name: Update watchers
14-
uses: actions/github-script@v5
15-
with:
16-
github-token: ${{ secrets.ISSUE_MENTION_SECRET }}
17-
script: |
18-
const teamname = "issue-subscribers-" + context.payload.label.name.replace(/ /g, "-").replace(":","-").replace("/","-");
19-
const comment = "@llvm/" + teamname;
20-
try {
21-
// This will throw an exception if the team does not exist and no
22-
// comment will be created.
23-
team = await github.rest.teams.getByName({
24-
org: context.repo.owner,
25-
team_slug: teamname
26-
});
27-
github.rest.issues.createComment({
28-
issue_number: context.issue.number,
29-
owner: context.repo.owner,
30-
repo: context.repo.repo,
31-
body: comment
32-
});
33-
} catch (e){
34-
console.log(e);
35-
}
20+
run: |
21+
./github-automation.py \
22+
--token ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }} \
23+
issue-subscriber \
24+
--issue-number ${{ github.event.issue.number }} \
25+
--label-name ${{ github.event.label.name }}

.github/workflows/sycl_containers.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ on:
99
- sycl
1010
paths:
1111
- 'devops/containers/**'
12+
- 'devops/dependencies.json'
13+
- '.github/workflows/sycl_containers.yaml'
1214
pull_request:
1315
paths:
1416
- 'devops/containers/**'
17+
- 'devops/dependencies.json'
18+
- '.github/workflows/sycl_containers.yaml'
1519

1620
jobs:
1721
base_image_ubuntu2004:
@@ -52,6 +56,7 @@ jobs:
5256
tags: |
5357
ghcr.io/${{ github.repository }}/ubuntu2004_build:${{ github.sha }}
5458
ghcr.io/${{ github.repository }}/ubuntu2004_build:latest
59+
5560
# This job produces a Docker container with the latest versions of Intel
5661
# drivers, that can be found on GitHub.
5762
drivers_image_ubuntu2004:
@@ -64,6 +69,15 @@ jobs:
6469
uses: actions/checkout@v2
6570
with:
6671
fetch-depth: 2
72+
- name: Get dependencies configuration
73+
id: deps
74+
run: |
75+
DEPS=`cat devops/dependencies.json`
76+
DEPS="${DEPS//'%'/'%25'}"
77+
DEPS="${DEPS//$'\n'/'%0A'}"
78+
DEPS="${DEPS//$'\r'/'%0D'}"
79+
echo $DEPS
80+
echo "::set-output name=deps::$DEPS"
6781
- name: Build and Push Container
6882
uses: ./devops/actions/build_container
6983
with:
@@ -74,4 +88,33 @@ jobs:
7488
tags: |
7589
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest-${{ github.sha }}
7690
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest
91+
build-args: |
92+
compute_runtime_tag=${{fromJson(steps.deps.outputs.deps).linux.compute_runtime.github_tag}}
93+
igc_tag=${{fromJson(steps.deps.outputs.deps).linux.igc.github_tag}}
94+
tbb_tag=${{fromJson(steps.deps.outputs.deps).linux.tbb.github_tag}}
95+
fpgaemu_tag=${{fromJson(steps.deps.outputs.deps).linux.fpgaemu.github_tag}}
96+
cpu_tag=${{fromJson(steps.deps.outputs.deps).linux.oclcpu.github_tag}}
97+
98+
# This job produces a Docker container with the latest versions of Intel
99+
# drivers, that can be found on GitHub.
100+
drivers_image_ubuntu2004_unstable:
101+
if: github.repository == 'intel/llvm'
102+
name: Intel Drivers (unstable) Ubuntu 20.04 Docker image
103+
runs-on: ubuntu-latest
104+
needs: base_image_ubuntu2004
105+
steps:
106+
- name: Checkout
107+
uses: actions/checkout@v2
108+
with:
109+
fetch-depth: 2
110+
- name: Build and Push Container
111+
uses: ./devops/actions/build_container
112+
with:
113+
push: ${{ github.event_name != 'pull_request' }}
114+
file: ubuntu2004_intel_drivers
115+
username: ${{ github.repository_owner }}
116+
password: ${{ secrets.GITHUB_TOKEN }}
117+
tags: |
118+
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:unstable-${{ github.sha }}
119+
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:unstable
77120

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,33 +150,34 @@ jobs:
150150
--cmake-opt="-DLLVM_INSTALL_UTILS=ON" \
151151
--cmake-opt="-DSYCL_PI_TESTS=OFF"
152152
- name: Compile
153+
id: build
153154
run: cmake --build $GITHUB_WORKSPACE/build
154155
# TODO allow to optionally disable in-tree checks
155156
- name: check-llvm
156-
if: always()
157+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
157158
run: |
158159
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
159160
- name: check-clang
160-
if: always()
161+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
161162
run: |
162163
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
163164
cmake --build $GITHUB_WORKSPACE/build --target check-clang
164165
- name: check-sycl
165-
if: always()
166+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
166167
run: |
167168
# TODO consider moving this to Dockerfile
168169
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
169170
cmake --build $GITHUB_WORKSPACE/build --target check-sycl
170171
- name: check-llvm-spirv
171-
if: always()
172+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
172173
run: |
173174
cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv
174175
- name: check-xptifw
175-
if: always()
176+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
176177
run: |
177178
cmake --build $GITHUB_WORKSPACE/build --target check-xptifw
178179
- name: check-libclc
179-
if: always()
180+
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
180181
run: |
181182
cmake --build $GITHUB_WORKSPACE/build --target check-libclc
182183
- name: Install
@@ -191,6 +192,9 @@ jobs:
191192
cmake --build $GITHUB_WORKSPACE/build --target install-clang-format
192193
cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy
193194
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-size
195+
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-cov
196+
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
197+
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
194198
# TODO this should be resolved in CMakeLists.txt
195199
cmake --build $GITHUB_WORKSPACE/build --target install-lld || echo "skipped"
196200

.github/workflows/sycl_nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
build_github_cache: true
1919
build_cache_root: "/__w/"
2020
build_artifact_suffix: default
21+
lts_config: "ocl_gen9;ocl_x64;hip_amdgpu"
2122
ubuntu2004_docker_build_push:
2223
if: github.repository == 'intel/llvm'
2324
runs-on: ubuntu-latest

.github/workflows/sycl_precommit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- sycl
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
812
jobs:
913
lint:
1014
runs-on: ubuntu-latest

bolt/CMakeLists.txt

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
include(ExternalProject)
2+
3+
set(BOLT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
4+
set(BOLT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
5+
set(CMAKE_CXX_STANDARD 14)
6+
7+
set(BOLT_ENABLE_RUNTIME OFF)
8+
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
9+
set(BOLT_ENABLE_RUNTIME ON)
10+
endif()
11+
12+
set(BOLT_CLANG_EXE "" CACHE FILEPATH "Path to clang executable for the target \
13+
architecture for use in BOLT tests")
14+
set(BOLT_LLD_EXE "" CACHE FILEPATH "Path to lld executable for the target \
15+
architecture for use in BOLT tests")
16+
17+
set(BOLT_INCLUDE_TESTS OFF)
18+
if (LLVM_INCLUDE_TESTS)
19+
if ("clang" IN_LIST LLVM_ENABLE_PROJECTS OR BOLT_CLANG_EXE)
20+
if ("clang" IN_LIST LLVM_ENABLE_PROJECTS AND BOLT_CLANG_EXE)
21+
message(WARNING "BOLT_CLANG_EXE is set and clang project is enabled. \
22+
BOLT_CLANG_EXE will be used for BOLT tests.")
23+
endif()
24+
if ("lld" IN_LIST LLVM_ENABLE_PROJECTS OR BOLT_LLD_EXE)
25+
if ("lld" IN_LIST LLVM_ENABLE_PROJECTS AND BOLT_LLD_EXE)
26+
message(WARNING "BOLT_LLD_EXE is set and lld project is enabled. \
27+
BOLT_LLD_EXE will be used for BOLT tests.")
28+
endif()
29+
set(BOLT_INCLUDE_TESTS ON)
30+
else()
31+
message(WARNING "Not including BOLT tests since lld is disabled. \
32+
Enable lld in LLVM_ENABLE_PROJECTS or provide a path to lld binary \
33+
in BOLT_LLD_EXE.")
34+
endif()
35+
else()
36+
message(WARNING "Not including BOLT tests since clang is disabled. \
37+
Enable clang in LLVM_ENABLE_PROJECTS or provide a path to clang \
38+
binary in BOLT_CLANG_EXE.")
39+
endif()
40+
endif()
41+
42+
if (BOLT_ENABLE_RUNTIME)
43+
message(STATUS "Building BOLT runtime libraries for X86")
44+
ExternalProject_Add(bolt_rt
45+
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/runtime"
46+
STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-stamps
47+
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins
48+
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
49+
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
50+
-DCMAKE_BUILD_TYPE=Release
51+
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
52+
-DCMAKE_INSTALL_PREFIX=${LLVM_BINARY_DIR}
53+
BUILD_ALWAYS True
54+
)
55+
install(CODE "execute_process\(COMMAND \${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=\${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/cmake_install.cmake \)"
56+
COMPONENT bolt)
57+
add_llvm_install_targets(install-bolt_rt
58+
DEPENDS bolt_rt bolt
59+
COMPONENT bolt)
60+
endif()
61+
62+
# Get the current git revision for BOLT.
63+
find_program(git_executable NAMES git git.exe git.cmd)
64+
if (git_executable)
65+
execute_process(COMMAND ${git_executable} rev-parse HEAD
66+
WORKING_DIRECTORY ${LLVM_MAIN_SRC_DIR}
67+
TIMEOUT 5
68+
RESULT_VARIABLE git_result
69+
OUTPUT_VARIABLE git_output)
70+
if( git_result EQUAL 0 )
71+
string(STRIP "${git_output}" git_ref_id)
72+
set(BOLT_REVISION "${git_ref_id}")
73+
endif()
74+
endif()
75+
76+
# If we can't find a revision, set it to "<unknown>".
77+
if (NOT BOLT_REVISION)
78+
set(BOLT_REVISION "<unknown>")
79+
endif()
80+
81+
configure_file(
82+
${CMAKE_CURRENT_SOURCE_DIR}/include/bolt/Utils/BoltRevision.inc.in
83+
${CMAKE_CURRENT_BINARY_DIR}/include/bolt/Utils/BoltRevision.inc)
84+
85+
include_directories(
86+
${CMAKE_CURRENT_SOURCE_DIR}/include
87+
${CMAKE_CURRENT_BINARY_DIR}/include
88+
)
89+
90+
add_subdirectory(lib)
91+
add_subdirectory(tools)
92+
93+
if (BOLT_INCLUDE_TESTS)
94+
if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
95+
add_subdirectory(unittests)
96+
list(APPEND BOLT_TEST_DEPS BoltUnitTests)
97+
endif()
98+
add_subdirectory(test)
99+
endif()
100+
101+
option(BOLT_INCLUDE_DOCS "Generate build targets for the BOLT docs."
102+
${LLVM_INCLUDE_DOCS})
103+
if (BOLT_INCLUDE_DOCS)
104+
add_subdirectory(docs)
105+
endif()

bolt/CODE_OWNERS.TXT

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
This file is a list of the people responsible for ensuring that patches for a
2+
particular part of BOLT are reviewed, either by themself or by someone else.
3+
They are also the gatekeepers for their part of BOLT, with the final word on
4+
what goes in or not.
5+
6+
The list is sorted by surname and formatted to allow easy grepping and
7+
beautification by scripts. The fields are: name (N), email (E), web-address
8+
(W), PGP key ID and fingerprint (P), description (D), snail-mail address
9+
(S) and (I) IRC handle. Each entry should contain at least the (N), (E) and
10+
(D) fields.
11+
12+
N: Maksim Panchenko, Rafael Auler
13+
14+
D: All parts not covered by someone else
15+
16+
N: Alexander Yermolovich
17+
18+
D: DWARF support
19+
20+
N: Vladislav Khmelevsky
21+
22+
D: AArch64 backend

0 commit comments

Comments
 (0)