diff --git a/ggml-kompute.cpp b/ggml-kompute.cpp index bfc9d96f6..0d9956377 100644 --- a/ggml-kompute.cpp +++ b/ggml-kompute.cpp @@ -1897,7 +1897,7 @@ ggml_backend_buffer_type_t ggml_backend_kompute_buffer_type(int device) { return vec; }(); - auto it = std::find_if(bufts.begin(), bufts.end(), [device](const ggml_backend_buffer_type & t) { + auto it = std::find_if(bufts.begin(), bufts.end(), [device](const ggml_backend_buffer_type & t) { return device == static_cast(t.context)->device; }); return it < bufts.end() ? &*it : nullptr;