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-05-24 04:06:56 +02:00
|
|
|
:: cmake -G "MinGW Makefiles" .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_SYCL_F16=ON
|
2024-01-31 03:38:07 +01:00
|
|
|
|
|
|
|
:: for FP32
|
2024-05-24 04:06:56 +02:00
|
|
|
cmake -G "MinGW Makefiles" .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -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
|
|
|
|
make -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%
|
|
|
|
|