mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-05 10:30:29 +00:00
We no longer have an avx_only repository and better error handling for minimum hardware requirements. (#833)
This commit is contained in:
@@ -30,15 +30,20 @@ LLM::LLM()
|
||||
connect(this, &LLM::serverEnabledChanged,
|
||||
m_chatListModel, &ChatListModel::handleServerEnabledChanged);
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
if (QString(GPT4ALL_AVX_ONLY) == "OFF") {
|
||||
const bool avx(__builtin_cpu_supports("avx"));
|
||||
const bool avx2(__builtin_cpu_supports("avx2"));
|
||||
const bool fma(__builtin_cpu_supports("fma"));
|
||||
m_compatHardware = avx && avx2 && fma;
|
||||
emit compatHardwareChanged();
|
||||
}
|
||||
#if defined(__x86_64__)
|
||||
#ifndef _MSC_VER
|
||||
const bool minimal(__builtin_cpu_supports("avx"));
|
||||
#else
|
||||
int cpuInfo[4];
|
||||
__cpuid(cpuInfo, 1);
|
||||
const bool minimal(cpuInfo[2] & (1 << 28));
|
||||
#endif
|
||||
#else
|
||||
const bool minimal = true; // Don't know how to handle non-x86_64
|
||||
#endif
|
||||
|
||||
m_compatHardware = minimal;
|
||||
emit compatHardwareChanged();
|
||||
}
|
||||
|
||||
bool LLM::checkForUpdates() const
|
||||
|
Reference in New Issue
Block a user