Spaces:
Sleeping
Sleeping
ggml-ci: update input env variables to GG_BUILD_ (#2879)
Browse files- ci/README.md +9 -9
- ci/run.sh +10 -10
ci/README.md
CHANGED
|
@@ -21,7 +21,7 @@ mkdir tmp
|
|
| 21 |
bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
| 22 |
|
| 23 |
# with CUDA support
|
| 24 |
-
|
| 25 |
```
|
| 26 |
|
| 27 |
## Environment Variables
|
|
@@ -30,12 +30,12 @@ The CI script supports several environment variables to control the build:
|
|
| 30 |
|
| 31 |
| Variable | Description |
|
| 32 |
|----------|-------------|
|
| 33 |
-
| `
|
| 34 |
-
| `
|
| 35 |
-
| `
|
| 36 |
-
| `
|
| 37 |
-
| `
|
| 38 |
-
| `
|
| 39 |
-
| `
|
| 40 |
| `GG_BUILD_LOW_PERF` | Limit tests for low-performance hardware |
|
| 41 |
-
| `
|
|
|
|
| 21 |
bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
| 22 |
|
| 23 |
# with CUDA support
|
| 24 |
+
GG_BUILD_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
| 25 |
```
|
| 26 |
|
| 27 |
## Environment Variables
|
|
|
|
| 30 |
|
| 31 |
| Variable | Description |
|
| 32 |
|----------|-------------|
|
| 33 |
+
| `GG_BUILD_CUDA` | Enable NVIDIA CUDA GPU acceleration |
|
| 34 |
+
| `GG_BUILD_SYCL` | Enable Intel SYCL acceleration |
|
| 35 |
+
| `GG_BUILD_VULKAN` | Enable Vulkan GPU acceleration |
|
| 36 |
+
| `GG_BUILD_METAL` | Enable Metal acceleration on Apple Silicon |
|
| 37 |
+
| `GG_BUILD_BLAS` | Enable BLAS CPU acceleration |
|
| 38 |
+
| `GG_BUILD_OPENVINO` | Enable OpenVINO support |
|
| 39 |
+
| `GG_BUILD_COREML` | Enable Core ML support for Apple Neural Engine |
|
| 40 |
| `GG_BUILD_LOW_PERF` | Limit tests for low-performance hardware |
|
| 41 |
+
| `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) |
|
ci/run.sh
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
# bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
| 9 |
#
|
| 10 |
# # with CUDA support
|
| 11 |
-
#
|
| 12 |
#
|
| 13 |
|
| 14 |
if [ -z "$2" ]; then
|
|
@@ -36,8 +36,8 @@ BENCH_ENCODER_ONLY=0
|
|
| 36 |
BENCH_FLASH_ATTN=0
|
| 37 |
|
| 38 |
# check for user-specified models first. if not specified, use fast models
|
| 39 |
-
if [ ! -z ${
|
| 40 |
-
IFS=',' read -r -a MODELS <<< "${
|
| 41 |
else
|
| 42 |
if [ ! -z ${GG_BUILD_LOW_PERF} ]; then
|
| 43 |
MODELS=( "tiny" "base" "small" )
|
|
@@ -48,11 +48,11 @@ fi
|
|
| 48 |
|
| 49 |
CMAKE_EXTRA="-DWHISPER_FATAL_WARNINGS=ON"
|
| 50 |
|
| 51 |
-
if [ ! -z ${
|
| 52 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native"
|
| 53 |
fi
|
| 54 |
|
| 55 |
-
if [ ! -z ${
|
| 56 |
if [ -z ${ONEAPI_ROOT} ]; then
|
| 57 |
echo "Not detected ONEAPI_ROOT, please install oneAPI base toolkit and enable it by:"
|
| 58 |
echo "source /opt/intel/oneapi/setvars.sh"
|
|
@@ -62,23 +62,23 @@ if [ ! -z ${GGML_SYCL} ]; then
|
|
| 62 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON"
|
| 63 |
fi
|
| 64 |
|
| 65 |
-
if [ ! -z ${
|
| 66 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_OPENVINO=ON"
|
| 67 |
fi
|
| 68 |
|
| 69 |
-
if [ ! -z ${
|
| 70 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON"
|
| 71 |
fi
|
| 72 |
|
| 73 |
-
if [ ! -z ${
|
| 74 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_VULKAN=ON"
|
| 75 |
fi
|
| 76 |
|
| 77 |
-
if [ ! -z ${
|
| 78 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_BLAS=ON"
|
| 79 |
fi
|
| 80 |
|
| 81 |
-
if [ ! -z ${
|
| 82 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_COREML=ON"
|
| 83 |
fi
|
| 84 |
|
|
|
|
| 8 |
# bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
| 9 |
#
|
| 10 |
# # with CUDA support
|
| 11 |
+
# GG_BUILD_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
|
| 12 |
#
|
| 13 |
|
| 14 |
if [ -z "$2" ]; then
|
|
|
|
| 36 |
BENCH_FLASH_ATTN=0
|
| 37 |
|
| 38 |
# check for user-specified models first. if not specified, use fast models
|
| 39 |
+
if [ ! -z ${GG_BUILD_TEST_MODELS} ]; then
|
| 40 |
+
IFS=',' read -r -a MODELS <<< "${GG_BUILD_TEST_MODELS}"
|
| 41 |
else
|
| 42 |
if [ ! -z ${GG_BUILD_LOW_PERF} ]; then
|
| 43 |
MODELS=( "tiny" "base" "small" )
|
|
|
|
| 48 |
|
| 49 |
CMAKE_EXTRA="-DWHISPER_FATAL_WARNINGS=ON"
|
| 50 |
|
| 51 |
+
if [ ! -z ${GG_BUILD_CUDA} ]; then
|
| 52 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native"
|
| 53 |
fi
|
| 54 |
|
| 55 |
+
if [ ! -z ${GG_BUILD_SYCL} ]; then
|
| 56 |
if [ -z ${ONEAPI_ROOT} ]; then
|
| 57 |
echo "Not detected ONEAPI_ROOT, please install oneAPI base toolkit and enable it by:"
|
| 58 |
echo "source /opt/intel/oneapi/setvars.sh"
|
|
|
|
| 62 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON"
|
| 63 |
fi
|
| 64 |
|
| 65 |
+
if [ ! -z ${GG_BUILD_OPENVINO} ]; then
|
| 66 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_OPENVINO=ON"
|
| 67 |
fi
|
| 68 |
|
| 69 |
+
if [ ! -z ${GG_BUILD_METAL} ]; then
|
| 70 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON"
|
| 71 |
fi
|
| 72 |
|
| 73 |
+
if [ ! -z ${GG_BUILD_VULKAN} ]; then
|
| 74 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_VULKAN=ON"
|
| 75 |
fi
|
| 76 |
|
| 77 |
+
if [ ! -z ${GG_BUILD_BLAS} ]; then
|
| 78 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_BLAS=ON"
|
| 79 |
fi
|
| 80 |
|
| 81 |
+
if [ ! -z ${GG_BUILD_COREML} ]; then
|
| 82 |
CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_COREML=ON"
|
| 83 |
fi
|
| 84 |
|