Compare commits

...
Sign in to create a new pull request.

5 commits
master ... lto

Author SHA1 Message Date
Georgi Gerganov
bc28aaa8c2
make : use -lfto=auto to avoid warnings and maintain perf 2023-10-30 16:00:53 +02:00
Georgi Gerganov
57c4296cf0
ci : fix focal build 2023-10-30 15:58:40 +02:00
Georgi Gerganov
a6aba2c85c
ci : try to fix code coverage build 2023-10-30 15:46:47 +02:00
Georgi Gerganov
6f6b0db6d1
build : disable lto for C++ (make) and enable existing LTO flag (cmake) 2023-10-30 15:40:01 +02:00
Georgi Gerganov
1206b5f3be
build : enable link-time optimizations 2023-10-30 15:12:54 +02:00
4 changed files with 9 additions and 9 deletions

View file

@ -33,17 +33,17 @@ jobs:
id: depends id: depends
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential gcc-8 sudo apt-get install build-essential gcc-8 g++-8
- name: Build - name: Build
id: make_build id: make_build
run: | run: |
CC=gcc-8 make -j $(nproc) CC=gcc-8 CXX=g++-8 make -j $(nproc)
- name: Test - name: Test
id: make_test id: make_test
run: | run: |
CC=gcc-8 make tests -j $(nproc) CC=gcc-8 CXX=g++-8 make tests -j $(nproc)
make test -j $(nproc) make test -j $(nproc)
ubuntu-latest-cmake: ubuntu-latest-cmake:

View file

@ -15,13 +15,13 @@ jobs:
- name: Dependencies - name: Dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential gcc-8 lcov sudo apt-get install build-essential gcc-9 g++-9 lcov
- name: Build - name: Build
run: CC=gcc-8 make -j LLAMA_CODE_COVERAGE=1 tests run: CC=gcc-9 CXX=g++-9 make -j LLAMA_CODE_COVERAGE=1 tests
- name: Run tests - name: Run tests
run: CC=gcc-8 make test run: CC=gcc-9 CXX=g++-9 make test
- name: Generate coverage report - name: Generate coverage report
run: | run: |

View file

@ -45,7 +45,7 @@ endif()
# general # general
option(LLAMA_STATIC "llama: static link libraries" OFF) option(LLAMA_STATIC "llama: static link libraries" OFF)
option(LLAMA_NATIVE "llama: enable -march=native flag" ON) option(LLAMA_NATIVE "llama: enable -march=native flag" ON)
option(LLAMA_LTO "llama: enable link time optimization" OFF) option(LLAMA_LTO "llama: enable link time optimization" ON)
# debug # debug
option(LLAMA_ALL_WARNINGS "llama: enable all compiler warnings" ON) option(LLAMA_ALL_WARNINGS "llama: enable all compiler warnings" ON)

View file

@ -120,11 +120,11 @@ MK_CXXFLAGS = -std=c++11 -fPIC
# -Ofast tends to produce faster code, but may not be available for some compilers. # -Ofast tends to produce faster code, but may not be available for some compilers.
ifdef LLAMA_FAST ifdef LLAMA_FAST
MK_CFLAGS += -Ofast MK_CFLAGS += -Ofast -flto=auto
MK_HOST_CXXFLAGS += -Ofast MK_HOST_CXXFLAGS += -Ofast
MK_CUDA_CXXFLAGS += -O3 MK_CUDA_CXXFLAGS += -O3
else else
MK_CFLAGS += -O3 MK_CFLAGS += -O3 -flto=auto
MK_CXXFLAGS += -O3 MK_CXXFLAGS += -O3
endif endif