8000 MSVC instruction detection (fixed up #809) by netrunnereve · Pull Request #3923 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

MSVC instruction detection (fixed up #809) #3923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix merge
  • Loading branch information
netrunnereve committed Nov 3, 2023
commit 4998f59e579ed9c52d4d5853f85e4c26132563eb
15 changes: 5 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALO
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
option(LLAMA_BUILD_SERVER "llama: build server example" ON)

# instruction set detection for MSVC only
if (LLAMA_NATIVE)
include(cmake/FindSIMD.cmake)
endif ()

#
# Build info header
#
Expand Down Expand Up @@ -138,11 +133,6 @@ else()
message(WARNING "Git repository not found; to enable automatic generation of build info, make sure Git is installed and the project is a Git repository.")
endif()

if(LLAMA_NATIVE)
include(cmake/FindSIMD.cmake)
endif()
>>>>>>> 8a2a73102c8b7af446af0350282b65d7820fe4ac

#
# Compile flags
#
Expand Down Expand Up @@ -524,6 +514,11 @@ if (NOT MSVC)
endif()
endif()

# instruction set detection for MSVC only
if (LLAMA_NATIVE)
include(cmake/FindSIMD.cmake)
endif ()

if ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") OR (${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") OR ("${CMAKE_GENERATOR_PLATFORM_LWR}" MATCHES "arm64"))
message(STATUS "ARM detected")
if (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindSIMD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ macro(check_sse type flags)
foreach(__FLAG ${flags})
if(NOT ${type}_FOUND)
set(CMAKE_REQUIRED_FLAGS ${__FLAG})
CHECK_C_SOURCE_RUNS("${${type}_CODE}" HAS_${type}_${__FLAG_I})
check_c_source_runs("${${type}_CODE}" HAS_${type}_${__FLAG_I})
if(HAS_${type}_${__FLAG_I})
set(${type}_FOUND TRUE CACHE BOOL "${type} support")
set(${type}_FLAGS "${__FLAG}" CACHE STRING "${type} flags")
Expand Down
0