fix: select integrated GPUs and allow PARAKEET_DEVICE to name a device#20
Merged
Conversation
Backend device selection only accepted GGML_BACKEND_DEVICE_TYPE_GPU, so integrated GPUs (Ryzen APUs and similar, reported as GGML_BACKEND_DEVICE_TYPE_IGPU) were skipped and the engine fell back to CPU on those machines. The auto-pick now matches both discrete and integrated GPU devices. PARAKEET_DEVICE also gains a third form: besides "cpu" (force CPU) and being unset (auto-pick the first GPU/IGPU), it can now name a specific registry device such as "CUDA0" or "Vulkan1" (case-insensitive). An unknown name logs and falls back to CPU instead of failing. use_sched is now derived from the chosen device type so any non-CPU device still offloads unsupported ops to CPU. Adds a regression test covering the env-var fallback paths (cpu, unknown name, case-insensitive CPU), which run on a CPU-only build, and documents the new behavior in the README. Closes #17 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mudler
approved these changes
Jun 7, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes #17.
Two related backend-selection issues:
Integrated GPUs were ignored. Device selection only accepted
GGML_BACKEND_DEVICE_TYPE_GPU, so integrated GPUs (Ryzen APUs and similar, reported asGGML_BACKEND_DEVICE_TYPE_IGPU) were skipped and the engine fell back to CPU. The auto-pick now matches both discrete and integrated GPU devices.PARAKEET_DEVICEcould only saycpu. It now has three forms:cpu(orCPU) forces CPU, as before.CUDA0,Vulkan1,Metal(case-insensitive) selects that specific registry device by name.An unknown name logs and falls back to CPU instead of failing.
use_schedis now derived from the chosen device type, so any non-CPU device still offloads unsupported ops to CPU via the scheduler.Tests
tests/test_backend_device.cppcovering the env-var fallback paths (cpu, unknown name, case-insensitiveCPU). These run on a CPU-only build, so they work in CI without a GPU.Note on validation
The IGPU code path itself could not be exercised on the dev host (a KVM guest where the AMD iGPU is not passed through; only a bochs virtual VGA is present, no render node /
/dev/kfd). The fix compiles, and the device-selection and CPU-fallback logic are covered by the new test. Real IGPU validation needs a host where the integrated GPU is exposed.🤖 Generated with Claude Code