From 7a190473292604734f02f1a347020ab4f44a4617 Mon Sep 17 00:00:00 2001 From: cebtenzzre Date: Wed, 11 Oct 2023 11:30:48 -0400 Subject: [PATCH] llmodel: do not call magic_match unless build variant is correct (#1488) --- gpt4all-backend/llmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-backend/llmodel.cpp b/gpt4all-backend/llmodel.cpp index 76dfd57a..c6f23024 100644 --- a/gpt4all-backend/llmodel.cpp +++ b/gpt4all-backend/llmodel.cpp @@ -113,8 +113,8 @@ const std::vector &LLModel::Implementation::implementat const LLModel::Implementation* LLModel::Implementation::implementation(const char *fname, const std::string& buildVariant) { for (const auto& i : implementationList()) { - if (!i.m_magicMatch(fname)) continue; if (buildVariant != i.m_buildVariant) continue; + if (!i.m_magicMatch(fname)) continue; return &i; } return nullptr;