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>
This commit is contained in:
cosmic-snow 2023-07-13 20:44:17 +02:00 committed by GitHub
parent 4963db8f43
commit 6200900677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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