2024-01-31 03:38:07 +01:00
|
|
|
|
|
|
|
:: MIT license
|
|
|
|
:: Copyright (C) 2024 Intel Corporation
|
|
|
|
:: SPDX-License-Identifier: MIT
|
|
|
|
|
2024-03-25 08:52:41 +01:00
|
|
|
|
|
|
|
IF not exist build (mkdir build)
|
2024-01-31 03:38:07 +01:00
|
|
|
cd build
|
2024-03-25 08:52:41 +01:00
|
|
|
if %errorlevel% neq 0 goto ERROR
|
|
|
|
|
2024-01-31 03:38:07 +01:00
|
|
|
@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
|
2024-03-25 08:52:41 +01:00
|
|
|
if %errorlevel% neq 0 goto ERROR
|
2024-01-31 03:38:07 +01:00
|
|
|
|
|
|
|
:: for FP16
|
|
|
|
:: faster for long-prompt inference
|
2024-06-26 17:33:02 +02:00
|
|
|
:: cmake -G "MinGW Makefiles" .. -DGGML_SYCL=ON -DCMAKE_CXX_COMPILER=icx -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DGGML_SYCL_F16=ON
|
2024-01-31 03:38:07 +01:00
|
|
|
|
|
|
|
:: for FP32
|
2024-06-26 17:33:02 +02:00
|
|
|
cmake -G "Ninja" .. -DGGML_SYCL=ON -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=icx -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
|
2024-03-25 08:52:41 +01:00
|
|
|
if %errorlevel% neq 0 goto ERROR
|
2024-01-31 03:38:07 +01:00
|
|
|
:: build example/main only
|
|
|
|
:: make main
|
|
|
|
|
|
|
|
:: build all binary
|
2024-06-20 15:19:05 +02:00
|
|
|
cmake --build . -j
|
2024-03-25 08:52:41 +01:00
|
|
|
if %errorlevel% neq 0 goto ERROR
|
|
|
|
|
2024-01-31 03:38:07 +01:00
|
|
|
cd ..
|
2024-03-25 08:52:41 +01:00
|
|
|
exit /B 0
|
|
|
|
|
|
|
|
:ERROR
|
|
|
|
echo comomand error: %errorlevel%
|
|
|
|
exit /B %errorlevel%
|
|
|
|
|