feat: enhance GPU support detection and user feedback in the engine interface
tests / python (3.10) (push) Successful in 13s
tests-macos / macos (push) Successful in 18s
tests / python (3.11) (push) Successful in 13s
tests / web (push) Successful in 38s

This commit is contained in:
Netherwarlord
2026-07-29 15:35:03 -04:00
parent 7bfec91a47
commit d63319bc9a
9 changed files with 264 additions and 12 deletions
+8
View File
@@ -24,6 +24,8 @@ from .core_bridge import (
ProviderError,
build_provider,
detect_architecture,
engine_warning,
gpu_offload_supported,
list_provider_names,
load_engine_class,
load_settings,
@@ -87,10 +89,16 @@ async def get_system() -> SystemInfo:
except EngineLoadError as exc:
runtime_name = f"unavailable ({exc})"
# Computed after load_engine_class above, which already imports llama_cpp,
# so the probe costs nothing extra here.
offload = gpu_offload_supported()
return SystemInfo(
version=__version__,
engine_architecture=descriptor.architecture,
engine_runtime=runtime_name,
engine_gpu_offload=offload,
engine_warning=engine_warning(descriptor, offload=offload),
template_ok=TEMPLATE_PATH.exists(),
python_version=platform.python_version(),
metrics={