char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
72be44f1d
char/aliceai-t5-moe
1 2:: MIT license 3:: Copyright (C) 2024 Intel Corporation 4:: SPDX-License-Identifier: MIT 5 6IF / I "%1" =="--help " ( 7echo Usage: win-build-sycl.bat [fp32^|fp16] [--help] 8echo. 9echo Options: 10echo fp32 Build with FP32 precision ^(default^) 11echo fp16 Build with FP16 precision ^(faster for long-prompt inference^) 12echo --help Print this help message 13exit /B 0 14) 15 16SET PRECISION=%1 17IF " %PRECISION% "==""SET PRECISION = fp32 18IF / I NOT "%PRECISION%" =="fp32 "IF / I NOT "%PRECISION%" =="fp16 " ( 19echo Error : invalid value '%PRECISION% '.Use 'fp32 'or 'fp16 '. 20echo Usage : win -build -sycl .bat [fp32 ^|fp16 ] [--help ] 21exit / B 1 22) 23 24IF not exist build (mkdir build ) 25cd build 26if %errorlevel% neq 0 goto ERROR 27 28@ call " C :\Program Files (x86 )\Intel \oneAPI \setvars .bat "intel64 --force 29if %errorlevel% neq 0 goto ERROR 30 31IF / I "%PRECISION%" =="fp16 " ( 32:: for FP16 33:: faster for long-prompt inference 34cmake -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 35)ELSE ( 36 :: forFP32 37cmake -G "Ninja " .. -DLLAMA_OPENSSL =OFF -DGGML_SYCL =ON -DCMAKE_C_COMPILER =cl -DCMAKE_CXX_COMPILER =icx -DBUILD_SHARED_LIBS =ON -DCMAKE_BUILD_TYPE =Release 38) 39if %errorlevel %neq 0 gotoERROR 40 41::build all binary 42cmake --build . -j 43if %errorlevel %neq 0 gotoERROR 44 45cd .. 46exit /B 0 47 48:ERROR 49echocomomand error : %errorlevel % 50exit /B %errorlevel %