1
2:: MIT license
3:: Copyright (C) 2024 Intel Corporation
4:: SPDX-License-Identifier: MIT
5
6
7IF not exist build (mkdir build)
8cd build
9if %errorlevel% neq 0 goto ERROR
10
11@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
12if %errorlevel% neq 0 goto ERROR
13
14:: for FP16
15:: faster for long-prompt inference
16:: cmake -G "MinGW Makefiles" .. -DLLAMA_OPENSSL=OFF -DGGML_SYCL=ON -DCMAKE_CXX_COMPILER=icx -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DGGML_SYCL_F16=ON
17
18:: for FP32
19cmake -G "Ninja" .. -DLLAMA_OPENSSL=OFF -DGGML_SYCL=ON -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=icx -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
20if %errorlevel% neq 0 goto ERROR
21
22:: build all binary
23cmake --build . -j
24if %errorlevel% neq 0 goto ERROR
25
26cd ..
27exit /B 0
28
29:ERROR
30echo comomand error: %errorlevel%
31exit /B %errorlevel%