fix win build
This commit is contained in:
parent
68fd9f46bb
commit
05da43b910
4 changed files with 20 additions and 18 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -42,7 +42,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: scripts/install_windows.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
|
run: scripts/install_oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: cmake_build
|
id: cmake_build
|
||||||
|
|
|
@ -275,28 +275,30 @@ b. Download & install make for windows provided by mingw-w64: https://www.mingw-
|
||||||
In oneAPI command line window:
|
In oneAPI command line window:
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
|
@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
|
||||||
|
|
||||||
#for FP16
|
:: for FP16
|
||||||
#cmake -G "MinGW Makefiles" .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=Release -DLLAMA_SYCL_F16=ON
|
:: faster for long-prompt inference
|
||||||
|
:: cmake -G "MinGW Makefiles" .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=Release -DLLAMA_SYCL_F16=ON
|
||||||
|
|
||||||
#for FP32
|
:: for FP32
|
||||||
cmake -G "MinGW Makefiles" .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=Release
|
cmake -G "MinGW Makefiles" .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
#build example/main only
|
|
||||||
#make main
|
|
||||||
|
|
||||||
#build all binary
|
:: build example/main only
|
||||||
|
:: make main
|
||||||
|
|
||||||
|
:: build all binary
|
||||||
make
|
make
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```
|
```
|
||||||
.\examples\sycl\win-build.bat
|
.\examples\sycl\win-build-sycl.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
|
@ -358,7 +360,7 @@ Set device ID = 0 by **set GGML_SYCL_DEVICE=0**
|
||||||
|
|
||||||
```
|
```
|
||||||
set GGML_SYCL_DEVICE=0
|
set GGML_SYCL_DEVICE=0
|
||||||
build\bin\main.exe -m models\llama-2-7b.Q4_0.gguf -p "${INPUT2}" -n 400 -e -ngl 33 -s 0
|
build\bin\main.exe -m models\llama-2-7b.Q4_0.gguf -p "Building a website can be done in 10 simple steps:\nStep 1:" -n 400 -e -ngl 33 -s 0
|
||||||
```
|
```
|
||||||
or run by script:
|
or run by script:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
:: MIT license
|
||||||
rem MIT license
|
:: Copyright (C) 2024 Intel Corporation
|
||||||
rem Copyright (C) 2024 Intel Corporation
|
:: SPDX-License-Identifier: MIT
|
||||||
rem SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
INPUT2="Building a website can be done in 10 simple steps:\nStep 1:"
|
INPUT2="Building a website can be done in 10 simple steps:\nStep 1:"
|
||||||
@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
|
@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
REM SPDX-FileCopyrightText: 2022 Intel Corporation
|
:: MIT license
|
||||||
REM
|
:: Copyright (C) 2024 Intel Corporation
|
||||||
REM SPDX-License-Identifier: MIT
|
:: SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
|
||||||
set URL=%1
|
set URL=%1
|
||||||
set COMPONENTS=%2
|
set COMPONENTS=%2
|
Loading…
Add table
Add a link
Reference in a new issue