-
Notifications
You must be signed in to change notification settings - Fork 0
582 lines (511 loc) · 22.6 KB
/
build_cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
---
name: Main test matrix
on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'doc/**'
- 'CHANGES'
- 'COPYING'
- 'CREDITS'
- 'LICENSE'
- 'README.*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
cancel-in-progress: true
env:
POCL_CACHE_DIR: "/tmp/GH_POCL_CACHE"
CTEST_FLAGS: "--output-on-failure --test-output-size-failed 128000 --test-output-size-passed 128000"
POCL_KERNEL_CACHE: "0"
POCL_MAX_WORK_GROUP_SIZE: "1024"
POCL_MEMORY_LIMIT: "2"
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "1"
CCACHE_MAXSIZE: "25000M"
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: /home/github/ccache_storage
jobs:
main_test_matrix:
name: LLVM ${{ matrix.llvm }} - ${{ matrix.config }}
runs-on: [self-hosted, linux, x64, debian]
strategy:
fail-fast: false
matrix:
llvm: [17, 18]
# basic = simplest pthread build
# devel = with devel options
# cts_spirv = cts with SPIR-V
# tier1 = includes CTS without SPIR-V
# asan, tsan, ubsan = sanitizers
# chipstar 1.1 only supports LLVM up to 17
config: [cts_spirv, tier1, chipstar, asan, tsan, ubsan]
exclude:
- llvm: 18
config: chipstar
steps:
- uses: actions/checkout@v4
- name: CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo "-DCMAKE_C_FLAGS_RELWITHDEBINFO=$BUILD_FLAGS" \
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=$BUILD_FLAGS" \
-DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} -DLLVM_SPIRV=/usr/bin/llvm-spirv-${{ matrix.llvm }} \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
if [ "${{ matrix.config }}" == "cts_spirv" ]; then
mkdir -p /home/github/examples/build_cts_spirv
runCMake -DENABLE_TESTSUITES=conformance -DENABLE_CONFORMANCE=ON -DTESTSUITE_SOURCE_BASEDIR=/home/github/examples/source -DTESTSUITE_BASEDIR=/home/github/examples/build_cts_spirv
elif [ "${{ matrix.config }}" == "tier1" ]; then
mkdir -p /home/github/examples/build_tier1
runCMake "-DENABLE_TESTSUITES=AMDSDK3.0;piglit;conformance;PyOpenCL;IntelSVM" -DENABLE_CONFORMANCE=ON -DTESTSUITE_SOURCE_BASEDIR=/home/github/examples/source -DTESTSUITE_BASEDIR=/home/github/examples/build_tier1
elif [ "${{ matrix.config }}" == "chipstar" ]; then
mkdir -p /home/github/examples/build_chipstar
runCMake -DENABLE_TESTSUITES=chipStar -DTESTSUITE_SOURCE_BASEDIR=/home/github/examples/source -DTESTSUITE_BASEDIR=/home/github/examples/build_chipstar
elif [ "${{ matrix.config }}" == "asan" ]; then
runCMake -DENABLE_ASAN=1 -DENABLE_ICD=0 -DENABLE_LOADABLE_DRIVERS=0 -DDEVELOPER_MODE=OFF
elif [ "${{ matrix.config }}" == "tsan" ]; then
runCMake -DENABLE_TSAN=1 -DENABLE_ICD=0 -DENABLE_LOADABLE_DRIVERS=0
elif [ "${{ matrix.config }}" == "ubsan" ]; then
runCMake -DENABLE_UBSAN=1 -DENABLE_LATEST_CXX_STD=ON -DENABLE_ICD=0 -DENABLE_LOADABLE_DRIVERS=0
else
echo "Unknown configuration" && exit 1
fi
- name: Build PoCL
id: build_pocl
timeout-minutes: 20
run: |
cd ${{ github.workspace }}/build && make -j$(nproc)
- name: Build Examples
id: build_examples
# occasionally git timeouts on git clone of the examples
timeout-minutes: 120
if: ${{ matrix.config == 'cts_spirv' || matrix.config == 'tier1' || matrix.config == 'chipstar' }}
run: |
cd ${{ github.workspace }}/build && make -j$(nproc) prepare_examples
- name: Run Tests
id: ctest
run: |
runCTest() {
cd ${{ github.workspace }}/build && ctest -j$(nproc) $CTEST_FLAGS "$@"
}
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
if [ "${{ matrix.config }}" == "cts_spirv" ]; then
runCTest -L conformance_suite_micro_spirv
elif [ "${{ matrix.config }}" == "tier1" ]; then
runCTest -L "amdsdk_30|piglit|PyOpenCL|conformance_suite_micro_main|IntelSVM"
elif [ "${{ matrix.config }}" == "chipstar" ]; then
runCTest -L chipStar
elif [ "${{ matrix.config }}" == "asan" ]; then
runCTest -L "runtime|asan"
elif [ "${{ matrix.config }}" == "tsan" ]; then
runCTest -L "internal|tsan" -E "clCreateSubDevices"
elif [ "${{ matrix.config }}" == "ubsan" ]; then
runCTest -L "internal|ubsan"
else
echo "Unknown configuration" && exit 1
fi
github_test_matrix:
name: LLVM ${{ matrix.llvm }} - ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
llvm: [17, 18]
# basic = simplest pthread build
# devel = with devel options
# cts_spirv = cts with SPIR-V
# tier1 = includes CTS without SPIR-V
# asan, tsan, ubsan = sanitizers
# chipstar 1.1 only supports LLVM up to 17
config: [basic, devel]
include:
- llvm: 14
config: OpenMP
- llvm: 15
config: TBB
- llvm: 16
config: basic
- llvm: 18
config: static
steps:
- uses: actions/checkout@v4
- name: Install prerequisites and ocl-icd
run: >
sudo apt update -y &&
sudo apt install -y wget gpg python3-dev libpython3-dev build-essential ocl-icd-libopencl1 cmake make git pkg-config libhwloc-dev zlib1g-dev libtbb2-dev &&
wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xd1e4ec6482cdd1da8bf1566a593b02af628bafbf" | sudo gpg --dearmor -o /usr/share/keyrings/ocl-icd.gpg &&
echo "deb [signed-by=/usr/share/keyrings/ocl-icd.gpg] https://ppa.launchpadcontent.net/ocl-icd/ppa/ubuntu jammy main" >/tmp/ocl-icd.list &&
sudo mv /tmp/ocl-icd.list /etc/apt/sources.list.d/ &&
sudo apt update -y &&
sudo apt install -y ocl-icd-libopencl1 ocl-icd-dev ocl-icd-opencl-dev
- name: Install LLVM <16
if: ${{ matrix.llvm <= 15 }}
run: >
export LLVM_VERSION=${{ matrix.llvm }} &&
sudo apt install -y libclang-cpp${LLVM_VERSION}-dev llvm-${LLVM_VERSION}-dev libclang-${LLVM_VERSION}-dev clang-${LLVM_VERSION} llvm-${LLVM_VERSION}
- name: Install LLVM 16+
if: ${{ matrix.llvm > 15 }}
run: >
export LLVM_VERSION=${{ matrix.llvm }} &&
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-snapshot.gpg &&
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} main" >/tmp/llvm.list &&
sudo mv /tmp/llvm.list /etc/apt/sources.list.d/ &&
sudo apt update -y &&
sudo apt install -y libclang-cpp${LLVM_VERSION}-dev llvm-${LLVM_VERSION}-dev libclang-${LLVM_VERSION}-dev clang-${LLVM_VERSION} llvm-${LLVM_VERSION} libpolly-${LLVM_VERSION}-dev
- name: CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DDEVELOPER_MODE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
"-DCMAKE_C_FLAGS_RELWITHDEBINFO=$BUILD_FLAGS" \
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=$BUILD_FLAGS" \
-DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
if [ "${{ matrix.config }}" == "OpenMP" ]; then
runCMake -DENABLE_ICD=1 -DENABLE_HOST_CPU_DEVICES_OPENMP=1
elif [ "${{ matrix.config }}" == "TBB" ]; then
runCMake -DENABLE_ICD=1 -DENABLE_TBB_DEVICE=1
elif [ "${{ matrix.config }}" == "basic" ]; then
runCMake -DENABLE_ICD=1
elif [ "${{ matrix.config }}" == "static" ]; then
runCMake -DENABLE_ICD=1 -DSTATIC_LLVM=1
elif [ "${{ matrix.config }}" == "devel" ]; then
runCMake -DENABLE_RELOCATION=0 -DENABLE_VALGRIND=1 -DENABLE_EXTRA_VALIDITY_CHECKS=1
else
echo "Unknown configuration" && exit 1
fi
- name: Build PoCL
id: build_pocl
timeout-minutes: 20
run: |
cd ${{ github.workspace }}/build && make -j$(nproc)
- name: Run Tests
id: ctest
run: |
runCTest() {
cd ${{ github.workspace }}/build && ctest -j$(nproc) $CTEST_FLAGS "$@"
}
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
if [ "${{ matrix.config }}" == "OpenMP" ]; then
runCTest -L internal
elif [ "${{ matrix.config }}" == "TBB" ]; then
runCTest -L internal
elif [ "${{ matrix.config }}" == "basic" ]; then
runCTest -L internal
elif [ "${{ matrix.config }}" == "static" ]; then
runCTest -L internal
elif [ "${{ matrix.config }}" == "devel" ]; then
runCTest -L internal
else
echo "Unknown configuration" && exit 1
fi
sycl_matrix:
name: LLVM ${{ matrix.llvm }} - SYCL
runs-on: [self-hosted, linux, x64, sycl]
strategy:
fail-fast: false
matrix:
llvm: [16]
steps:
- uses: actions/checkout@v4
- name: CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DENABLE_HOST_CPU_DEVICES=1 -DENABLE_LEVEL0=0 -DENABLE_TESTSUITES=all \
-DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \
-DWITH_LLVM_CONFIG=/home/LLVM_${{ matrix.llvm }}/bin/llvm-config -DLLVM_SPIRV=/home/LLVM_${{ matrix.llvm }}/bin/llvm-spirv \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
mkdir -p /home/github/examples/build_sycl
mkdir -p /home/github/examples/source
runCMake "-DENABLE_TESTSUITES=dpcpp-book-samples;oneapi-samples;simple-sycl-samples;intel-compute-samples" -DTESTSUITE_SOURCE_BASEDIR=/home/github/examples/source -DTESTSUITE_BASEDIR=/home/github/examples/build_sycl -DSYCL_CXX_COMPILER=/opt/sycl/bin/clang++ -DSYCL_LIBDIR=/opt/sycl/lib
- name: Build PoCL
id: build_pocl
timeout-minutes: 20
run: |
cd ${{ github.workspace }}/build && make -j4
- name: Build Examples
id: build_examples
# occasionally git timeouts on git clone of the examples
timeout-minutes: 120
run: |
cd ${{ github.workspace }}/build && make -j4 prepare_examples
- name: Run Tests
id: ctest
run: |
runCTest() {
cd ${{ github.workspace }}/build && ctest -j4 $CTEST_FLAGS "$@"
}
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
runCTest -L "dpcpp-book-samples|oneapi-samples|simple-sycl-samples|intel-compute-samples"
remote_matrix:
name: LLVM ${{ matrix.llvm }} - remote
runs-on: [self-hosted, linux, x64, debian]
strategy:
fail-fast: false
matrix:
llvm: [16]
steps:
- uses: actions/checkout@v4
- name: CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DENABLE_HOST_CPU_DEVICES=1 -DENABLE_LEVEL0=0 -DENABLE_REMOTE_CLIENT=1 -DENABLE_REMOTE_SERVER=1 \
-DENABLE_LOADABLE_DRIVERS=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="$BUILD_FLAGS" \
-DCMAKE_CXX_FLAGS_RELEASE="$BUILD_FLAGS" -DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} \
-DENABLE_ICD=1 "$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
runCMake
- name: Build PoCL
id: build_pocl
timeout-minutes: 20
run: |
cd ${{ github.workspace }}/build && make -j4
- name: Run Tests
id: ctest
run: |
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_remote_tests $CTEST_FLAGS -E test_command_buffer
rdma_matrix:
name: LLVM ${{ matrix.llvm }} - rdma
runs-on: [self-hosted, linux, x64, rdma]
strategy:
fail-fast: false
matrix:
llvm: [16]
steps:
- uses: actions/checkout@v4
- name: CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DENABLE_HOST_CPU_DEVICES=1 -DENABLE_LEVEL0=0 -DENABLE_REMOTE_CLIENT=1 -DENABLE_REMOTE_SERVER=1 -DENABLE_RDMA=1 \
-DENABLE_LOADABLE_DRIVERS=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="$BUILD_FLAGS" \
-DCMAKE_CXX_FLAGS_RELEASE="$BUILD_FLAGS" -DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} \
-DENABLE_ICD=1 "$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
runCMake
- name: Build PoCL
id: build_pocl
timeout-minutes: 20
run: |
cd ${{ github.workspace }}/build && make -j4
- name: Run Tests
id: ctest
run: |
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
cd ${{ github.workspace }}/build && ctest $CTEST_FLAGS -L remote_rdma
cuda_matrix:
name: LLVM ${{ matrix.llvm }} - ${{ matrix.config }}
runs-on: [self-hosted, linux, x64, cuda]
strategy:
fail-fast: false
matrix:
llvm: [17, 18]
config: [cuda]
steps:
- uses: actions/checkout@v4
- name: Run CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \
-DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
runCMake -DENABLE_CUDA=ON
- name: Run Build
id: build
run: |
cd ${{ github.workspace }}/build && make -j$(nproc)
- name: Run Tests
id: ctest
run: |
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_cuda_tests $CTEST_FLAGS
openasip_matrix:
env:
PATH: "/home/LLVM_${{ matrix.llvm }}0/bin:/home/TCE_${{ matrix.llvm }}0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
LD_LIBRARY_PATH: "/home/TCE_${{ matrix.llvm }}0/lib"
name: LLVM ${{ matrix.llvm }} - ${{ matrix.config }}
runs-on: [self-hosted, linux, x64, openasip]
strategy:
fail-fast: false
matrix:
# 15 to 17 should work, however 17 currently fails two tests (fp16)
llvm: [16]
config: [openasip]
steps:
- uses: actions/checkout@v4
- name: Run CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \
-DWITH_LLVM_CONFIG=/home/LLVM_${{ matrix.llvm }}0/bin/llvmtce-config \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
if [ "${{ matrix.config }}" == "openasip" ]; then
runCMake -DENABLE_TCE=ON
else
echo "Unknown configuration" && exit 1
fi
- name: Run Build
id: build
run: |
cd ${{ github.workspace }}/build && make -j$(nproc)
- name: Run Tests
id: ctest
run: |
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
if [ "${{ matrix.config }}" == "openasip" ]; then
cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_tta_tests $CTEST_FLAGS
else
echo "Unknown configuration" && exit 1
fi
# could be tried with multiple CLSPV versions
vulkan_matrix:
name: Vulkan
runs-on: [self-hosted, linux, vulkan]
steps:
- uses: actions/checkout@v4
- name: Run CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
runCMake -DENABLE_VULKAN=1 -DCLSPV_DIR=/home/CLSPV -DENABLE_HOST_CPU_DEVICES=0 -DENABLE_LLVM=0
- name: Run Build
id: build
run: |
cd ${{ github.workspace }}/build && make -j4
- name: Run Tests
id: ctest
env:
VK_ICD_FILENAMES: "/usr/share/vulkan/icd.d/intel_icd.x86_64.json"
run: |
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_vulkan_tests $CTEST_FLAGS
# this one is only for LLVM 16+
arm64_matrix:
name: LLVM ${{ matrix.llvm }} - ARM64 ${{ matrix.config }}
runs-on: [self-hosted, linux, arm64, ubuntu]
strategy:
fail-fast: false
matrix:
llvm: [17, 18]
config: [basic]
steps:
- uses: actions/checkout@v4
- name: Run CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \
-DWITH_LLVM_CONFIG=/opt/LLVM_${{ matrix.llvm }}0/bin/llvm-config \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
runCMake -DENABLE_ICD=1
- name: Run Build
id: build
run: |
cd ${{ github.workspace }}/build && make -j$(nproc)
- name: Run Tests
id: ctest
run: |
runCTest() {
cd ${{ github.workspace }}/build && ctest -j$(nproc) $CTEST_FLAGS -E 'test_shuffle_half_'
}
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
runCTest -L internal
level_zero_matrix:
name: LLVM ${{ matrix.llvm }} - ${{ matrix.config }}
runs-on: [self-hosted, linux, level_zero]
strategy:
fail-fast: false
matrix:
llvm: [17, 18]
config: [level_zero]
steps:
- uses: actions/checkout@v4
- name: Run CMake
id: cmake
run: |
runCMake() {
BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable"
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DDEVELOPER_MODE=ON \
-DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \
"$@" -B ${{ github.workspace }}/build ${{ github.workspace }}
}
rm -rf ${{ github.workspace }}/build
mkdir ${{ github.workspace }}/build
# -DLLVM_SPIRV=/usr/bin/llvm-spirv-${{ matrix.llvm }}"
runCMake -DENABLE_LEVEL0=1 -DENABLE_HOST_CPU_DEVICES=0 -DSTATIC_LLVM=1 -DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }}
- name: Run Build
id: build
run: |
cd ${{ github.workspace }}/build && make -j4
- name: Run Tests
id: ctest
env:
OverrideDefaultFP64Settings: "1"
IGC_EnableDPEmulation: "1"
run: |
if [ ${{ matrix.llvm }} -lt 16 ]; then
TEST_EXCLUDES='poclcc|clCreateKernel|clCreateProgramWithBinary|test_hadd_|sampler_address_clam|alignment_with_dynamic_wg_332|read-copy-write-buffer|buffer-image-copy|spirv/printf|convert_type_4'
else
TEST_EXCLUDES='poclcc|clCreateKernel|clCreateProgramWithBinary|test_hadd_|read-copy-write-buffer|buffer-image-copy|copy_signbit_loopvec|isnan_loopvec|sampler_address_clamp_loopvec|program_from_binary_with_local_1_1_1|spirv/printf|example0_spirv|example1_spirv|oneapi_samples|all_simple_sycl_samples|all_dpcpp_book_samples'
fi
rm -rf ${{ env.POCL_CACHE_DIR }}
mkdir ${{ env.POCL_CACHE_DIR }}
cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_level0_tests -j1 $CTEST_FLAGS -E $TEST_EXCLUDES