From 620090067799c96d7436a064139941ab9c8d5097 Mon Sep 17 00:00:00 2001 From: cosmic-snow <134004613+cosmic-snow@users.noreply.github.com> Date: Thu, 13 Jul 2023 20:44:17 +0200 Subject: [PATCH] Fix Windows MSVC arch detection (#1194) - in llmodel.cpp to fix AVX-only handling Signed-off-by: cosmic-snow <134004613+cosmic-snow@users.noreply.github.com> --- gpt4all-backend/llmodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpt4all-backend/llmodel.cpp b/gpt4all-backend/llmodel.cpp index b0e49808..d3ac6c96 100644 --- a/gpt4all-backend/llmodel.cpp +++ b/gpt4all-backend/llmodel.cpp @@ -18,7 +18,7 @@ std::string s_implementations_search_path = "."; static bool has_at_least_minimal_hardware() { -#ifdef __x86_64__ +#if defined(__x86_64__) || defined(_M_X64) #ifndef _MSC_VER return __builtin_cpu_supports("avx"); #else @@ -30,7 +30,7 @@ static bool has_at_least_minimal_hardware() { } static bool requires_avxonly() { -#ifdef __x86_64__ +#if defined(__x86_64__) || defined(_M_X64) #ifndef _MSC_VER return !__builtin_cpu_supports("avx2"); #else