1
0

win-build-sycl.bat 846 B

12345678910111213141516171819202122232425262728293031323334
  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" .. -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" .. -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 example/main only
  16. :: make main
  17. :: build all binary
  18. cmake --build . -j
  19. if %errorlevel% neq 0 goto ERROR
  20. cd ..
  21. exit /B 0
  22. :ERROR
  23. echo comomand error: %errorlevel%
  24. exit /B %errorlevel%