Skip to content

Commit e4e6c30

Browse files
committed
Add all patches needed for building DPCPP across platforms with in-flight fixes.
There are some in-flight work that resolves issues, include some cross platform work. These patches allow us to test with the latest changes whilst there is work ongoing.
1 parent c7e33e0 commit e4e6c30

15 files changed

+1525
-25
lines changed

.github/actions/do_build_dpcpp/action.yml

+10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ runs:
2828
repository: intel/llvm
2929
path: llvm
3030

31+
- name: apply patches
32+
if: contains(inputs.download_dpcpp_artefact, inputs.target) != true
33+
shell: bash
34+
run: |
35+
cd llvm
36+
git apply $GITHUB_WORKSPACE/.github/patches/DPCPP-0001-Fix-static_assert-with-funsigned-char.patch
37+
git apply $GITHUB_WORKSPACE/.github/patches/DPCPP-0002-SYCL-NativeCPU-Build-libclc-target-independently.patch
38+
git apply $GITHUB_WORKSPACE/.github/patches/DPCPP-0003-add-cl_khr_int64_extended_atomics.patch
39+
git apply $GITHUB_WORKSPACE/.github/patches/DPCPP-0004-SYCL-NativeCPU-Fix-__clc_exp10.patch
40+
3141
- name: dpcpp configure
3242
if: contains(inputs.download_dpcpp_artefact, inputs.target) != true
3343
shell: bash

.github/actions/run_opencl_cts/action.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ runs:
3636
set -x
3737
# Build override file, all is done first, then the target specific.
3838
# The last file can overwrite previous overrides.
39-
for csv in .github/opencl_cts/override_all.csv .github/opencl_cts/override_${{ inputs.target }}.csv
40-
do
41-
[ -f $csv ] && cat $csv
42-
done > override.csv
43-
echo override file:
44-
cat override.csv
39+
python3 .github/scripts/create_overload_csv.py -d .github/opencl_cts/ \
40+
-k ${{ inputs.target }} \
41+
-o override_combined.csv -v
4542
4643
# $CTS_FILTER ignores certain test, so is treated differently to temporary fails.
4744
# Note: use 'eval' built-in to handle quoting/escaping/splitting reqs
@@ -55,5 +52,5 @@ runs:
5552
-e CL_PLATFORM_INDEX=0 \
5653
-s $GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE \
5754
-i $GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER \
58-
-o override.csv"
55+
-o override_combined.csv"
5956
eval $RUN_CITIES

.github/actions/run_sycl_cts/action.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,10 @@ runs:
6969
7070
# $CTS_FILTER ignores certain test, so is treated differently to temporary fails.
7171
72-
# Build override file, all is done first, then the target specific. The last file can overwrite prevous overrides.
73-
for csv in .github/sycl_cts/override_all.csv .github/sycl_cts/override_${{ inputs.target }}.csv
74-
do
75-
[ -f $csv ] && cat $csv
76-
done > override.csv
77-
78-
echo OVERRIDE FILE:
79-
cat override.csv
72+
# Build override file, all is done first, then the target specific. The last file can overwrite previous overrides.
73+
python3 .github/scripts/create_overload_csv.py -d .github/sycl_cts/ \
74+
-k opencl ${{ inputs.target }} \
75+
-o override_combined.csv -v
8076
8177
exitcode=0
8278
set -x
@@ -92,7 +88,7 @@ runs:
9288
-l SYCL-CTS/cts.log -f SYCL-CTS/cts.fail \
9389
-r SYCL-CTS/cts.xml \
9490
-v \
95-
-o override.csv \
91+
-o override_combined.csv \
9692
$SYCL_CTS_FILTER || exitcode=$?
9793
9894
export OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From c84bf4651cbcbe743ba7f043560b0cd210a66347 Mon Sep 17 00:00:00 2001
2+
From: Harald van Dijk <[email protected]>
3+
Date: Mon, 24 Feb 2025 10:43:38 +0000
4+
Subject: [PATCH] Fix static_assert with -funsigned-char
5+
6+
The type of (ext_vector<int8_t, 2>{1, 0} == 0)[1] has type char, not
7+
int8_t, and therefore depending on whether -funsigned-char is in effect
8+
may either have the value -1 or have the value 255. Cast to int8_t to
9+
ensure it always gets taken as signed. This is only needed for the
10+
static_assert: the rest of the code already works for signed and
11+
unsigned plain char alike.
12+
---
13+
sycl/include/sycl/detail/vector_arith.hpp | 2 +-
14+
1 file changed, 1 insertion(+), 1 deletion(-)
15+
16+
diff --git a/sycl/include/sycl/detail/vector_arith.hpp b/sycl/include/sycl/detail/vector_arith.hpp
17+
index aad90aa83379..ab374c06e4bd 100644
18+
--- a/sycl/include/sycl/detail/vector_arith.hpp
19+
+++ b/sycl/include/sycl/detail/vector_arith.hpp
20+
@@ -265,7 +265,7 @@ template <typename Self> struct VecOperators {
21+
// ensure we generate 0/1 only (and not 2/-1/etc.).
22+
#if __clang_major__ >= 20
23+
// Not an integral constant expression prior to clang-20.
24+
- static_assert((ext_vector<int8_t, 2>{1, 0} == 0)[1] == -1);
25+
+ static_assert(int8_t((ext_vector<int8_t, 2>{1, 0} == 0)[1]) == -1);
26+
#endif
27+
28+
tmp = reinterpret_cast<decltype(tmp)>((tmp != 0) * -1);
29+
--
30+
2.45.2
31+

0 commit comments

Comments
 (0)