TransferPacket commited on
Commit
e5e2e61
·
unverified ·
1 Parent(s): 3e264ce

ggml-ci: update input env variables to GG_BUILD_ (#2879)

Browse files
Files changed (2) hide show
  1. ci/README.md +9 -9
  2. 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
- GGML_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
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
- | `GGML_CUDA` | Enable NVIDIA CUDA GPU acceleration |
34
- | `GGML_SYCL` | Enable Intel SYCL acceleration |
35
- | `GGML_VULKAN` | Enable Vulkan GPU acceleration |
36
- | `GGML_METAL` | Enable Metal acceleration on Apple Silicon |
37
- | `GGML_BLAS` | Enable BLAS CPU acceleration |
38
- | `WHISPER_OPENVINO` | Enable OpenVINO support |
39
- | `WHISPER_COREML` | Enable Core ML support for Apple Neural Engine |
40
  | `GG_BUILD_LOW_PERF` | Limit tests for low-performance hardware |
41
- | `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) |
 
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
- # GGML_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
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 ${GGML_TEST_MODELS} ]; then
40
- IFS=',' read -r -a MODELS <<< "${GGML_TEST_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 ${GGML_CUDA} ]; then
52
  CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native"
53
  fi
54
 
55
- if [ ! -z ${GGML_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,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 ${WHISPER_OPENVINO} ]; then
66
  CMAKE_EXTRA="${CMAKE_EXTRA} -DWHISPER_OPENVINO=ON"
67
  fi
68
 
69
- if [ ! -z ${GGML_METAL} ]; then
70
  CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON"
71
  fi
72
 
73
- if [ ! -z ${GGML_VULKAN} ]; then
74
  CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_VULKAN=ON"
75
  fi
76
 
77
- if [ ! -z ${GGML_BLAS} ]; then
78
  CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_BLAS=ON"
79
  fi
80
 
81
- if [ ! -z ${WHISPER_COREML} ]; then
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