Skip to content

Commit 78156d7

Browse files
authored
Merge branch 'master' into 1
2 parents d405804 + 5535c9f commit 78156d7

File tree

14 files changed

+602
-60
lines changed

14 files changed

+602
-60
lines changed

.github/workflows/build-ci.yml

Lines changed: 488 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@ on:
77
description: 'Create new release'
88
required: true
99
type: boolean
10-
push:
11-
branches:
12-
- master
13-
paths: ['.github/workflows/build.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal']
14-
pull_request:
15-
types: [opened, synchronize, reopened]
16-
paths: ['.github/workflows/build.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal']
17-
10+
1811
concurrency:
1912
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
2013
cancel-in-progress: true

.github/workflows/editorconfig.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@ project("llama.cpp" C CXX)
33
include(CheckIncludeFileCXX)
44

55
#set(CMAKE_WARN_DEPRECATED YES)
6-
set(CMAKE_WARN_UNUSED_CLI YES)
6+
#set(CMAKE_WARN_UNUSED_CLI YES)
7+
8+
#enable O3 flag
9+
if(NOT CMAKE_BUILD_TYPE)
10+
set(CMAKE_BUILD_TYPE Release)
11+
endif()
12+
13+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-error")
14+
set(CMAKE_CXX_FLAGS_DEBUG "-g")
15+
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
16+
17+
#add lto
18+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
19+
20+
#no warn
21+
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
722

823
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
924

@@ -58,7 +73,7 @@ endif()
5873
#
5974

6075
# debug
61-
option(LLAMA_ALL_WARNINGS "llama: enable all compiler warnings" ON)
76+
option(LLAMA_ALL_WARNINGS "llama: enable all compiler warnings" OFF)
6277
option(LLAMA_ALL_WARNINGS_3RD_PARTY "llama: enable all compiler warnings in 3rd party libs" OFF)
6378

6479
# build

common/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# common
2+
#enable O3 flag
3+
if(NOT CMAKE_BUILD_TYPE)
4+
set(CMAKE_BUILD_TYPE Release)
5+
endif()
6+
7+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-error")
8+
set(CMAKE_CXX_FLAGS_DEBUG "-g")
9+
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
210

11+
#add lto
12+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
313
find_package(Threads REQUIRED)
414

515
llama_add_compile_flags()

examples/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# dependencies
2+
#enable O3 flag
3+
if(NOT CMAKE_BUILD_TYPE)
4+
set(CMAKE_BUILD_TYPE Release)
5+
endif()
6+
7+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-error")
8+
set(CMAKE_CXX_FLAGS_DEBUG "-g")
9+
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
210

11+
#add lto
12+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
313
find_package(Threads REQUIRED)
414

515
# third-party

examples/llava/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-r ../../requirements/requirements-convert_legacy_llama.txt
22
--extra-index-url https://download.pytorch.org/whl/cpu
3-
pillow~=10.2.0
3+
pillow~=11.0.0
44
torch~=2.2.1
55
torchvision~=0.17.1

ggml/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
cmake_minimum_required(VERSION 3.14) # for add_link_options and implicit target directories.
22
project("ggml" C CXX)
33
include(CheckIncludeFileCXX)
4+
#enable O3 flag
5+
if(NOT CMAKE_BUILD_TYPE)
6+
set(CMAKE_BUILD_TYPE Release)
7+
endif()
8+
9+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-error")
10+
set(CMAKE_CXX_FLAGS_DEBUG "-g")
11+
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
412

13+
#add lto
14+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
515
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
616

717
if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)

pocs/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# dependencies
2+
#enable O3 flag
3+
if(NOT CMAKE_BUILD_TYPE)
4+
set(CMAKE_BUILD_TYPE Release)
5+
endif()
6+
7+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-error")
8+
set(CMAKE_CXX_FLAGS_DEBUG "-g")
9+
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
210

11+
#add lto
12+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
313
find_package(Threads REQUIRED)
414

515
# third-party

pocs/vdot/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#enable O3 flag
2+
if(NOT CMAKE_BUILD_TYPE)
3+
set(CMAKE_BUILD_TYPE Release)
4+
endif()
5+
6+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-error")
7+
set(CMAKE_CXX_FLAGS_DEBUG "-g")
8+
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
9+
10+
#add lto
11+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
112
set(TARGET llama-vdot)
213
add_executable(${TARGET} vdot.cpp)
314
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})

0 commit comments

Comments
 (0)