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