Skip to content

Commit 33798f1

Browse files
ggerganovarthw
authored andcommitted
ci : add VULKAN support to ggml-ci (ggml-org#9055)
1 parent 56cbf04 commit 33798f1

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

ci/run.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# # with SYCL support
1414
# GG_BUILD_SYCL=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
1515
#
16+
# # with VULKAN support
17+
# GG_BUILD_VULKAN=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
18+
#
1619

1720
if [ -z "$2" ]; then
1821
echo "usage: $0 <output-dir> <mnt-dir>"
@@ -52,6 +55,10 @@ if [ ! -z ${GG_BUILD_SYCL} ]; then
5255

5356
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=1 DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON"
5457
fi
58+
59+
if [ ! -z ${GG_BUILD_VULKAN} ]; then
60+
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_VULKAN=1"
61+
fi
5562
## helpers
5663

5764
# download a file if it does not exist or if it is outdated
@@ -266,7 +273,6 @@ function gg_sum_ctest_with_model_release {
266273
}
267274

268275
# open_llama_7b_v2
269-
# requires: GG_BUILD_CUDA
270276

271277
function gg_run_open_llama_7b_v2 {
272278
cd ${SRC}
@@ -290,8 +296,8 @@ function gg_run_open_llama_7b_v2 {
290296

291297
set -e
292298

293-
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} -DGGML_CUDA=1 .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
294-
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
299+
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
300+
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
295301

296302
python3 ../examples/convert_legacy_llama.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
297303

@@ -535,7 +541,6 @@ function gg_sum_pythia_1_4b {
535541
}
536542

537543
# pythia_2_8b
538-
# requires: GG_BUILD_CUDA
539544

540545
function gg_run_pythia_2_8b {
541546
cd ${SRC}
@@ -556,8 +561,8 @@ function gg_run_pythia_2_8b {
556561

557562
set -e
558563

559-
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} -DGGML_CUDA=1 .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
560-
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
564+
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
565+
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
561566

562567
python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
563568

@@ -761,7 +766,7 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
761766
fi
762767

763768
if [ -z ${GG_BUILD_VRAM_GB} ] || [ ${GG_BUILD_VRAM_GB} -ge 8 ]; then
764-
if [ -z ${GG_BUILD_CUDA} ]; then
769+
if [ -z ${GG_BUILD_CUDA} ] && [ -z ${GG_BUILD_VULKAN} ]; then
765770
test $ret -eq 0 && gg_run pythia_1_4b
766771
else
767772
test $ret -eq 0 && gg_run pythia_2_8b

0 commit comments

Comments
 (0)