Skip to content

Commit 4f773d5

Browse files
committed
Merge branch 'sycl' of https://github.com/intel/llvm into ianayl/2way-prefetch
2 parents 71765c6 + 746a2bd commit 4f773d5

File tree

70 files changed

+936
-534
lines changed

Some content is hidden

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

70 files changed

+936
-534
lines changed

.github/workflows/sycl-containers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
file: ubuntu2204_build
4848
tag: latest
4949
build_args: ""
50+
- name: Build Ubuntu 24.04 oneAPI Docker image
51+
file: ubuntu2404_build_oneapi
52+
tag: latest
53+
build_args: ""
5054
- name: Intel Drivers Ubuntu 22.04 Docker image
5155
file: ubuntu2204_intel_drivers
5256
tag: latest

.github/workflows/sycl-rel-nightly.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ on:
77

88
permissions: read-all
99

10-
env:
11-
# NOTE: so that GitHub Actions can trigger the scheduled workflow run - the
12-
# workflow file should be on the default branch. Therefore every job should
13-
# checkout the release branch.
14-
SYCL_REL_BRANCH: "draft-sycl-rel-6_0_0"
15-
1610
jobs:
1711
# To avoid unnecessary scheduled runs this job checks if there are new commits
1812
# since the last run. More precisely, it checks if the last commit is older
@@ -25,7 +19,7 @@ jobs:
2519
steps:
2620
- uses: actions/checkout@v4
2721
with:
28-
ref: ${{ env.SYCL_REL_BRANCH }}
22+
ref: draft-sycl-rel-6_0_0
2923
- run: git show --quiet | tee -a $GITHUB_STEP_SUMMARY
3024

3125
- id: is_new_commit
@@ -45,7 +39,7 @@ jobs:
4539
build_artifact_suffix: v6
4640
build_configure_extra_args: '--hip --cuda'
4741
merge_ref: ''
48-
ref: ${{ env.SYCL_REL_BRANCH }}
42+
ref: draft-sycl-rel-6_0_0
4943

5044
# We upload the build for people to download/use, override its name and
5145
# prefer widespread gzip compression.
@@ -113,7 +107,7 @@ jobs:
113107
tests_selector: ${{ matrix.tests_selector }}
114108
extra_lit_opts: ${{ matrix.extra_lit_opts }}
115109
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
116-
ref: ${{ env.SYCL_REL_BRANCH }}
110+
ref: draft-sycl-rel-6_0_0
117111
merge_ref: ''
118112
sycl_toolchain_artifact: sycl_linux_default
119113
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
@@ -127,7 +121,7 @@ jobs:
127121
# We upload both Linux/Windows build via Github's "Releases"
128122
# functionality, make sure Linux/Windows names follow the same pattern.
129123
artifact_archive_name: sycl_windows.tar.gz
130-
build_ref: ${{ env.SYCL_REL_BRANCH }}
124+
build_ref: draft-sycl-rel-6_0_0
131125

132126
e2e-win:
133127
needs: build-win
@@ -142,7 +136,7 @@ jobs:
142136
runner: '["Windows","gen12"]'
143137
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
144138
extra_lit_opts: --param gpu-intel-gen12=True
145-
ref: ${{ env.SYCL_REL_BRANCH }}
139+
ref: draft-sycl-rel-6_0_0
146140

147141
cuda-aws-start:
148142
needs: [ubuntu2204_build]
@@ -151,7 +145,7 @@ jobs:
151145
secrets: inherit
152146
with:
153147
mode: start
154-
ref: ${{ env.SYCL_REL_BRANCH }}
148+
ref: draft-sycl-rel-6_0_0
155149

156150
cuda-run-tests:
157151
needs: [ubuntu2204_build, cuda-aws-start]
@@ -163,7 +157,7 @@ jobs:
163157
image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab
164158
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1
165159
target_devices: ext_oneapi_cuda:gpu
166-
ref: ${{ env.SYCL_REL_BRANCH }}
160+
ref: draft-sycl-rel-6_0_0
167161
merge_ref: ''
168162

169163
sycl_toolchain_artifact: sycl_linux_default
@@ -177,4 +171,4 @@ jobs:
177171
secrets: inherit
178172
with:
179173
mode: stop
180-
ref: ${{ env.SYCL_REL_BRANCH }}
174+
ref: draft-sycl-rel-6_0_0

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,19 @@ jobs:
7373
name: Build + LIT
7474
runs-on: [Windows, build]
7575
environment: WindowsCILock
76-
# TODO use cached checkout
7776
outputs:
7877
build_conclusion: ${{ steps.build.conclusion }}
7978
steps:
8079
- uses: actions/checkout@v4
8180
with:
82-
path: src
83-
ref: ${{ inputs.build_ref || github.sha }}
84-
fetch-depth: 1
81+
sparse-checkout: |
82+
devops/actions
83+
ref: ${{ inputs.ref || github.sha }}
8584
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
8685
with:
8786
arch: amd64
8887
- name: Setup oneAPI env
89-
uses: ./src/devops/actions/setup_windows_oneapi_env
88+
uses: ./devops/actions/setup_windows_oneapi_env
9089
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
9190
- name: Set env
9291
run: |
@@ -96,7 +95,12 @@ jobs:
9695
echo "CCACHE_DIR=D:\github\_work\cache\${{ inputs.build_cache_suffix }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
9796
echo "CCACHE_MAXSIZE=10G" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
9897
- name: Register cleanup after job is finished
99-
uses: ./src/devops/actions/cleanup
98+
uses: ./devops/actions/cleanup
99+
- uses: ./devops/actions/cached_checkout
100+
with:
101+
path: src
102+
ref: ${{ inputs.build_ref || github.sha }}
103+
cache_path: "D:\\\\github\\\\_work\\\\repo_cache\\\\"
100104
- name: Configure
101105
shell: cmd
102106
env:

.github/workflows/sycl-windows-run-tests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,29 @@ jobs:
4747
environment: WindowsCILock
4848
env: ${{ fromJSON(inputs.env) }}
4949
steps:
50-
# TODO: use cached_checkout
5150
- uses: actions/checkout@v4
5251
with:
53-
persist-credentials: false
52+
sparse-checkout: |
53+
devops/actions
5454
ref: ${{ inputs.ref || github.sha }}
55-
path: llvm
5655
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
5756
with:
5857
arch: amd64
5958
- name: Setup oneAPI env
60-
uses: ./llvm/devops/actions/setup_windows_oneapi_env
59+
uses: ./devops/actions/setup_windows_oneapi_env
6160
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
6261
- name: Set env
6362
run: |
6463
git config --system core.longpaths true
6564
git config --global core.autocrlf false
6665
echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
6766
- name: Register cleanup after job is finished
68-
uses: ./llvm/devops/actions/cleanup
67+
uses: ./devops/actions/cleanup
68+
- uses: ./devops/actions/cached_checkout
69+
with:
70+
path: llvm
71+
ref: ${{ inputs.build_ref || github.sha }}
72+
cache_path: "D:\\\\github\\\\_work\\\\repo_cache\\\\"
6973
- name: Download compiler toolchain
7074
uses: actions/download-artifact@v4
7175
with:
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM nvidia/cuda:12.6.3-devel-ubuntu24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
USER root
6+
7+
# Install SYCL prerequisites
8+
COPY scripts/install_build_tools.sh /install.sh
9+
RUN /install.sh
10+
11+
SHELL ["/bin/bash", "-ec"]
12+
13+
# Install oneAPI
14+
15+
# Make the directory if it doesn't exist yet.
16+
# This location is recommended by the distribution maintainers.
17+
RUN mkdir --parents --mode=0755 /etc/apt/keyrings
18+
# Download the key, convert the signing-key to a full
19+
# keyring required by apt and store in the keyring directory
20+
RUN wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
21+
gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null && \
22+
# Add rocm repo
23+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/6.3/ubuntu noble main" \
24+
| tee /etc/apt/sources.list.d/amdgpu.list && \
25+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.3 noble main" \
26+
| tee --append /etc/apt/sources.list.d/rocm.list && \
27+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
28+
| tee /etc/apt/preferences.d/rocm-pin-600 && \
29+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
30+
| tee /etc/apt/preferences.d/rocm-pin-600 && \
31+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor \
32+
| tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
33+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
34+
| tee /etc/apt/sources.list.d/oneAPI.list && \
35+
apt update
36+
# Install the ROCM kernel driver and oneAPI
37+
RUN apt install -yqq rocm-dev intel-oneapi-compiler-dpcpp-cpp && \
38+
apt-get clean && \
39+
rm -rf /var/lib/apt/lists/*
40+
41+
# By default Ubuntu sets an arbitrary UID value, that is different from host
42+
# system. When CI passes default UID value of 1001, some of LLVM tools fail to
43+
# discover user home directory and fail a few LIT tests. Fixes UID and GID to
44+
# 1001, that is used as default by GitHub Actions.
45+
RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash
46+
# Add sycl user to video/irc groups so that it can access GPU
47+
RUN usermod -aG video sycl
48+
RUN usermod -aG irc sycl
49+
50+
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
51+
52+
ENTRYPOINT ["/docker_entrypoint.sh"]
53+
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# commit 65ca77488cba98b321d88fe220e7b0e16a3cda65
2-
# Merge: 260322e8 b5f4a935
1+
# commit 8e819c2d4d3cd7e8a5d8b5ea64ed22dab575737f
2+
# Merge: 65ca7748 39df0317
33
# Author: Li, Ian <[email protected]>
4-
# Date: Fri Dec 13 13:48:45 2024 -0800
4+
# Date: Mon Dec 16 10:05:24 2024 -0800
55
# Merge branch 'main' of https://github.com/oneapi-src/unified-runtime into ianayl/2way-prefetch
6-
set(UNIFIED_RUNTIME_TAG 65ca77488cba98b321d88fe220e7b0e16a3cda65)
6+
set(UNIFIED_RUNTIME_TAG 8e819c2d4d3cd7e8a5d8b5ea64ed22dab575737f)

sycl/doc/EnvironmentVariables.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ variables in production code.</span>
196196

197197
| Environment variable | Values | Description |
198198
| -------------------- | ------ | ----------- |
199-
| `SYCL_PREFER_UR` | Integer | If non-0 then run through Unified Runtime if desired backend is supported there. Default is 0. |
200199
| `SYCL_UR_TRACE` | Integer | Described [below](#sycl_ur_trace-options) | Enable specified level of tracing for UR. |
201200
| `SYCL_QUEUE_THREAD_POOL_SIZE` | Positive integer | Number of threads in thread pool of queue. |
202201
| `SYCL_DEVICELIB_NO_FALLBACK` | Any(\*) | Disable loading and linking of device library images |

sycl/include/sycl/detail/type_traits.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,22 @@ struct map_type<T, From, To, Rest...> {
384384
template <typename T, typename... Ts>
385385
constexpr bool check_type_in_v = ((std::is_same_v<T, Ts> || ...));
386386

387+
#if __has_builtin(__type_pack_element)
388+
template <int N, typename... Ts>
389+
using nth_type_t = __type_pack_element<N, Ts...>;
390+
#else
391+
template <int N, typename T, typename... Ts> struct nth_type {
392+
using type = typename nth_type<N - 1, Ts...>::type;
393+
};
394+
395+
template <typename T, typename... Ts> struct nth_type<0, T, Ts...> {
396+
using type = T;
397+
};
398+
399+
template <int N, typename... Ts>
400+
using nth_type_t = typename nth_type<N, Ts...>::type;
401+
#endif
402+
387403
} // namespace detail
388404
} // namespace _V1
389405
} // namespace sycl

0 commit comments

Comments
 (0)