interplane.Get Omega
Read in your language

ggml

[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)

Brought by drakestapleton

branch master Branches Tags History

ggml / examples / test-cmake / build-install.sh

34 lines · 1067 bytes Raw Blame History
1#!/bin/bash
2
3set -e
4
5# Remove installation target directory
6rm -rf install-dl install ggml-build-install-dl ggml-build-install
7
8### Build standard installation
9build_dir=ggml-build-install
10install_dir=install
11
12cmake --fresh -S ../../. -B $build_dir -DCMAKE_BUILD_TYPE=Release \
13 -DBUILD_SHARED_LIBS=ON \
14 -DCMAKE_INSTALL_PREFIX="${PWD}/${install_dir}"
15
16cmake --build $build_dir --parallel 12
17cmake --install $build_dir
18
19### Build dynamic backend
20build_dir=ggml-build-install-dl
21install_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.
26cmake --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
33cmake --build $build_dir --parallel 12
34cmake --install $build_dir