Skip to content

Commit a8a22ff

Browse files
committed
Build locally will detect CPU
1 parent ac072d7 commit a8a22ff

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ jobs:
157157
matrix:
158158
include:
159159
- build: 'avx2'
160-
defines: '-DLLAMA_BUILD_SERVER=ON'
160+
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_NATIVE=OFF'
161161
- build: 'avx'
162-
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX2=OFF'
162+
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_NATIVE=OFF -DLLAMA_AVX2=OFF'
163163
- build: 'avx512'
164-
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
164+
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_NATIVE=OFF -DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
165165
- build: 'clblast'
166-
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
166+
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_NATIVE=OFF -DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
167167
- build: 'openblas'
168-
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
168+
defines: '-DLLAMA_BUILD_SERVER=ON -DLLAMA_NATIVE=OFF -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
169169

170170
steps:
171171
- name: Clone

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif()
3838

3939
# general
4040
option(LLAMA_STATIC "llama: static link libraries" OFF)
41-
option(LLAMA_NATIVE "llama: enable -march=native flag" OFF)
41+
option(LLAMA_NATIVE "llama: enable -march=native flag" ON)
4242
option(LLAMA_LTO "llama: enable link time optimization" OFF)
4343

4444
# debug
@@ -109,8 +109,7 @@ else()
109109
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.")
110110
endif()
111111

112-
MESSAGE("NATIVE=" ${LLAMA_NATIVE} " MSVC=" ${MSVC})
113-
IF(LLAMA_NATIVE AND MSVC)
112+
IF(LLAMA_NATIVE)
114113
include(cmake/FindSIMD.cmake)
115114
ENDIF()
116115

0 commit comments

Comments
 (0)