mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Name the card that ran, and say what to install
Two things the first pass got wrong. The card was named out of whichever listing came first, so a machine with both a CUDA build and a Vulkan loader could have its card named from the wrong one. Worse, whisper numbers every device it can see in one sequence while the handle carries the backend's own index: a processor-only build lent a Vulkan backend through GGML_BACKEND_PATH reports "device 1: Vulkan0", and reading that listing by the handle's digit names whatever sat in slot zero. The backend's own enumeration is asked first now, because it is the only one indexed the way the handle is, and whisper's listing is a fallback taken only when it names exactly one card. And "this build carries no graphics backend" left the reader with nowhere to go. It is the one case with a fix worth naming: whisper.cpp publishes no build that reaches a card on Linux, and program_path runs a copy from the system ahead of the downloaded one, so installing one is the whole remedy. Server.state() now says which copy is running, and the line says so only when it is Dikte's own download; a system build that cannot reach the card gets the shorter sentence, since installing it again would change nothing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019zqCqhmeaNT6m1GPp8ZWPp
This commit is contained in:
@@ -806,6 +806,12 @@ class LocalModels(DikteTest):
|
||||
self.assertIn("loaded on the processor", line)
|
||||
self.assertIn("this build carries none", line)
|
||||
|
||||
def test_the_downloaded_build_is_told_where_a_working_one_comes_from(self):
|
||||
line = self.status({"whisper": self.entry(
|
||||
backend="CPU", device="CPU", available=["CPU"], downloaded=True)})
|
||||
self.assertIn("downloaded build has no GPU backend", line)
|
||||
self.assertIn("whisper-server on your system", line)
|
||||
|
||||
def test_a_card_the_build_could_have_used_says_something_else(self):
|
||||
line = self.status({"whisper": self.entry(
|
||||
backend="CPU", device="CPU", available=["CUDA", "CPU"])})
|
||||
|
||||
Reference in New Issue
Block a user