From 8a1d0bf709cd2eb4fe9209411f61ac16d4c007d5 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Tue, 28 Apr 2026 01:28:10 -0700 Subject: [PATCH] =?UTF-8?q?fish-cpp/server:=20use=20-c=200=20(CUDA)=20not?= =?UTF-8?q?=20-v=200=20(Vulkan)=20=E2=80=94=20was=20running=20on=20CPU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit s2.cpp's README example uses `-v 0` which is `--vulkan 0` (Vulkan device 0), easy to misread as "voice 0". The shim copied that verbatim, so even after fixing the libcuda.so build problem AND the libgomp.so runtime dep, every synthesis ran on CPU because the wrong backend was selected. Direct verification: `[Model] NPU not compiled, falling back to CPU` in stderr; nvidia-smi showed no s2 process; bench timed out at 60s on phrases that fish-s2 (HF, GPU) does in 7s. s2.cpp's CLI: -v = --vulkan -c = --cuda -M = --metal (Apple Silicon) Switched the shim to `-c 0`. The CUDA backend IS in the build (-DS2_CUDA=ON worked, libggml-cuda.so links fine per ldd, libcuda.so.1 mounts at runtime via NVIDIA container runtime) — just wasn't being told to use it. --- stacks/fish-cpp/server.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stacks/fish-cpp/server.py b/stacks/fish-cpp/server.py index 324bf88..a55cbf4 100644 --- a/stacks/fish-cpp/server.py +++ b/stacks/fish-cpp/server.py @@ -84,9 +84,13 @@ def tts(req: TTSRequest) -> FileResponse: "-t", str(TOKENIZER_PATH), "-text", req.text, "-o", str(out_path), - # -v selects voice mode; 0 = default (no preset). Preset voices - # would need s2.cpp to ship a voice library; clone via -pa/-pt. - "-v", "0", + # -c selects CUDA backend on the given device id. The + # README example uses `-v 0` (which is --vulkan 0 — easy to + # misread as "voice 0"); we want CUDA so that the work hits + # the A6000 tensor cores instead of falling back to CPU. + # Without a backend flag, s2 prints "NPU not compiled, falling + # back to CPU" and runs at single-digit RTF on a 4-core CPU. + "-c", "0", ] if req.references: