Skip to content

Commit e01e682

Browse files
Merge branch 'sycl' of https://github.com/intel/llvm into enable_esimd_emu_build
2 parents 0b9c1e7 + 81154ec commit e01e682

File tree

5,232 files changed

+330011
-151732
lines changed

Some content is hidden

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

5,232 files changed

+330011
-151732
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/gh_pages.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ name: Generate Doxygen documentation
33
on:
44
schedule:
55
- cron: 0 1 * * *
6+
pull_request:
7+
branches:
8+
- sycl
9+
paths:
10+
- '.github/workflows/gh_pages.yml'
11+
- 'clang/docs/**'
12+
- 'sycl/docs/**'
613

714
jobs:
815
build:
@@ -16,7 +23,7 @@ jobs:
1623
- name: Install deps
1724
run: |
1825
sudo apt-get install -y doxygen graphviz ssh ninja-build
19-
sudo pip3 install 'sphinx==4.1.2' 'myst-parser==0.15.1'
26+
sudo pip3 install 'sphinx==4.1.2' 'myst-parser==0.15.1' 'recommonmark==0.7.1'
2027
- name: Build Docs
2128
run: |
2229
mkdir -p $GITHUB_WORKSPACE/build
@@ -28,6 +35,7 @@ jobs:
2835
cmake --build . --target docs-sycl-html
2936
cmake --build . --target docs-clang-html
3037
- name: Deploy
38+
if: ${{ github.event_name == 'schedule' }}
3139
env:
3240
SSH_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
3341
run: |

.github/workflows/new-issues.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Labeling new issues
2+
on:
3+
issues:
4+
types: ['opened']
5+
6+
jobs:
7+
automate-issues-labels:
8+
runs-on: ubuntu-latest
9+
if: github.repository == 'llvm/llvm-project'
10+
steps:
11+
- uses: andymckay/[email protected]
12+
with:
13+
add-labels: "new issue"
14+
ignore-if-labeled: true

.github/workflows/sycl_containers.yaml

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
schedule:
55
# Every 1st and 15th day of month
66
- cron: '0 0 1,15 * *'
7+
push:
8+
branches:
9+
- sycl
10+
paths:
11+
- 'devops/containers/**'
12+
pull_request:
13+
paths:
14+
- 'devops/containers/**'
715

816
jobs:
917
base_image_ubuntu2004:
@@ -14,19 +22,56 @@ jobs:
1422
- name: Checkout
1523
uses: actions/checkout@v2
1624
with:
17-
fetch-depth: 1
18-
- name: Login to GitHub Container Registry
19-
uses: docker/login-action@v1
25+
fetch-depth: 2
26+
- name: Build and Push Container
27+
uses: ./devops/actions/build_container
2028
with:
21-
registry: ghcr.io
29+
push: ${{ github.event_name != 'pull_request' }}
30+
file: ubuntu2004_base
2231
username: ${{ github.repository_owner }}
2332
password: ${{ secrets.GITHUB_TOKEN }}
24-
- name: Build and Push Container
25-
uses: docker/build-push-action@v2
26-
with:
27-
push: true
2833
tags: |
2934
ghcr.io/${{ github.repository }}/ubuntu2004_base:${{ github.sha }}
3035
ghcr.io/${{ github.repository }}/ubuntu2004_base:latest
31-
context: ${{ github.workspace }}/devops
32-
file: ${{ github.workspace }}/devops/containers/ubuntu2004_base.Dockerfile
36+
build_image_ubuntu2004:
37+
if: github.repository == 'intel/llvm'
38+
name: Build Ubuntu Docker image
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v2
43+
with:
44+
fetch-depth: 2
45+
- name: Build and Push Container
46+
uses: ./devops/actions/build_container
47+
with:
48+
push: ${{ github.event_name != 'pull_request' }}
49+
file: ubuntu2004_build
50+
username: ${{ github.repository_owner }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
tags: |
53+
ghcr.io/${{ github.repository }}/ubuntu2004_build:${{ github.sha }}
54+
ghcr.io/${{ github.repository }}/ubuntu2004_build:latest
55+
# This job produces a Docker container with the latest versions of Intel
56+
# drivers, that can be found on GitHub.
57+
drivers_image_ubuntu2004:
58+
if: github.repository == 'intel/llvm'
59+
name: Intel Drivers Ubuntu 20.04 Docker image
60+
runs-on: ubuntu-latest
61+
needs: base_image_ubuntu2004
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v2
65+
with:
66+
fetch-depth: 2
67+
- name: Build and Push Container
68+
uses: ./devops/actions/build_container
69+
with:
70+
push: ${{ github.event_name != 'pull_request' }}
71+
file: ubuntu2004_intel_drivers
72+
username: ${{ github.repository_owner }}
73+
password: ${{ secrets.GITHUB_TOKEN }}
74+
tags: |
75+
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest-${{ github.sha }}
76+
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest
77+

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
build_image:
1818
type: string
1919
required: false
20-
default: "ghcr.io/intel/llvm/ubuntu2004_base:latest"
20+
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
2121
build_runs_on:
2222
type: string
2323
required: false
@@ -56,12 +56,12 @@ jobs:
5656
env:
5757
INPUTS: ${{ toJSON(inputs) }}
5858
run: |
59-
if [[ "$GITHUB_EVENT_NAME" != "workflow_call" ]]; then
59+
if [[ "$GITHUB_WORKFLOW" == "Reusable SYCL Linux build and test workflow" ]]; then
6060
INPUTS="{
6161
\"cc\":\"gcc\",
6262
\"cxx\":\"g++\",
6363
\"build_runs_on\":\"sycl-precommit-linux\",
64-
\"build_image\":\"ghcr.io/intel/llvm/ubuntu2004_base:latest\",
64+
\"build_image\":\"ghcr.io/intel/llvm/ubuntu2004_build:latest\",
6565
\"build_github_cache\":\"false\",
6666
\"build_cache_root\":\"/__w/\",
6767
\"build_cache_suffix\":\"default\",
@@ -104,15 +104,18 @@ jobs:
104104
CACHE_SUFFIX: ${{ fromJSON(needs.configure.outputs.params).build_cache_suffix }}
105105
CACHE_SIZE: ${{ fromJSON(needs.configure.outputs.params).build_cache_size }}
106106
ARGS: ${{ fromJSON(needs.configure.outputs.params).build_configure_extra_args }}
107+
CUDA_LIB_PATH: "/usr/local/cuda/lib64/stubs"
107108
run: |
108109
mkdir -p $CACHE_ROOT/build_cache_$CACHE_SUFFIX
109110
mkdir -p $GITHUB_WORKSPACE/build
110111
cd $GITHUB_WORKSPACE/build
111112
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
112113
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
113-
--ci-defaults $ARGS --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
114+
--ci-defaults $ARGS --cuda --hip --hip-amd-arch="gfx906" \
115+
--cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
114116
--cmake-opt="-DLLVM_CCACHE_DIR=$CACHE_ROOT/build_cache_$CACHE_SUFFIX" \
115-
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=$CACHE_SIZE"
117+
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=$CACHE_SIZE" \
118+
--cmake-opt="-DSYCL_PI_TESTS=OFF"
116119
- name: Compile
117120
run: cmake --build $GITHUB_WORKSPACE/build
118121
# TODO allow to optionally disable in-tree checks
@@ -128,6 +131,8 @@ jobs:
128131
- name: check-sycl
129132
if: always()
130133
run: |
134+
# TODO consider moving this to Dockerfile
135+
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
131136
cmake --build $GITHUB_WORKSPACE/build --target check-sycl
132137
- name: check-llvm-spirv
133138
if: always()
@@ -137,6 +142,10 @@ jobs:
137142
if: always()
138143
run: |
139144
cmake --build $GITHUB_WORKSPACE/build --target check-xptifw
145+
- name: check-libclc
146+
if: always()
147+
run: |
148+
cmake --build $GITHUB_WORKSPACE/build --target check-libclc
140149
- name: Install
141150
# TODO replace utility installation with a single CMake target
142151
run: |

.github/workflows/sycl_nightly.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: SYCL Nightly Builds
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 3 * * *'
7+
pull_request:
8+
paths:
9+
- 'devops/containers/ubuntu2004_preinstalled.Dockerfile'
10+
- '.github/workflows/sycl_nightly.yml'
11+
12+
jobs:
13+
ubuntu2004_build_test:
14+
if: github.repository == 'intel/llvm'
15+
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
16+
with:
17+
build_runs_on: build
18+
build_github_cache: true
19+
build_cache_root: "/__w/"
20+
build_artifact_suffix: default
21+
ubuntu2004_docker_build_push:
22+
if: github.repository == 'intel/llvm'
23+
runs-on: ubuntu-latest
24+
needs: ubuntu2004_build_test
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/download-artifact@v2
28+
with:
29+
name: sycl_linux_default
30+
path: devops/
31+
- name: Build and Push Container (with drivers)
32+
uses: ./devops/actions/build_container
33+
with:
34+
push: ${{ github.event_name != 'pull_request' }}
35+
file: ubuntu2004_preinstalled
36+
username: ${{ github.repository_owner }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
build-args: |
39+
base_image=ghcr.io/intel/llvm/ubuntu2004_intel_drivers
40+
base_tag=latest
41+
tags: |
42+
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:${{ github.sha }}
43+
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:latest
44+
- name: Build and Push Container (no drivers)
45+
uses: ./devops/actions/build_container
46+
with:
47+
push: ${{ github.event_name != 'pull_request' }}
48+
file: ubuntu2004_preinstalled
49+
username: ${{ github.repository_owner }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
build-args: |
52+
base_image=ghcr.io/intel/llvm/ubuntu2004_base
53+
base_tag=latest
54+
tags: |
55+
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers-${{ github.sha }}
56+
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers
57+

.github/workflows/sycl_post_commit.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ jobs:
99
name: Linux Default
1010
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
1111
with:
12-
build_cache_root: "__w/llvm"
12+
build_runs_on: build
13+
build_cache_root: "/__w/llvm"
1314
build_github_cache: true
1415
build_artifact_suffix: default
1516
linux_no_assert:
16-
name: Linux Default
17+
name: Linux (no assert)
1718
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
1819
with:
19-
build_cache_root: "__w/llvm"
20+
build_runs_on: build
21+
build_cache_root: "/__w/llvm"
2022
build_github_cache: true
2123
build_cache_suffix: gcc_no_assertions
2224
build_artifact_suffix: gcc_no_assertions

.github/workflows/sycl_precommit.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ on:
77

88
jobs:
99
lint:
10-
# TODO use nightly builds of SYCL to get clang-format
1110
runs-on: ubuntu-latest
11+
container:
12+
image: ghcr.io/intel/llvm/sycl_ubuntu2004_nightly:no-drivers
1213
steps:
13-
- name: Get clang-format first
14-
run: sudo apt-get install -yqq clang-format
15-
1614
- uses: actions/checkout@v2
1715
with:
1816
fetch-depth: 2
19-
2017
- name: Run clang-format
2118
uses: ./devops/actions/clang-format
2219

@@ -28,7 +25,7 @@ jobs:
2825
if: always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
2926
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
3027
with:
31-
build_runs_on: "sycl-precommit-linux"
28+
build_runs_on: "build"
3229
build_cache_root: "/__w/"
3330
build_cache_size: "8G"
3431
build_artifact_suffix: "default"

buildbot/configure.py

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ def do_configure(args):
1515

1616
llvm_external_projects = 'sycl;llvm-spirv;opencl;libdevice;xpti;xptifw'
1717

18+
libclc_amd_target_names = ';amdgcn--;amdgcn--amdhsa'
19+
libclc_nvidia_target_names = 'nvptx64--;nvptx64--nvidiacl'
20+
1821
if args.llvm_external_projects:
1922
llvm_external_projects += ";" + args.llvm_external_projects.replace(",", ";")
2023

@@ -42,14 +45,6 @@ def do_configure(args):
4245
sycl_enable_xpti_tracing = 'ON'
4346
xpti_enable_werror = 'ON'
4447

45-
if args.ci_defaults:
46-
print("#############################################")
47-
print("# Default CI configuration will be applied. #")
48-
print("#############################################")
49-
50-
# For clang-format and clang-tidy
51-
llvm_enable_projects += ";clang-tools-extra"
52-
5348
# replace not append, so ARM ^ X86
5449
if args.arm:
5550
llvm_targets_to_build = 'ARM;AArch64'
@@ -59,22 +54,22 @@ def do_configure(args):
5954

6055
if args.cuda:
6156
llvm_targets_to_build += ';NVPTX'
62-
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
57+
libclc_targets_to_build = libclc_nvidia_target_names
6358
libclc_gen_remangled_variants = 'ON'
6459
sycl_build_pi_cuda = 'ON'
6560

6661
if args.hip:
6762
if args.hip_platform == 'AMD':
6863
llvm_targets_to_build += ';AMDGPU'
69-
libclc_targets_to_build += ';amdgcn--;amdgcn--amdhsa'
64+
libclc_targets_to_build += libclc_amd_target_names
7065
if args.hip_amd_arch:
7166
sycl_clang_extra_flags += "-Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch="+args.hip_amd_arch
7267

7368
# The HIP plugin for AMD uses lld for linking
7469
llvm_enable_projects += ';lld'
7570
elif args.hip_platform == 'NVIDIA' and not args.cuda:
7671
llvm_targets_to_build += ';NVPTX'
77-
libclc_targets_to_build += ';nvptx64--;nvptx64--nvidiacl'
72+
libclc_targets_to_build += libclc_nvidia_target_names
7873
libclc_gen_remangled_variants = 'ON'
7974

8075
sycl_build_pi_hip_platform = args.hip_platform
@@ -95,7 +90,28 @@ def do_configure(args):
9590
llvm_build_shared_libs = 'ON'
9691

9792
if args.use_lld:
98-
llvm_enable_lld = 'ON'
93+
llvm_enable_lld = 'ON'
94+
95+
# CI Default conditionally appends to options, keep it at the bottom of
96+
# args handling
97+
if args.ci_defaults:
98+
print("#############################################")
99+
print("# Default CI configuration will be applied. #")
100+
print("#############################################")
101+
102+
# For clang-format and clang-tidy
103+
llvm_enable_projects += ";clang-tools-extra"
104+
# libclc is required for CI validation
105+
if 'libclc' not in llvm_enable_projects:
106+
llvm_enable_projects += ';libclc'
107+
# libclc passes `--nvvm-reflect-enable=false`, build NVPTX to enable it
108+
if 'NVPTX' not in llvm_targets_to_build:
109+
llvm_targets_to_build += ';NVPTX'
110+
# Add both NVIDIA and AMD libclc targets
111+
if libclc_amd_target_names not in libclc_targets_to_build:
112+
libclc_targets_to_build += libclc_amd_target_names
113+
if libclc_nvidia_target_names not in libclc_targets_to_build:
114+
libclc_targets_to_build += libclc_nvidia_target_names
99115

100116
install_dir = os.path.join(abs_obj_dir, "install")
101117

0 commit comments

Comments
 (0)