Skip to content

Commit 1d841ff

Browse files
slarenarthw
authored andcommitted
ggml-ci : try to improve build time (ggml-org#9160)
1 parent b7bddec commit 1d841ff

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ci/run.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [ ! -z ${GG_BUILD_METAL} ]; then
4040
fi
4141

4242
if [ ! -z ${GG_BUILD_CUDA} ]; then
43-
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_CUDA=1"
43+
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native"
4444
fi
4545

4646
if [ ! -z ${GG_BUILD_SYCL} ]; then
@@ -107,7 +107,7 @@ function gg_run_ctest_debug {
107107
gg_check_build_requirements
108108

109109
(time cmake -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
110-
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
110+
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
111111

112112
(time ctest --output-on-failure -L main -E test-opt ) 2>&1 | tee -a $OUT/${ci}-ctest.log
113113

@@ -138,7 +138,7 @@ function gg_run_ctest_release {
138138
gg_check_build_requirements
139139

140140
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
141-
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
141+
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
142142

143143
if [ -z ${GG_BUILD_LOW_PERF} ]; then
144144
(time ctest --output-on-failure -L main ) 2>&1 | tee -a $OUT/${ci}-ctest.log
@@ -291,7 +291,7 @@ function gg_run_open_llama_7b_v2 {
291291
set -e
292292

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

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

@@ -425,7 +425,7 @@ function gg_run_pythia_1_4b {
425425
set -e
426426

427427
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
428-
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
428+
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
429429

430430
python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
431431

@@ -557,7 +557,7 @@ function gg_run_pythia_2_8b {
557557
set -e
558558

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

562562
python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
563563

@@ -692,7 +692,7 @@ function gg_run_embd_bge_small {
692692
set -e
693693

694694
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
695-
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
695+
(time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log
696696

697697
python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
698698

0 commit comments

Comments
 (0)