Skip to content

Commit 31d0782

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into steffen/refactor_kc
2 parents 66f82b1 + 7d92406 commit 31d0782

File tree

187 files changed

+5867
-1547
lines changed

Some content is hidden

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

187 files changed

+5867
-1547
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,18 @@ sycl/test-e2e/Adapters/ @intel/unified-runtime-reviewers
6363
sycl/ur_win_proxy_loader @intel/llvm-reviewers-runtime
6464
sycl/test-e2e/Adapters/dll-detach-order.cpp @intel/llvm-reviewers-runtime
6565

66-
# CUDA specific runtime implementations
66+
# CUDA and HIP
6767
sycl/include/sycl/ext/oneapi/experimental/cuda/ @intel/llvm-reviewers-cuda
68-
69-
# CUDA and HIP device code tests
7068
sycl/test/check_device_code/cuda/ @intel/llvm-reviewers-cuda
7169
sycl/test/check_device_code/hip/ @intel/llvm-reviewers-cuda
70+
llvm/include/llvm/SYCLLowerIR/GlobalOffset.h @intel/llvm-reviewers-cuda
71+
llvm/lib/SYCLLowerIR/GlobalOffset.cpp @intel/llvm-reviewers-cuda
72+
llvm/include/llvm/SYCLLowerIR/LocalAccessorToSharedMemory.h @intel/llvm-reviewers-cuda
73+
llvm/lib/SYCLLowerIR/LocalAccessorToSharedMemory.cpp @intel/llvm-reviewers-cuda
74+
llvm/include/llvm/SYCLLowerIR/SYCLCreateNVVMAnnotations.h @intel/llvm-reviewers-cuda
75+
llvm/lib/SYCLLowerIR/SYCLCreateNVVMAnnotations.cpp @intel/llvm-reviewers-cuda
76+
llvm/lib/Target/NVPTX @intel/llvm-reviewers-cuda
77+
llvm/lib/Target/AMDGPU @intel/llvm-reviewers-cuda
7278

7379
# XPTI instrumentation utilities
7480
xpti/ @intel/llvm-reviewers-runtime

.github/workflows/sycl-detect-changes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
- 'sycl/test-e2e/(ESIMD|InvokeSimd)/**'
7575
ur:
7676
- 'unified-runtime/**'
77+
- .github/workflows/ur-*
7778
7879
- name: Set output
7980
id: result

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,7 @@ jobs:
7777
- name: Intel Arc A-Series Graphics
7878
runner: '["Linux", "arc"]'
7979
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
80-
target_devices: level_zero:gpu;opencl:gpu
81-
reset_intel_gpu: true
82-
extra_lit_opts: --param matrix-xmx8=True
83-
- name: Intel Arc A-Series Graphics for L0 V2 adapter
84-
runner: '["Linux", "arc"]'
85-
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
86-
target_devices: level_zero_v2:gpu
80+
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
8781
reset_intel_gpu: true
8882
extra_lit_opts: --param matrix-xmx8=True
8983
- name: E2E tests with dev igc on Intel Arc A-Series Graphics

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ jobs:
322322
uses: ./devops/actions/run-tests/cts
323323
with:
324324
ref: ${{ inputs.tests_ref || 'main' }}
325+
cts_exclude_ref: ${{ inputs.repo_ref }}
325326
extra_cmake_args: ${{ inputs.extra_cmake_args }}
326327
cts_testing_mode: ${{ inputs.cts_testing_mode }}
327328
sycl_cts_artifact: ${{ inputs.sycl_cts_artifact }}

.github/workflows/ur-build-hw.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,14 @@ jobs:
9494
- name: Checkout LLVM
9595
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
9696

97-
- name: Install UR python dependencies
97+
# Latest distros do not allow global pip installation
98+
- name: Install UR python dependencies in venv
9899
working-directory: ${{github.workspace}}/unified-runtime
99-
run: pip install -r third_party/requirements.txt
100+
run: |
101+
python3 -m venv .venv
102+
. .venv/bin/activate
103+
echo "$PATH" >> $GITHUB_PATH
104+
pip install -r third_party/requirements.txt
100105
101106
- name: Download DPC++
102107
run: |

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4725,7 +4725,8 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI,
47254725

47264726
if (NewElemTy.isNull()) {
47274727
// Only emit diagnostic on host for 128-bit mode attribute
4728-
if (!(DestWidth == 128 && getLangOpts().CUDAIsDevice))
4728+
if (!(DestWidth == 128 &&
4729+
(getLangOpts().CUDAIsDevice || getLangOpts().SYCLIsDevice)))
47294730
Diag(AttrLoc, diag::err_machine_mode) << 1 /*Unsupported*/ << Name;
47304731
return;
47314732
}

clang/test/SemaSYCL/float128.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
sycl::queue deviceQueue;
77

8+
typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
89
typedef __float128 BIGTY;
910

1011
template <class T>

devops/actions/run-tests/cts/action.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ name: 'Run SYCL CTS tests'
33
inputs:
44
ref:
55
description: "Commit SHA or branch to checkout tests"
6-
required: false
7-
default: "main"
6+
required: true
7+
cts_exclude_ref:
8+
description: "Commit SHA or branch to checkout the cts_exclude_filter dir"
9+
required: true
810
extra_cmake_args:
911
required: false
1012
cts_testing_mode:
@@ -19,6 +21,18 @@ inputs:
1921
runs:
2022
using: "composite"
2123
steps:
24+
- name: Checkout cts_exclude_filter folder
25+
uses: actions/checkout@v4
26+
with:
27+
ref: ${{ inputs.cts_exclude_ref }}
28+
path: cts_exclude
29+
sparse-checkout: |
30+
sycl/cts_exclude_filter
31+
- name: Move sycl to root
32+
shell: bash
33+
run: |
34+
mv cts_exclude/sycl .
35+
rm -rf cts_exclude
2236
- name: Checkout SYCL CTS tests
2337
if: inputs.cts_testing_mode != 'run-only'
2438
uses: ./devops/actions/cached_checkout
@@ -42,11 +56,11 @@ runs:
4256
# If CTS_TESTS_TO_BUILD is null - use filter
4357
if [ -z "$CTS_TESTS_TO_BUILD" ]; then
4458
if [ "${{ contains(inputs.cts_testing_mode, 'build-only') }}" = "true" ]; then
45-
cts_exclude_filter=$PWD/devops/cts_exclude_filter_compfails
59+
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/compfails
4660
elif [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then
47-
cts_exclude_filter=$PWD/devops/cts_exclude_filter_OCL_CPU
61+
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/OCL_CPU
4862
elif [ "${{ contains(inputs.target_devices, 'level_zero:gpu') }}" = "true" ]; then
49-
cts_exclude_filter=$PWD/devops/cts_exclude_filter_L0_GPU
63+
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/L0_GPU
5064
fi
5165
5266
# List excluded SYCL CTS categories:
@@ -105,8 +119,8 @@ runs:
105119
106120
# If the suite was built on another machine then the build contains the full
107121
# set of tests. We have special files to filter out some test categories,
108-
# see "devops/cts_exclude_filter_*". Each configuration has its own file, e.g.
109-
# there is "cts_exclude_filter_OCL_CPU" for opencl:cpu device. Therefore,
122+
# see "sycl/cts_exclude_filter/*". Each configuration has its own file, e.g.
123+
# there is "cts_exclude_filter/OCL_CPU" for opencl:cpu device. Therefore,
110124
# these files may differ from each other, so when there is a pre-built set of
111125
# tests, we need to filter it according to the filter-file.
112126
- name: Filter SYCL CTS test categories
@@ -115,9 +129,9 @@ runs:
115129
run: |
116130
cts_exclude_filter=""
117131
if [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then
118-
cts_exclude_filter=$PWD/devops/cts_exclude_filter_OCL_CPU
132+
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/OCL_CPU
119133
elif [ "${{ contains(inputs.target_devices, 'level_zero:gpu') }}" = "true" ]; then
120-
cts_exclude_filter=$PWD/devops/cts_exclude_filter_L0_GPU
134+
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/L0_GPU
121135
fi
122136
123137
while IFS= read -r line; do

libclc/libspirv/lib/generic/math/clc_exp10.cl

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,27 @@ _CLC_DEF _CLC_OVERLOAD double __clc_exp10(double x) {
123123
int m = n >> 6;
124124

125125
double r =
126-
R_LN10 * fma(-R_LOG10_2_BY_64_TL, dn, fma(-R_LOG10_2_BY_64_LD, dn, x));
126+
R_LN10 * __spirv_ocl_fma(-R_LOG10_2_BY_64_TL, dn,
127+
__spirv_ocl_fma(-R_LOG10_2_BY_64_LD, dn, x));
127128

128129
// 6 term tail of Taylor expansion of e^r
129130
double z2 =
130-
r *
131-
fma(r,
132-
fma(r,
133-
fma(r,
134-
fma(r, fma(r, 0x1.6c16c16c16c17p-10, 0x1.1111111111111p-7),
135-
0x1.5555555555555p-5),
136-
0x1.5555555555555p-3),
137-
0x1.0000000000000p-1),
138-
1.0);
131+
r * __spirv_ocl_fma(
132+
r,
133+
__spirv_ocl_fma(
134+
r,
135+
__spirv_ocl_fma(
136+
r,
137+
__spirv_ocl_fma(r,
138+
__spirv_ocl_fma(r, 0x1.6c16c16c16c17p-10,
139+
0x1.1111111111111p-7),
140+
0x1.5555555555555p-5),
141+
0x1.5555555555555p-3),
142+
0x1.0000000000000p-1),
143+
1.0);
139144

140145
double2 tv = USE_TABLE(two_to_jby64_ep_tbl, j);
141-
z2 = fma(tv.s0 + tv.s1, z2, tv.s1) + tv.s0;
146+
z2 = __spirv_ocl_fma(tv.s0 + tv.s1, z2, tv.s1) + tv.s0;
142147

143148
int small_value = (m < -1022) || ((m == -1022) && (z2 < 1.0));
144149

@@ -147,7 +152,7 @@ _CLC_DEF _CLC_OVERLOAD double __clc_exp10(double x) {
147152
double z3 = z2 * as_double(((long)n1 + 1023) << 52);
148153
z3 *= as_double(((long)n2 + 1023) << 52);
149154

150-
z2 = ldexp(z2, m);
155+
z2 = __spirv_ocl_ldexp(z2, m);
151156
z2 = small_value ? z3 : z2;
152157

153158
z2 = __clc_isnan(x) ? x : z2;

libdevice/fallback-cmath.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,13 @@ float __devicelib_fmaf(float x, float y, float z) {
168168
return __spirv_ocl_fma(x, y, z);
169169
}
170170

171+
#if defined(__SPIR__) || defined(__SPIRV__)
172+
DEVICE_EXTERN_C_INLINE
173+
float __devicelib_sinf(float x) { return (x == 0.0f) ? x : __spirv_ocl_sin(x); }
174+
#else
171175
DEVICE_EXTERN_C_INLINE
172176
float __devicelib_sinf(float x) { return __spirv_ocl_sin(x); }
177+
#endif
173178

174179
DEVICE_EXTERN_C_INLINE
175180
float __devicelib_cosf(float x) { return __spirv_ocl_cos(x); }

0 commit comments

Comments
 (0)