Skip to content

Commit 192bb0a

Browse files
committed
fix(workflow): update Windows build steps to use Ninja and adjust CMake arguments for CUDA
1 parent bd0001a commit 192bb0a

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,10 @@ jobs:
221221
run: choco install ninja
222222
shell: pwsh
223223

224-
- name: windows build sqlite-ai with cuda
224+
- name: windows build ggml-cuda
225225
if: matrix.name == 'windows-cuda'
226-
run: |
227-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
228-
set CMAKE_GENERATOR=Ninja
229-
D:\a\_temp\msys64\usr\bin\make.exe extension ${{ matrix.make && matrix.make || ''}}
230-
shell: cmd
226+
run: make build/llama.cpp.stamp LLAMA="-G \"Ninja Multi-Config\" -DGGML_NATIVE=OFF -DGGML_CPU=OFF -DGGML_CUDA=ON" LLAMA_ARGS="--target ggml-cuda"
227+
shell: pwsh
231228

232229
- name: windows install hip toolkit
233230
if: matrix.name == 'windows-hip'

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,23 +224,27 @@ test: $(TARGET)
224224

225225
# Build submodules
226226
ifeq ($(PLATFORM),windows)
227-
ARGS = --parallel $(CPUS)
227+
ifneq (,$(findstring Ninja,$(LLAMA)))
228+
ARGS = -j $(CPUS)
229+
else
230+
ARGS = --parallel $(CPUS)
231+
endif
228232
else
229233
ARGS = -- -j$(CPUS)
230234
endif
231235
build/llama.cpp.stamp:
232236
cmake -B $(BUILD_LLAMA) $(LLAMA_OPTIONS) $(LLAMA_DIR)
233-
cmake --build $(BUILD_LLAMA) --config Release $(ARGS)
237+
cmake --build $(BUILD_LLAMA) --config Release $(LLAMA_ARGS) $(ARGS)
234238
touch $@
235239

236240
build/whisper.cpp.stamp:
237241
cmake -B $(BUILD_WHISPER) $(WHISPER_OPTIONS) $(WHISPER_DIR)
238-
cmake --build $(BUILD_WHISPER) --config Release $(ARGS)
242+
cmake --build $(BUILD_WHISPER) --config Release $(WHISPER_ARGS) $(ARGS)
239243
touch $@
240244

241245
build/miniaudio.stamp:
242246
cmake -B $(BUILD_MINIAUDIO) $(MINIAUDIO_OPTIONS) $(MINIAUDIO_DIR)
243-
cmake --build $(BUILD_MINIAUDIO) --config Release $(ARGS)
247+
cmake --build $(BUILD_MINIAUDIO) --config Release $(MINIAUDIO_ARGS) $(ARGS)
244248
touch $@
245249

246250
$(LLAMA_LIBS): build/llama.cpp.stamp

0 commit comments

Comments
 (0)