fish-cpp/server: use -c 0 (CUDA) not -v 0 (Vulkan) — was running on CPU

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 <id> = --vulkan <device>
  -c <id> = --cuda <device>
  -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.
This commit is contained in:
2026-04-28 01:28:10 -07:00
parent 99710c26a5
commit 8a1d0bf709
+7 -3
View File
@@ -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 <device> 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: