ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
ggml / examples / test-cmake / build-install.sh
| 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | # Remove installation target directory |
| 6 | rm -rf install-dl install ggml-build-install-dl ggml-build-install |
| 7 | |
| 8 | ### Build standard installation |
| 9 | build_dir=ggml-build-install |
| 10 | install_dir=install |
| 11 | |
| 12 | cmake --fresh -S ../../. -B $build_dir -DCMAKE_BUILD_TYPE=Release \ |
| 13 | -DBUILD_SHARED_LIBS=ON \ |
| 14 | -DCMAKE_INSTALL_PREFIX="${PWD}/${install_dir}" |
| 15 | |
| 16 | cmake --build $build_dir --parallel 12 |
| 17 | cmake --install $build_dir |
| 18 | |
| 19 | ### Build dynamic backend |
| 20 | build_dir=ggml-build-install-dl |
| 21 | install_dir=install-dl |
| 22 | |
| 23 | # Build dynamic backend modules and install them in libexec, mirroring a package |
| 24 | # manager's private plugin directory. GGML_BACKEND_DIR is compiled into ggml as |
| 25 | # its plugin search path, and cmake --install copies the backend modules there. |
| 26 | cmake --fresh -S ../../. -B $build_dir -DCMAKE_BUILD_TYPE=Release \ |
| 27 | -DBUILD_SHARED_LIBS=ON \ |
| 28 | -DGGML_BACKEND_DL=ON \ |
| 29 | -DGGML_CPU_ALL_VARIANTS=ON \ |
| 30 | -DCMAKE_INSTALL_PREFIX="${PWD}/${install_dir}" \ |
| 31 | -DGGML_BACKEND_DIR="${PWD}/${install_dir}/libexec" |
| 32 | |
| 33 | cmake --build $build_dir --parallel 12 |
| 34 | cmake --install $build_dir |