Skip to content

Commit

Permalink
Fix Windows MSVC arch detection (nomic-ai#1194)
Browse files Browse the repository at this point in the history
- in llmodel.cpp to fix AVX-only handling

Signed-off-by: cosmic-snow <[email protected]>
  • Loading branch information
cosmic-snow authored Jul 13, 2023
1 parent 4963db8 commit 6200900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpt4all-backend/llmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6200900

Please sign in to comment.