Skip to content

Commit 0592164

Browse files
authored
Merge pull request #489 from jasoncouture/clblast_nuget
Create nuspec for OpenCL
2 parents d468df0 + 1f45bae commit 0592164

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

.github/prepare_release.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ dotnet pack ./LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release -o ./
7171

7272
# pack the backends
7373
cd temp
74-
nuget pack LLamaSharp.Backend.Cpu.nuspec -version $updated_version
75-
nuget pack LLamaSharp.Backend.Cuda11.nuspec -version $updated_version
76-
nuget pack LLamaSharp.Backend.Cuda12.nuspec -version $updated_version
77-
74+
for nuspec in *.nuspec
75+
do
76+
echo "Packing $nuspec"
77+
nuget pack $nuspec -version $updated_version
78+
done
7879

7980
cd ..
8081
exit 0

.github/workflows/compile.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ jobs:
141141
cmake .. ${{ env.COMMON_DEFINE }} -DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"
142142
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
143143
copy $env:RUNNER_TEMP/clblast/lib/clblast.dll .\bin\Release\clblast.dll
144+
echo "78a8c98bcb2efe1a63318d901ab204d9ba96c3b29707b4ce0c4240bdcdc698d6 ./bin/Release/clblast.dll" >> tmp
145+
sha256sum -c tmp || exit 255
146+
rm tmp
144147
ls -R
145148
- name: Build
146149
if: ${{ matrix.os == 'ubuntu-22.04' }}
@@ -149,7 +152,8 @@ jobs:
149152
cd build
150153
cmake .. ${{ env.COMMON_DEFINE }} -DLLAMA_CLBLAST=ON
151154
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
152-
cp $(ldconfig -p | grep libclblast.so | tail -n 1 | cut -d ' ' -f 4) ./
155+
# if we ever want to pull libclblast.so back into the packages, just uncomment this line, and the one below for the upload
156+
# cp $(ldconfig -p | grep libclblast.so | tail -n 1 | cut -d ' ' -f 4) ./
153157
ls -R
154158
- name: Upload artifacts (Windows)
155159
if: ${{ matrix.os == 'windows-latest' }}
@@ -165,7 +169,7 @@ jobs:
165169
with:
166170
path: |
167171
./build/libllama.so
168-
./build/libclblast.so
172+
# ./build/libclblast.so
169173
name: llama-bin-linux-clblast-x64.so
170174

171175
compile-cublas:
@@ -305,7 +309,7 @@ jobs:
305309
cp artifacts/llama-bin-linux-cublas-cu12.1.0-x64.so/libllama.so deps/cu12.1.0/libllama.so
306310
307311
cp artifacts/llama-bin-win-clblast-x64.dll/{llama,clblast}.dll deps/clblast/
308-
cp artifacts/llama-bin-linux-clblast-x64.so/lib{llama,clblast}.so deps/clblast/
312+
cp artifacts/llama-bin-linux-clblast-x64.so/libllama.so deps/clblast/
309313
310314
- name: Upload artifacts
311315
uses: actions/upload-artifact@v4
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package >
3+
<metadata>
4+
<id>LLamaSharp.Backend.OpenCL</id>
5+
<version>$version$</version>
6+
<title>LLamaSharp.Backend.OpenCL - OpenCL Backend for LLamaSharp</title>
7+
<authors>llama.cpp Authors</authors>
8+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
9+
<license type="expression">MIT</license>
10+
<icon>icon512.png</icon>
11+
<projectUrl>https://github.com/SciSharp/LLamaSharp</projectUrl>
12+
<description>LLamaSharp.Backend.OpenCL is a backend for LLamaSharp to use with OpenCL.</description>
13+
<releaseNotes></releaseNotes>
14+
<copyright>Copyright 2023 The llama.cpp Authors. All rights reserved.</copyright>
15+
<tags>LLamaSharp LLama LLM GPT AI ChatBot SciSharp</tags>
16+
</metadata>
17+
18+
<files>
19+
<file src="LLamaSharpBackend.props" target="build/netstandard2.0/LLamaSharp.Backend.OpenCL.props" />
20+
21+
<file src="runtimes/deps/clblast/llama.dll" target="runtimes\win-x64\native\clblast\llama.dll" />
22+
<file src="runtimes/deps/clblast/clblast.dll" target="runtimes\win-x64\native\clblast\clblast.dll" />
23+
<file src="runtimes/deps/clblast/libllama.so" target="runtimes\linux-x64\native\clblast\libllama.so" />
24+
25+
<file src="icon512.png" target="icon512.png" />
26+
</files>
27+
</package>

0 commit comments

Comments
 (0)