From dd29522184f3f1949f74fd99c47ebe58875821ad Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:34:50 +0100 Subject: [PATCH 01/27] test windows build --- .github/workflows/build-commit.yml | 98 ++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 6feb93c..10f7846 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -135,3 +135,101 @@ jobs: with: token: ${{ secrets.PUBLISH_TOKEN }} files: ${{github.workspace}}/ggml/build/bin/turbopilot-${{ runner.os }}-${{ runner.arch }}.zip + + windows-latest-cmake: + runs-on: windows-latest + env: + OPENBLAS_VERSION: 0.3.23 + OPENCL_VERSION: 2023.04.17 + CLBLAST_VERSION: 1.6.0 + + strategy: + matrix: + include: + - build: 'avx2' + defines: '' + - build: 'avx' + defines: '-GGML_AVX2=OFF' + - build: 'avx512' + defines: '-GGML_AVX512=ON -DBUILD_SHARED_LIBS=ON' + - build: 'openblas' + defines: '-GGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' + + + steps: + - name: Clone + id: checkout + uses: actions/checkout@v3 + with: + submodules: true + + - name: Download OpenBLAS + id: get_openblas + if: ${{ matrix.build == 'openblas' }} + run: | + curl.exe -o $env:RUNNER_TEMP/openblas.zip -L "https://github.com/xianyi/OpenBLAS/releases/download/v${env:OPENBLAS_VERSION}/OpenBLAS-${env:OPENBLAS_VERSION}-x64.zip" + curl.exe -o $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt -L "https://github.com/xianyi/OpenBLAS/raw/v${env:OPENBLAS_VERSION}/LICENSE" + mkdir $env:RUNNER_TEMP/openblas + tar.exe -xvf $env:RUNNER_TEMP/openblas.zip -C $env:RUNNER_TEMP/openblas + $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath) + $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim())) + $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe') + & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll + + - name: Build + id: cmake_build + run: | + cd ${{github.workspace}}/ggml + mkdir build + cd build + cmake .. ${{ matrix.defines }} + cmake --build . --config Release + + - name: Add libopenblas.dll + id: add_libopenblas_dll + if: ${{ matrix.build == 'openblas' }} + run: | + cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll + cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt + + - name: Check AVX512F support + id: check_avx512f + if: ${{ matrix.build == 'avx512' }} + continue-on-error: true + run: | + cd build + $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath) + $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim())) + $cl = $(join-path $msvc 'bin\Hostx64\x64\cl.exe') + echo 'int main(void){unsigned int a[4];__cpuid(a,7);return !(a[1]&65536);}' >> avx512f.c + & $cl /O2 /GS- /kernel avx512f.c /link /nodefaultlib /entry:main + .\avx512f.exe && echo "AVX512F: YES" && ( echo HAS_AVX512F=1 >> $env:GITHUB_ENV ) || echo "AVX512F: NO" + + - uses: benjlevesque/short-sha@v2.2 + id: short-sha + with: + length: 6 + + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3.1.2 + with: + # Artifact name + name: turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ steps.short-sha.outputs.sha }}-${{ matrix.build }} # optional, default is artifact + # A file, directory or wildcard pattern that describes what to upload + path: ${{github.workspace}}/ggml/build/bin/codegen* + # The desired behavior if no files are found using the provided path. + + - name: package artifacts for release + if: startsWith(github.ref, 'refs/tags/') + + run: | + cd ${{github.workspace}}/ggml/build/bin + 7z a turbopilot-${{ runner.os }}-${{ runner.arch }}.zip ./codegen* + + - name: Upload binaries to release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + token: ${{ secrets.PUBLISH_TOKEN }} + files: ${{github.workspace}}/ggml/build/bin/turbopilot-${{ runner.os }}-${{ runner.arch }}.zip \ No newline at end of file From ecfd61d213893a95390660a99f479920f4005aa7 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:36:23 +0100 Subject: [PATCH 02/27] correct matrix defines --- .github/workflows/build-commit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 10f7846..9d0eb3f 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -149,11 +149,11 @@ jobs: - build: 'avx2' defines: '' - build: 'avx' - defines: '-GGML_AVX2=OFF' + defines: '-DGGML_AVX2=OFF' - build: 'avx512' - defines: '-GGML_AVX512=ON -DBUILD_SHARED_LIBS=ON' + defines: '-DGGML_AVX512=ON -DBUILD_SHARED_LIBS=ON' - build: 'openblas' - defines: '-GGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' + defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' steps: From 32ec80c628cc1e7182716552342caaff27d51394 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:40:38 +0100 Subject: [PATCH 03/27] add step to install boot lib --- .github/workflows/build-commit.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 9d0eb3f..f310218 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -163,6 +163,24 @@ jobs: with: submodules: true + - name: Install boost + uses: MarkusJx/install-boost@v2.4.1 + id: install-boost + with: + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json + boost_version: 1.73.0 + # OPTIONAL: Specify a custon install location + boost_install_dir: C:\boost + # OPTIONAL: Specify a platform version + platform_version: 2019 + # OPTIONAL: Specify a toolset + toolset: msvc + + # NOTE: If a boost version matching all requirements cannot be found, + # this build step will fail + - name: Download OpenBLAS id: get_openblas if: ${{ matrix.build == 'openblas' }} @@ -178,6 +196,8 @@ jobs: - name: Build id: cmake_build + env: + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} run: | cd ${{github.workspace}}/ggml mkdir build From d1469d1dbb22d60f3d6b713a2446be6b0241c2b3 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:41:50 +0100 Subject: [PATCH 04/27] use a more recent boost lib --- .github/workflows/build-commit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index f310218..45be8ff 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -170,11 +170,11 @@ jobs: # REQUIRED: Specify the required boost version # A list of supported versions can be found here: # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.73.0 + boost_version: 1.78.0 # OPTIONAL: Specify a custon install location boost_install_dir: C:\boost # OPTIONAL: Specify a platform version - platform_version: 2019 + platform_version: 2022 # OPTIONAL: Specify a toolset toolset: msvc From a15f08d36680095fa9e77b19db0cdb8bcea4638d Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:53:34 +0100 Subject: [PATCH 05/27] be more specific about what to build on windows --- .github/workflows/build-commit.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 45be8ff..ac3df52 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -74,16 +74,18 @@ jobs: # You can convert this to a matrix build if you need cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ubuntu-latest + strategy: + matrix: + include: + - build: 'avx2' + defines: '' + - build: 'avx' + defines: '-DGGML_AVX2=OFF' + - build: 'avx512' + defines: '-DGGML_AVX512=ON -DBUILD_SHARED_LIBS=ON' + - build: 'openblas' + defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' - # strategy: - # matrix: - # include: - # - build: 'avx2' - # defines: '' - # - build: 'avx' - # defines: '-DLLAMA_AVX2=OFF' - # - build: 'avx512' - # defines: '-DLLAMA_AVX512=ON' steps: @@ -94,12 +96,16 @@ jobs: - name: Install Dependencies run: sudo apt-get update && sudo apt-get install -yq libboost-dev + - name: Install OpenBlas + if: ${{ matrix.build == 'openblas' }} + run: sudo apt-get install libopenblas-dev + - name: Build # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: | cd ${{github.workspace}}/ggml - cmake -B ${{github.workspace}}/ggml/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D CMAKE_EXE_LINKER_FLAGS="-static" + cmake -B ${{github.workspace}}/ggml/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D CMAKE_EXE_LINKER_FLAGS="-static" ${{ matrix.defines }} cd ${{github.workspace}}/ggml/build make codegen codegen-serve codegen-quantize chmod +x ${{github.workspace}}/ggml/build/bin/codegen @@ -203,7 +209,9 @@ jobs: mkdir build cd build cmake .. ${{ matrix.defines }} - cmake --build . --config Release + cmake --build . --config Release -t codegen + cmake --build . --config Release -t codegen-serve + cmake --build . --config Release -t codegen-quantize - name: Add libopenblas.dll id: add_libopenblas_dll From 1d5c0658611fb3461808c91ead75e8f42852a31e Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:55:10 +0100 Subject: [PATCH 06/27] be a bit more selective about ubuntu build stuff too --- .github/workflows/build-commit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index ac3df52..9381f22 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -123,7 +123,7 @@ jobs: uses: actions/upload-artifact@v3.1.2 with: # Artifact name - name: turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ steps.short-sha.outputs.sha }} # optional, default is artifact + name: turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ steps.short-sha.outputs.sha }} # optional, default is artifact # A file, directory or wildcard pattern that describes what to upload path: ${{github.workspace}}/ggml/build/bin/codegen* # The desired behavior if no files are found using the provided path. @@ -133,14 +133,14 @@ jobs: run: | cd ${{github.workspace}}/ggml/build/bin - zip turbopilot-${{ runner.os }}-${{ runner.arch }}.zip ./codegen* + zip turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}.zip ./codegen* - name: Upload binaries to release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: token: ${{ secrets.PUBLISH_TOKEN }} - files: ${{github.workspace}}/ggml/build/bin/turbopilot-${{ runner.os }}-${{ runner.arch }}.zip + files: ${{github.workspace}}/ggml/build/bin/turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}.zip windows-latest-cmake: runs-on: windows-latest From d936cdd28ad8fd2059c715b92bc6c04d28eb6335 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:57:11 +0100 Subject: [PATCH 07/27] attempt to fix --- .github/workflows/build-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 9381f22..d98a970 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -82,7 +82,7 @@ jobs: - build: 'avx' defines: '-DGGML_AVX2=OFF' - build: 'avx512' - defines: '-DGGML_AVX512=ON -DBUILD_SHARED_LIBS=ON' + defines: '-DGGML_AVX512=ON' - build: 'openblas' defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' From ca86e017c9d489f6476c68580ab063e1cd88cb26 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 15:58:44 +0100 Subject: [PATCH 08/27] remove windows paths for ubuntu matrix build --- .github/workflows/build-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index d98a970..3ca62cb 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -84,7 +84,7 @@ jobs: - build: 'avx512' defines: '-DGGML_AVX512=ON' - build: 'openblas' - defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' + defines: '-DGGML_OPENBLAS=ON' From e81221ffaf3b3c099fa4bdd6338549280c2ea486 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 16:13:00 +0100 Subject: [PATCH 09/27] turn off dynamic lib ggml in windows avx512 --- .github/workflows/build-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 3ca62cb..67d8c3d 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -157,7 +157,7 @@ jobs: - build: 'avx' defines: '-DGGML_AVX2=OFF' - build: 'avx512' - defines: '-DGGML_AVX512=ON -DBUILD_SHARED_LIBS=ON' + defines: '-DGGML_AVX512=ON' - build: 'openblas' defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' From f6256d67b359a0ec69220e52cba48e47d328fed9 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 16:15:02 +0100 Subject: [PATCH 10/27] replace linker flag option with proper GGML_STATIC --- .github/workflows/build-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 67d8c3d..0e0a298 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -105,7 +105,7 @@ jobs: # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: | cd ${{github.workspace}}/ggml - cmake -B ${{github.workspace}}/ggml/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D CMAKE_EXE_LINKER_FLAGS="-static" ${{ matrix.defines }} + cmake -B ${{github.workspace}}/ggml/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D GGML_STATIC=On ${{ matrix.defines }} cd ${{github.workspace}}/ggml/build make codegen codegen-serve codegen-quantize chmod +x ${{github.workspace}}/ggml/build/bin/codegen From da44c705d43b645b1e0354257197cd73236123d0 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 16:48:09 +0100 Subject: [PATCH 11/27] update ggml - build stuff --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index d3b152b..4b01526 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit d3b152bf2deeebfe83c56701e9719502e2b331b2 +Subproject commit 4b01526aa55ac080310a555ebb2422680683b787 From e7e77bbc5251a2c82c846b21dad2702113400fb6 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 17:29:51 +0100 Subject: [PATCH 12/27] add blas include dirs option which is empty by default --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 4b01526..9d98c51 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 4b01526aa55ac080310a555ebb2422680683b787 +Subproject commit 9d98c51aae9029d7246ea28dfd39b4ba918ae038 From d33e1dc7b6c8273655e19bb6288ec78af63ea7b7 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 17:30:43 +0100 Subject: [PATCH 13/27] remove superfluous env var --- .github/workflows/build-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 0e0a298..acb362b 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -199,7 +199,7 @@ jobs: $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim())) $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe') & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll - + - name: Build id: cmake_build env: From b92c37adc9d84cf5c81cd321766de93629acc79e Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 17:55:48 +0100 Subject: [PATCH 14/27] try using libopenblas instead --- .github/workflows/build-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index acb362b..2d86070 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -159,7 +159,7 @@ jobs: - build: 'avx512' defines: '-DGGML_AVX512=ON' - build: 'openblas' - defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' + defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/libopenblas.lib"' steps: From 07ddd8ec6575b98fe041dfb6b4ee455b9143b104 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 17:58:45 +0100 Subject: [PATCH 15/27] fix link to openblas --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 9d98c51..7b567de 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 9d98c51aae9029d7246ea28dfd39b4ba918ae038 +Subproject commit 7b567de59817a7b5b92345cf7cceaed15a4e8d0f From 6723f6131182d924ad90e367eb257b87e92d12b2 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 18:11:51 +0100 Subject: [PATCH 16/27] try to fix blas link options --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 7b567de..edc15ea 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 7b567de59817a7b5b92345cf7cceaed15a4e8d0f +Subproject commit edc15ea4f4444fb18bd98d41a33e8f37524c3f3b From e22d5610654e3940baadd325b1557fa19e456124 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 18:13:14 +0100 Subject: [PATCH 17/27] fix windows blas build - don't copy dll --- .github/workflows/build-commit.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 2d86070..60ee25c 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -159,7 +159,7 @@ jobs: - build: 'avx512' defines: '-DGGML_AVX512=ON' - build: 'openblas' - defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/libopenblas.lib"' + defines: '-DGGML_OPENBLAS=ON -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' steps: @@ -199,7 +199,6 @@ jobs: $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim())) $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe') & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll - - name: Build id: cmake_build env: @@ -213,12 +212,12 @@ jobs: cmake --build . --config Release -t codegen-serve cmake --build . --config Release -t codegen-quantize - - name: Add libopenblas.dll - id: add_libopenblas_dll - if: ${{ matrix.build == 'openblas' }} - run: | - cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll - cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt + # - name: Add libopenblas.dll + # id: add_libopenblas_dll + # if: ${{ matrix.build == 'openblas' }} + # run: | + # cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll + # cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt - name: Check AVX512F support id: check_avx512f From f999601224a7d7c6ae7220748d9bb45371af5973 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Sun, 28 May 2023 20:14:07 +0100 Subject: [PATCH 18/27] hopefully fix blas linking --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index edc15ea..4f28094 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit edc15ea4f4444fb18bd98d41a33e8f37524c3f3b +Subproject commit 4f28094a9c53920b2a6353fb6f3fd66fe113d430 From b9c40508f39c0142b09a4ac71849ae036d9864f7 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 07:46:38 +0100 Subject: [PATCH 19/27] fix includes for blas on windows --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 4f28094..73b6db9 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 4f28094a9c53920b2a6353fb6f3fd66fe113d430 +Subproject commit 73b6db9e14ac594218cf6d9a1a09dc92b9b78c04 From b2036f34a5c7b8b2478e777e9bd24e81db88262e Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 08:21:28 +0100 Subject: [PATCH 20/27] attempt to fix the paths in the windows build --- .github/workflows/build-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 60ee25c..b6e33a7 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -244,7 +244,7 @@ jobs: # Artifact name name: turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ steps.short-sha.outputs.sha }}-${{ matrix.build }} # optional, default is artifact # A file, directory or wildcard pattern that describes what to upload - path: ${{github.workspace}}/ggml/build/bin/codegen* + path: ${{github.workspace}}\\ggml\\build\\bin\\Release\\codegen* # The desired behavior if no files are found using the provided path. - name: package artifacts for release From 431addfe42a4c0c19498d4f2948ef479cf0f8ad7 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 10:18:21 +0100 Subject: [PATCH 21/27] fix cmake target --- .github/workflows/build-commit.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index b6e33a7..ae6ba28 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -208,9 +208,7 @@ jobs: mkdir build cd build cmake .. ${{ matrix.defines }} - cmake --build . --config Release -t codegen - cmake --build . --config Release -t codegen-serve - cmake --build . --config Release -t codegen-quantize + cmake --build . --config Release --target codegen codegen-serve codegen-quantize # - name: Add libopenblas.dll # id: add_libopenblas_dll From 3b9613d87d036ccd04ae962afee67b426e0507d6 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 10:37:53 +0100 Subject: [PATCH 22/27] update cxx standard --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 73b6db9..f7eead0 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 73b6db9e14ac594218cf6d9a1a09dc92b9b78c04 +Subproject commit f7eead06ac3f278cd691993643c3aff50fa0f938 From 94e3b905f6802e34cbf76da1d2a1e65605bcf697 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 10:55:29 +0100 Subject: [PATCH 23/27] add posix compatible file descriptors --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index f7eead0..38cb4f3 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit f7eead06ac3f278cd691993643c3aff50fa0f938 +Subproject commit 38cb4f3de2e46280ba86ce854f38dab7d2299a97 From 346eec482b7ff2725f0a91b5f8cbb3f535ee28a0 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 11:18:42 +0100 Subject: [PATCH 24/27] add alias for isatty --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 38cb4f3..99f187e 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 38cb4f3de2e46280ba86ce854f38dab7d2299a97 +Subproject commit 99f187ee209e9e94cec425f0231a4734fafb0601 From fdf6b64aefdaef5afbba5a59b92d8eb4fc2c5dad Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 11:45:32 +0100 Subject: [PATCH 25/27] don't overwrite existing isatty alias --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 99f187e..a0f9f0e 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 99f187ee209e9e94cec425f0231a4734fafb0601 +Subproject commit a0f9f0e576c959f056974a2dff199edfad063191 From cacaa56182995c982d7008796696bfef005efae2 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 29 May 2023 15:01:02 +0100 Subject: [PATCH 26/27] replace POST->Post MSVC is fussy --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index a0f9f0e..1848e6c 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit a0f9f0e576c959f056974a2dff199edfad063191 +Subproject commit 1848e6cb311b1e535c604d5451972243ac10c728 From b7074ada277014b45ac6588c1d8a32b5ed3485c7 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 12 Jun 2023 20:21:51 +0100 Subject: [PATCH 27/27] Update ggml dep to avoid crash --- ggml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml b/ggml index 1848e6c..6c4fe0e 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 1848e6cb311b1e535c604d5451972243ac10c728 +Subproject commit 6c4fe0ef5e50b76dd2539130c109e12179da0bd2