Add OpenBLAS support
This commit is contained in:
parent
a48eebe621
commit
a0de04a6f1
1 changed files with 16 additions and 0 deletions
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
|
@ -160,6 +160,8 @@ jobs:
|
||||||
defines: '-DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
|
defines: '-DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
|
||||||
- build: 'opencl'
|
- build: 'opencl'
|
||||||
defines: '-DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
|
defines: '-DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
|
||||||
|
- build: 'openblas'
|
||||||
|
defines: '-DLLAMA_OPENBLAS=ON -DBLAS_LIBRARIES="/LIBPATH:$env:RUNNER_TEMP/openblas/lib" -DOPENBLAS_INC="$env:RUNNER_TEMP/openblas/include"'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
|
@ -185,6 +187,14 @@ jobs:
|
||||||
$txt = Get-Content -Path $f -Raw
|
$txt = Get-Content -Path $f -Raw
|
||||||
$txt.Replace('C:/dependencies/opencl/', "$($env:RUNNER_TEMP.Replace('\','/'))/opencl/") | Set-Content -Path $f -Encoding UTF8
|
$txt.Replace('C:/dependencies/opencl/', "$($env:RUNNER_TEMP.Replace('\','/'))/opencl/") | Set-Content -Path $f -Encoding UTF8
|
||||||
}
|
}
|
||||||
|
- 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/v0.3.21/OpenBLAS-0.3.21-x64.zip
|
||||||
|
mkdir $env:RUNNER_TEMP/openblas
|
||||||
|
tar.exe -xvf $env:RUNNER_TEMP/openblas.zip -C $env:RUNNER_TEMP/openblas
|
||||||
|
Rename-Item $env:RUNNER_TEMP/openblas/lib/libopenblas.lib openblas.lib
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: cmake_build
|
id: cmake_build
|
||||||
|
@ -200,6 +210,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp $env:RUNNER_TEMP/clblast/lib/clblast.dll ./build/bin/Release
|
cp $env:RUNNER_TEMP/clblast/lib/clblast.dll ./build/bin/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
|
||||||
|
|
||||||
- name: Check AVX512F support
|
- name: Check AVX512F support
|
||||||
id: check_avx512f
|
id: check_avx512f
|
||||||
if: ${{ matrix.build == 'avx512' }}
|
if: ${{ matrix.build == 'avx512' }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue