From 270fa60c01866c4431d540be960b6cd2bc2b9c44 Mon Sep 17 00:00:00 2001 From: historia Date: Fri, 28 Aug 2026 16:52:14 -0400 Subject: feat: run auto-build audio.cpp scripts for macos and windows --- app/backends/audiocpp/catalog.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'app/backends/audiocpp/catalog.py') diff --git a/app/backends/audiocpp/catalog.py b/app/backends/audiocpp/catalog.py index 412fdf1..5d49fac 100644 --- a/app/backends/audiocpp/catalog.py +++ b/app/backends/audiocpp/catalog.py @@ -2,6 +2,7 @@ import json import re +import sys from pathlib import Path from typing import Dict, List, Optional, Set, Tuple @@ -73,9 +74,20 @@ def _backend_options(detected: Optional[str] = None options, that option gets ``[auto-detected]`` appended and is the default (cursor/start) selection; otherwise the first option is the default as before. Returns (options, default_index). + + On macOS only ``cpu`` is offered: Metal (via ``build_metal.sh``) is + the only buildable inference backend there, and it is recorded as + ``cpu`` (see the ``-metal-`` -> ``cpu`` mapping in ``detect_backend`` + and ``built_server_binary``), so cuda/vulkan/hip — which cannot build + on macOS — never reach the build step. """ + if sys.platform == "darwin": + label = "cpu - Apple Metal (recorded as cpu)" + if detected == "cpu": + label += " [auto-detected]" + return [(label, "cpu")], 0 width = max(len(name) for name, _ in _BACKEND_DESCRIPTIONS) - options: List[Tuple[str, str]] = [] + options = [] default_index = 0 for index, (name, desc) in enumerate(_BACKEND_DESCRIPTIONS): label = f"{name.ljust(width)} - {desc}" -- cgit v1.2.3