Skip to content

Commit e57baca

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
Conflicts: sycl/test/check_device_code/vector/vector_math_ops.cpp
2 parents eb615f5 + 839f0af commit e57baca

File tree

85 files changed

+1003
-556
lines changed

Some content is hidden

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

85 files changed

+1003
-556
lines changed

.github/workflows/sycl-containers-igc-dev.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
- sycl
77
paths:
88
- 'devops/actions/build_container/**'
9+
- 'devops/scripts/**'
910
- 'devops/dependencies-igc-dev.json'
1011
- '.github/workflows/sycl-containers-igc-dev.yaml'
1112
pull_request:
1213
paths:
1314
- 'devops/actions/build_container/**'
15+
- 'devops/scripts/**'
1416
- 'devops/dependencies-igc-dev.json'
1517
- '.github/workflows/sycl-containers-igc-dev.yaml'
1618

.github/workflows/sycl-containers.yaml

Lines changed: 5 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
@@ -74,6 +78,7 @@ jobs:
7478
file: ${{ matrix.file }}
7579
username: ${{ github.repository_owner }}
7680
password: ${{ secrets.GITHUB_TOKEN }}
81+
sycl_ci_passwd: ${{ secrets.DOCKER_SUDO_PASSWORD }}
7782
tags: |
7883
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }}
7984
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}

.github/workflows/sycl-linux-precommit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ jobs:
134134
install_dev_igc_driver: >-
135135
${{ !contains(matrix.target_devices, 'ext_oneapi_cuda') &&
136136
!contains(matrix.target_devices, 'ext_oneapi_hip') &&
137-
matrix.use_igc_dev && contains(needs.detect_changes.outputs.filters, 'devigccfg') ||
137+
matrix.use_igc_dev &&
138+
(contains(needs.detect_changes.outputs.filters, 'devigccfg') || contains(needs.detect_changes.outputs.filters, 'drivers')) ||
138139
'false' }}
139140
# Run only if the PR does not have the 'ci-no-devigc' label.
140141
skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || 'false'}}

.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:

devops/actions/build_container/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ inputs:
2121
file:
2222
description: "Dockerfile"
2323
required: true
24+
sycl_ci_passwd:
25+
description: "Password to assign to sycl_ci user within a container"
26+
required: true
2427

2528
runs:
2629
using: "composite"
@@ -41,3 +44,4 @@ runs:
4144
file: ${{ github.workspace }}/devops/containers/${{ inputs.file }}.Dockerfile
4245
secrets: |
4346
github_token=${{ github.token }}
47+
sycl_ci_passwd=${{ inputs.sycl_ci_passwd }}
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+

devops/dependencies-igc-dev.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"linux": {
33
"igc_dev": {
4-
"github_tag": "igc-dev-3db59df",
5-
"version": "3db59df",
6-
"updated_at": "2024-12-03T20:43:00Z",
7-
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2248119261/zip",
4+
"github_tag": "igc-dev-e0d826a",
5+
"version": "e0d826a",
6+
"updated_at": "2024-12-17T21:18:30Z",
7+
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2327583926/zip",
88
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
99
}
1010
}

devops/scripts/install_drivers.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ InstallIGFX () {
162162
echo "Install libopencl-clang"
163163
# Workaround only, will download deb and install with dpkg once fixed.
164164
cp -d libopencl-clang.so.14* /usr/local/lib/
165+
rm /usr/local/lib/libigc.so /usr/local/lib/libigc.so.1* && \
166+
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so && \
167+
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so.1
165168
echo "Clean up"
166169
rm *.deb libopencl-clang.so.14*
167170
echo "$IGC_DEV_TAG" > /usr/local/lib/igc/IGCTAG.txt

llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,26 @@ class IntelTargetInfo<string Name, list<Aspect> Aspects, list<int> subGroupSizes
189189
// Note: only the "canonical" target names are listed here - see
190190
// SYCL::gen::resolveGenDevice().
191191
//
192-
// TODO: instructions on how to get "???" values below are required. Currently
193-
// device architectures below which have "???" in it are not fully supported.
194-
//
195-
// def : IntelTargetInfo<"intel_gpu_ptl_u", ???, ???>;
196-
// def : IntelTargetInfo<"intel_gpu_ptl_h", ???, ???>;
192+
// When adding the new Intel architectures, the ideal way to get these
193+
// values is to run sycl-ls --verbose on the target machine. However,
194+
// if you don't have access to the target machine, then you can look in
195+
// the intel/compute-runtime source code to get the values. For
196+
// the fp64 and atomic64 aspects, look for the definition
197+
// of specific RuntimeCapabilityTable's. These will be defined in
198+
// a file called hw_info_<device>.cpp. For example, for PVC, it
199+
// would be hw_info_pvc.cpp. For fp16, this is supported by all
200+
// Intel GPUs currently. (see definition of getDeviceExtensions in
201+
// compiler_product_helper_base.inl). For the supported sub-group sizes,
202+
// it is not as straightforward. They are defined per family in
203+
// GfxCoreHelperHw<Family>::getDeviceSubGroupSizes and by default
204+
// the default sub-group sizes are 8, 16, and 32. (see gfx_core_helper_base.inl)
205+
// However, this can be overriden by specific families. For example,
206+
// gfx_core_helper_xe_hpc_core.cpp defines the supported sub-group
207+
// sizes to be 16 and 32, which corresponds to PVC having 16 and 32
208+
// as sub-group sizes the supported sub-group sizes.
209+
210+
def : IntelTargetInfo<"intel_gpu_ptl_u", Fp16Fp64Atomic64, Sg16_32>;
211+
def : IntelTargetInfo<"intel_gpu_ptl_h", Fp16Fp64Atomic64, Sg16_32>;
197212
def : IntelTargetInfo<"intel_gpu_lnl_m", Fp16Fp64Atomic64, Sg16_32>;
198213
def : IntelTargetInfo<"intel_gpu_bmg_g21", Fp16Fp64Atomic64, Sg16_32>;
199214
def : IntelTargetInfo<"intel_gpu_arl_h", Fp16Fp64Atomic64, Sg8_16_32>;
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# commit b7047f6c36ec17b8560c2f1cd9ac9521715a9127
2-
# Merge: 73e5f3c6ff2d fcddf077c290
3-
# Author: Martin Grant <martin.morrisongrant@codeplay.com>
4-
# Date: Fri Dec 13 14:20:15 2024 +0000
5-
# Merge pull request #2454 from Bensuo/l0_cmd-buf_multi-device
6-
# Fix L0 command-buffer consumption of multi-device kernels
7-
set(UNIFIED_RUNTIME_TAG b7047f6c36ec17b8560c2f1cd9ac9521715a9127)
1+
# commit 39df0317814c164f5242eda8d6f08550f6268492
2+
# Merge: 68d93efd be27d8f0
3+
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
4+
# Date: Mon Dec 16 13:53:13 2024 +0000
5+
# Merge pull request #2467 from nrspruit/fix_external_import_function_call
6+
# [L0] Fix external semaphore import function calls to match the header
7+
set(UNIFIED_RUNTIME_TAG 39df0317814c164f5242eda8d6f08550f6268492)

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)