Skip to content

Commit b6838f1

Browse files
committed
fix(workflow): streamline build steps for llama.cpp, whisper.cpp, and miniaudio in windows-sycl
1 parent f57c69b commit b6838f1

1 file changed

Lines changed: 28 additions & 43 deletions

File tree

.github/workflows/main.yml

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -340,25 +340,18 @@ jobs:
340340
build/miniaudio.stamp
341341
key: miniaudio-${{ matrix.name }}-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.submodule-hashes.outputs.miniaudio }}-${{ hashFiles('modules/miniaudio/**') }}-${{ steps.submodule-hashes.outputs.make }}
342342

343-
- name: build llama.cpp (msvc)
344-
if: (matrix.name == 'windows-cuda' || matrix.name == 'windows-hip' || matrix.name == 'windows-sycl') && steps.cache-llama.outputs.cache-hit != 'true'
343+
- name: build llama.cpp (sycl/msvc)
344+
if: matrix.name == 'windows-sycl' && steps.cache-llama.outputs.cache-hit != 'true'
345+
shell: cmd
346+
run: |
347+
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
348+
make build/llama.cpp.stamp ${{ matrix.make && matrix.make || ''}}
349+
350+
- name: build llama.cpp (cuda/hip/msvc)
351+
if: (matrix.name == 'windows-cuda' || matrix.name == 'windows-hip') && steps.cache-llama.outputs.cache-hit != 'true'
345352
shell: cmd
346353
run: |
347354
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
348-
if "${{ matrix.name }}" == "windows-sycl" (
349-
if exist "%ONEAPI_ROOT%\setvars.bat" (
350-
call "%ONEAPI_ROOT%\setvars.bat"
351-
) else (
352-
echo OneAPI setvars.bat not found at %ONEAPI_ROOT%\setvars.bat
353-
if exist "%ONEAPI_ROOT%" (
354-
dir "%ONEAPI_ROOT%"
355-
) else (
356-
echo ONEAPI_ROOT directory does not exist: %ONEAPI_ROOT%
357-
)
358-
)
359-
where icx 2^>nul ^|^| echo icx not found
360-
where dpcpp 2^>nul ^|^| echo dpcpp not found
361-
)
362355
set "PATH=%VCToolsInstallDir%bin\Hostx64\x64;%WindowsSdkBinPath%x64;%PATH%"
363356
set "PATH=%PATH:C:\msys64\usr\bin;=%"
364357
set "PATH=%PATH:C:\msys64\mingw64\bin;=%"
@@ -373,18 +366,18 @@ jobs:
373366
if: contains(matrix.os, 'windows-') == false && steps.cache-llama.outputs.cache-hit != 'true'
374367
run: make build/llama.cpp.stamp ${{ matrix.make && matrix.make || ''}}
375368

376-
- name: build whisper.cpp (msvc)
377-
if: (matrix.name == 'windows-cuda' || matrix.name == 'windows-hip' || matrix.name == 'windows-sycl') && steps.cache-whisper.outputs.cache-hit != 'true'
369+
- name: build whisper.cpp (sycl/msvc)
370+
if: matrix.name == 'windows-sycl' && steps.cache-whisper.outputs.cache-hit != 'true'
371+
shell: cmd
372+
run: |
373+
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
374+
make build/whisper.cpp.stamp ${{ matrix.make && matrix.make || ''}}
375+
376+
- name: build whisper.cpp (cuda/hip/msvc)
377+
if: (matrix.name == 'windows-cuda' || matrix.name == 'windows-hip') && steps.cache-whisper.outputs.cache-hit != 'true'
378378
shell: cmd
379379
run: |
380380
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
381-
if "${{ matrix.name }}" == "windows-sycl" (
382-
if exist "%ONEAPI_ROOT%\setvars.bat" (
383-
call "%ONEAPI_ROOT%\setvars.bat"
384-
)
385-
where icx
386-
where dpcpp
387-
)
388381
set "PATH=%VCToolsInstallDir%bin\Hostx64\x64;%WindowsSdkBinPath%x64;%PATH%"
389382
set "PATH=%PATH:C:\msys64\usr\bin;=%"
390383
set "PATH=%PATH:C:\msys64\mingw64\bin;=%"
@@ -399,18 +392,18 @@ jobs:
399392
if: contains(matrix.os, 'windows-') == false && steps.cache-whisper.outputs.cache-hit != 'true'
400393
run: make build/whisper.cpp.stamp ${{ matrix.make && matrix.make || ''}}
401394

402-
- name: build miniaudio (msvc)
403-
if: (matrix.name == 'windows-cuda' || matrix.name == 'windows-hip' || matrix.name == 'windows-sycl') && steps.cache-miniaudio.outputs.cache-hit != 'true'
395+
- name: build miniaudio (sycl/msvc)
396+
if: matrix.name == 'windows-sycl' && steps.cache-miniaudio.outputs.cache-hit != 'true'
397+
shell: cmd
398+
run: |
399+
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
400+
make build/miniaudio.stamp ${{ matrix.make && matrix.make || ''}}
401+
402+
- name: build miniaudio (cuda/hip/msvc)
403+
if: (matrix.name == 'windows-cuda' || matrix.name == 'windows-hip') && steps.cache-miniaudio.outputs.cache-hit != 'true'
404404
shell: cmd
405405
run: |
406406
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
407-
if "${{ matrix.name }}" == "windows-sycl" (
408-
if exist "%ONEAPI_ROOT%\setvars.bat" (
409-
call "%ONEAPI_ROOT%\setvars.bat"
410-
)
411-
where icx
412-
where dpcpp
413-
)
414407
set "PATH=%VCToolsInstallDir%bin\Hostx64\x64;%WindowsSdkBinPath%x64;%PATH%"
415408
set "PATH=%PATH:C:\msys64\usr\bin;=%"
416409
set "PATH=%PATH:C:\msys64\mingw64\bin;=%"
@@ -457,15 +450,7 @@ jobs:
457450
if: matrix.name == 'windows-sycl'
458451
shell: cmd
459452
run: |
460-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
461-
if exist "%ONEAPI_ROOT%\setvars.bat" (
462-
call "%ONEAPI_ROOT%\setvars.bat"
463-
)
464-
where icx
465-
where dpcpp
466-
set "PATH=%VCToolsInstallDir%bin\Hostx64\x64;%WindowsSdkBinPath%x64;%PATH%"
467-
set "PATH=%PATH:C:\msys64\usr\bin;=%"
468-
set "PATH=%PATH:C:\msys64\mingw64\bin;=%"
453+
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
469454
make extension ${{ matrix.make && matrix.make || ''}}
470455
471456
- name: windows build sqlite-ai (mingw)

0 commit comments

Comments
 (0)