diff --git a/README.md b/README.md index 23b95b0..6b7ef3a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ git clone --recurse-submodules https://github.com/ServeurpersoCom/qwentts.cpp.gi cd qwentts.cpp ./buildcuda.sh # NVIDIA GPU ./buildvulkan.sh # AMD/Intel GPU (Vulkan) +./buildmetal.sh # Apple GPU (Metal + BLAS), shared lib too ./buildcpu.sh # CPU only ./buildall.sh # all backends, runtime DL loading NVCC_CCBIN=g++-13 ./buildcuda.sh # rolling release distros (Arch w/ GCC 16, etc.) @@ -203,6 +204,8 @@ only the `qt_*` symbols ; every internal `pipeline_*` and `backend_*` stays hidden inside the .so. The static `libqwen-core.a` is the default build artefact and the one the bundled CLI tools link against. +`./buildmetal.sh` passes the flag ; the other build scripts do not. + See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the model, the GGUF layout, the inference pipeline, every CLI flag, the public API reference and the validation results. diff --git a/buildmetal.sh b/buildmetal.sh new file mode 100755 index 0000000..41f78a2 --- /dev/null +++ b/buildmetal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Apple GPU build. The GGML flags are the macOS platform defaults, pinned +# so the recipe stands on its own. QWEN_SHARED=ON is the addition : it also +# emits libqwen.dylib, the shared target binding consumers (ctypes, bindgen, +# cgo) dlopen. The other recipes keep the static-only default. + +rm -rf build +mkdir build +cd build + +cmake .. -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_BLAS=ON -DQWEN_SHARED=ON +cmake --build . --config Release -j "$(getconf _NPROCESSORS_ONLN)" diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 40e947e..4815390 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -45,6 +45,7 @@ git clone --recurse-submodules https://github.com/ServeurpersoCom/qwentts.cpp.gi cd qwentts.cpp ./buildcuda.sh # NVIDIA GPU ./buildvulkan.sh # AMD/Intel GPU (Vulkan) +./buildmetal.sh # Apple GPU (Metal + BLAS), shared lib too ./buildcpu.sh # CPU only ./buildall.sh # all backends, runtime DL loading ``` @@ -530,7 +531,8 @@ The static `libqwen-core.a` is the default artefact and the one the CLI tools link. For binding consumers, configure with `-DQWEN_SHARED=ON` to add `libqwen.so` (or `.dll` / `.dylib`) exporting only the `qt_*` symbols ; every internal `pipeline_*` and `backend_*` stays hidden -behind `-fvisibility=hidden`. +behind `-fvisibility=hidden`. `./buildmetal.sh` is the one build script +that configures the option in. ## CLI tools