Skip to content

IGPUs are ignored #17

@OtherCrashOverride

Description

@OtherCrashOverride

When using a device with an IGPU, such as Ryzen APUs, the IGPU is ignored during backend selection.

The following enables IGPU selection:

diff --git a/src/backend.cpp b/src/backend.cpp
index 88e2c8b..7eb9e33 100644
--- a/src/backend.cpp
+++ b/src/backend.cpp
@@ -79,7 +79,9 @@ Backend::Backend(int n_threads) : impl_(new Impl()) {
         // single path covers them all with no backend-specific includes.
         for (size_t i = 0; i < ggml_backend_dev_count(); ++i) {
             ggml_backend_dev_t dev = ggml_backend_dev_get(i);
-            if (ggml_backend_dev_type(dev) == GGML_BACKEND_DEVICE_TYPE_GPU) {
+           auto temp = ggml_backend_dev_type(dev);
+            if (temp == GGML_BACKEND_DEVICE_TYPE_GPU ||
+               temp == GGML_BACKEND_DEVICE_TYPE_IGPU) {
                 impl_->backend = ggml_backend_dev_init(dev, nullptr);
                 if (impl_->backend) {
                     device_name_ = ggml_backend_dev_name(dev);

It would also be beneficial to allow the "PARAKEET_DEVICE" environment variable to specify the backend such as "CUDA0" or "Vulkan1" instead of just "cpu" as is currently authored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions