1
0

win-build-sycl.bat 835 B

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