diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0637b574764cb..ec747568aa3a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,14 +46,7 @@ jobs: - name: Build id: cmake_build - run: | - "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 - icx --version - mkdir build - cd build - cmake -G "MinGW Makefiles" .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=Release - make - + run: examples/sycl/win-build-sycl.bat # ubuntu-latest-gcc: # runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index cb0069bfb60de..b84459b92e86e 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,4 @@ examples/jeopardy/results.txt poetry.lock poetry.toml +nppBackup diff --git a/examples/sycl/win-build-sycl.bat b/examples/sycl/win-build-sycl.bat new file mode 100644 index 0000000000000..3f14ecf04e4de --- /dev/null +++ b/examples/sycl/win-build-sycl.bat @@ -0,0 +1,21 @@ + +rem MIT license +rem Copyright (C) 2024 Intel Corporation +rem SPDX-License-Identifier: MIT + +mkdir -p build +cd build +@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force + +rem for FP16 +rem cmake .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DLLAMA_SYCL_F16=ON # faster for long-prompt inference + +rem for FP32 +cmake .. -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=Release + +rem build example/main only +rem make main + +rem build all binary +make +cd .. \ No newline at end of file diff --git a/examples/sycl/win-run-llama2.bat b/examples/sycl/win-run-llama2.bat new file mode 100644 index 0000000000000..09a7b96797253 --- /dev/null +++ b/examples/sycl/win-run-llama2.bat @@ -0,0 +1,14 @@ + +rem MIT license +rem Copyright (C) 2024 Intel Corporation +rem SPDX-License-Identifier: MIT + +INPUT2="Building a website can be done in 10 simple steps:\nStep 1:" +@call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force + + +set GGML_SYCL_DEVICE=0 +rem set GGML_SYCL_DEBUG=1 +.\build\bin\main.exe -m models\llama-2-7b.Q4_0.gguf -p %INPUT2% -n 400 -e -ngl 33 -s 0 + +