Skip to content
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

Successful AVX=1 activation on old processor - Ivy Bridge (i3770k) - speed increased #204

Open
aka4el opened this issue Apr 5, 2023 · 0 comments

Comments

@aka4el
Copy link

aka4el commented Apr 5, 2023

Installation with default CMakeLists.txt parameters for me, working on the old i3770k caused a stop error and the chat did not open. managed to solve the problem a few days ago by disabling all microinstructions, but the performance did not suit me, a dozen characters were displayed in responses for more than a minute. #160 (comment)
Now I propose the second option for editing CMakeLists.txt - here are the lines changed in it:
(all parameters avx2 are replaced by avx)

else()
message(STATUS "x86 detected")
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /arch:AVX")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:AVX")
else()
if(NOT LLAMA_NO_AVX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
endif()
if(NOT LLAMA_NO_AVX2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
endif()
if(NOT LLAMA_NO_FMA)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfma")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mf16c")
endif()
endif()

after compiling with these settings, the program works correctly with activated AVX and the speed of responses has increased
(full modified CMakeLists.txt in attachment) CMakeLists.txt
avx=1-CMakeLists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant