mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-09 23:28:54 +02:00
ggml-ci: update input env variables to GG_BUILD_ (#2879)
This commit is contained in:
parent
f11de0e73c
commit
1f4886b40d
18
ci/README.md
18
ci/README.md
@ -21,7 +21,7 @@ mkdir tmp
|
|||||||
bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
||||||
|
|
||||||
# with CUDA support
|
# with CUDA support
|
||||||
GGML_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
GG_BUILD_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
||||||
```
|
```
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
@ -30,12 +30,12 @@ The CI script supports several environment variables to control the build:
|
|||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|----------|-------------|
|
|----------|-------------|
|
||||||
| `GGML_CUDA` | Enable NVIDIA CUDA GPU acceleration |
|
| `GG_BUILD_CUDA` | Enable NVIDIA CUDA GPU acceleration |
|
||||||
| `GGML_SYCL` | Enable Intel SYCL acceleration |
|
| `GG_BUILD_SYCL` | Enable Intel SYCL acceleration |
|
||||||
| `GGML_VULKAN` | Enable Vulkan GPU acceleration |
|
| `GG_BUILD_VULKAN` | Enable Vulkan GPU acceleration |
|
||||||
| `GGML_METAL` | Enable Metal acceleration on Apple Silicon |
|
| `GG_BUILD_METAL` | Enable Metal acceleration on Apple Silicon |
|
||||||
| `GGML_BLAS` | Enable BLAS CPU acceleration |
|
| `GG_BUILD_BLAS` | Enable BLAS CPU acceleration |
|
||||||
| `WHISPER_OPENVINO` | Enable OpenVINO support |
|
| `GG_BUILD_OPENVINO` | Enable OpenVINO support |
|
||||||
| `WHISPER_COREML` | Enable Core ML support for Apple Neural Engine |
|
| `GG_BUILD_COREML` | Enable Core ML support for Apple Neural Engine |
|
||||||
| `GG_BUILD_LOW_PERF` | Limit tests for low-performance hardware |
|
| `GG_BUILD_LOW_PERF` | Limit tests for low-performance hardware |
|
||||||
| `GGML_TEST_MODELS` | Comma-separated list of models to test (e.g. "tiny.en,tiny,base,medium", defaults to all models unless `GG_BUILD_LOW_PERF` is set) |
|
| `GG_BUILD_TEST_MODELS` | Comma-separated list of models to test (e.g. "tiny.en,tiny,base,medium", defaults to all models unless `GG_BUILD_LOW_PERF` is set) |
|
||||||
|
20
ci/run.sh
20
ci/run.sh
@ -8,7 +8,7 @@
|
|||||||
# bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
# bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
||||||
#
|
#
|
||||||
# # with CUDA support
|
# # with CUDA support
|
||||||
# GGML_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
# GG_BUILD_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
@ -36,8 +36,8 @@ BENCH_ENCODER_ONLY=0
|
|||||||
BENCH_FLASH_ATTN=0
|
BENCH_FLASH_ATTN=0
|
||||||
|
|
||||||
# check for user-specified models first. if not specified, use fast models
|
# check for user-specified models first. if not specified, use fast models
|
||||||
if [ ! -z ${GGML_TEST_MODELS} ]; then
|
if [ ! -z ${GG_BUILD_TEST_MODELS} ]; then
|
||||||
IFS=',' read -r -a MODELS <<< "${GGML_TEST_MODELS}"
|
IFS=',' read -r -a MODELS <<< "${GG_BUILD_TEST_MODELS}"
|
||||||
else
|
else
|
||||||
if [ ! -z ${GG_BUILD_LOW_PERF} ]; then
|
if [ ! -z ${GG_BUILD_LOW_PERF} ]; then
|
||||||
MODELS=( "tiny" "base" "small" )
|
MODELS=( "tiny" "base" "small" )
|
||||||
@ -48,11 +48,11 @@ fi
|
|||||||
|
|
||||||
CMAKE_EXTRA="-DWHISPER_FATAL_WARNINGS=ON"
|
CMAKE_EXTRA="-DWHISPER_FATAL_WARNINGS=ON"
|
||||||
|
|
||||||
if [ ! -z ${GGML_CUDA} ]; then
|
if [ ! -z ${GG_BUILD_CUDA} ]; then
|
||||||
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native"
|
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${GGML_SYCL} ]; then
|
if [ ! -z ${GG_BUILD_SYCL} ]; then
|
||||||
if [ -z ${ONEAPI_ROOT} ]; then
|
if [ -z ${ONEAPI_ROOT} ]; then
|
||||||
echo "Not detected ONEAPI_ROOT, please install oneAPI base toolkit and enable it by:"
|
echo "Not detected ONEAPI_ROOT, please install oneAPI base toolkit and enable it by:"
|
||||||
echo "source /opt/intel/oneapi/setvars.sh"
|
echo "source /opt/intel/oneapi/setvars.sh"
|
||||||
@ -62,23 +62,23 @@ if [ ! -z ${GGML_SYCL} ]; then
|
|||||||
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON"
|
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${WHISPER_OPENVINO} ]; then
|
if [ ! -z ${GG_BUILD_OPENVINO} ]; then
|
||||||
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_OPENVINO=ON"
|
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_OPENVINO=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${GGML_METAL} ]; then
|
if [ ! -z ${GG_BUILD_METAL} ]; then
|
||||||
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON"
|
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${GGML_VULKAN} ]; then
|
if [ ! -z ${GG_BUILD_VULKAN} ]; then
|
||||||
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_VULKAN=ON"
|
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_VULKAN=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${GGML_BLAS} ]; then
|
if [ ! -z ${GG_BUILD_BLAS} ]; then
|
||||||
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_BLAS=ON"
|
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_BLAS=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${WHISPER_COREML} ]; then
|
if [ ! -z ${GG_BUILD_COREML} ]; then
|
||||||
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_COREML=ON"
|
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_COREML=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user