Skip to content

Commit cf1dce3

Browse files
committed
Update build_ci.yml
1 parent 524cf49 commit cf1dce3

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

.github/workflows/build_ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ jobs:
3838
3939
- uses: actions/checkout@v4
4040
with:
41+
token: ${{ secrets.PAT_SIBLING_REPO_ACCESS }}
4142
submodules: recursive
4243

4344
- name: Install CMake
4445
uses: lukka/get-cmake@latest
4546
with:
46-
useLocalCache: true
47-
useCloudCache: true
47+
useLocalCache: false
48+
useCloudCache: false
4849
cmakeVersion: 3.31.4
4950
ninjaVersion: 1.12.1
5051

@@ -85,7 +86,7 @@ jobs:
8586

8687
- name: Configure CMake.
8788
run: |
88-
cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=Release -DGGML_TESTS=TRUE
89+
cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=Release
8990
9091
- name: Build the executable.
9192
run: |
@@ -127,9 +128,7 @@ jobs:
127128
wget -q https://huggingface.co/bartowski/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q8_0.gguf &&
128129
ls /usr/local/lib/ &&
129130
sudo chmod +x /usr/local/lib/libllama.so &&
130-
sudo chmod +x /usr/local/lib/libggml-cpu.so &&
131131
sudo chmod +x /usr/local/bin/llama-cli &&
132132
sudo chmod +x /usr/local/bin/Llama-3.2-1B-Instruct-Q8_0.gguf &&
133133
sudo patchelf --set-rpath /usr/local/lib /usr/local/bin/llama-cli
134-
sudo patchelf --add-needed /usr/local/bin/libggml-cpu.so /usr/local/bin/llama-cli
135134
sudo /usr/local/bin/llama-cli -m ./Llama-3.2-1B-Instruct-Q8_0.gguf -p "What is the meaning of life?" -b 1 -c 1024 -n 16 -no-cnv

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ set(CMAKE_WARN_UNUSED_CLI YES)
77

88
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
99

10+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
11+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi ${AVX_FLAGS}" CACHE STRING "C++ flags for release build with AVX" FORCE)
12+
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF" CACHE STRING "Linker flags for release build with optimizations" FORCE)
13+
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF" CACHE STRING "Shared linker flags for release build with optimizations" FORCE)
14+
15+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zi /DEBUG /ZI ${AVX_FLAGS}" CACHE STRING "C++ flags for debug build with AVX" FORCE)
16+
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG" CACHE STRING "Linker flags for debug build" FORCE)
17+
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG" CACHE STRING "Shared linker flags for debug build" FORCE)
18+
endif()
19+
1020
if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)
1121
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
1222
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")

CMakePresets.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
2121
"CMAKE_CXX_COMPILER": "icx",
2222
"CMAKE_C_COMPILER": "cl",
23-
"GGML_SYCL": "ON",
23+
"OIML_SYCL": "ON",
2424
"CMAKE_INSTALL_RPATH": "$ORIGIN;$ORIGIN/.."
2525
}
2626
},
2727
{ "name": "debug", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } },
2828
{ "name": "release", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } },
2929
{ "name": "reldbg", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
30-
{ "name": "static", "hidden": true, "cacheVariables": { "GGML_STATIC": "ON" } },
31-
{ "name": "sycl_f16", "hidden": true, "cacheVariables": { "GGML_SYCL_F16": "ON" } },
32-
{ "name": "vulkan", "hidden": true, "cacheVariables": { "GGML_VULKAN": "ON" } },
30+
{ "name": "static", "hidden": true, "cacheVariables": { "OIML_STATIC": "ON" } },
31+
{ "name": "sycl_f16", "hidden": true, "cacheVariables": { "OIML_SYCL_F16": "ON" } },
32+
{ "name": "vulkan", "hidden": true, "cacheVariables": { "OIML_VULKAN": "ON" } },
3333

3434
{
3535
"name": "x64-windows-llvm", "hidden": true,
@@ -86,6 +86,10 @@
8686
{ "name": "x64-windows-msvc-release", "inherits": [ "base", "reldbg" ] },
8787
{ "name": "x64-windows-msvc+static-release", "inherits": [ "base", "reldbg", "static" ] },
8888

89+
{ "name": "x64-windows-msvc-debug-cli", "inherits": [ "base", "debug" ],"cacheVariables": { "CLI":"TRUE" } },
90+
{ "name": "x64-windows-msvc-release-cli", "inherits": [ "base", "reldbg" ],"cacheVariables": { "CLI":"TRUE" } },
91+
{ "name": "x64-windows-msvc+static-release-cli", "inherits": [ "base", "reldbg", "static" ],"cacheVariables": { "CLI":"TRUE" } },
92+
8993
{ "name": "x64-windows-sycl-debug", "inherits": [ "sycl-base", "debug" ] },
9094
{ "name": "x64-windows-sycl-debug-f16", "inherits": [ "sycl-base", "debug", "sycl_f16" ] },
9195
{ "name": "x64-windows-sycl-release", "inherits": [ "sycl-base", "release" ] },

0 commit comments

Comments
 (0)