Skip to content

Create nuspec for OpenCL #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/prepare_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ dotnet pack ./LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release -o ./

# pack the backends
cd temp
nuget pack LLamaSharp.Backend.Cpu.nuspec -version $updated_version
nuget pack LLamaSharp.Backend.Cuda11.nuspec -version $updated_version
nuget pack LLamaSharp.Backend.Cuda12.nuspec -version $updated_version

for nuspec in *.nuspec
do
echo "Packing $nuspec"
nuget pack $nuspec -version $updated_version
done

cd ..
exit 0
10 changes: 7 additions & 3 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ jobs:
cmake .. ${{ env.COMMON_DEFINE }} -DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
copy $env:RUNNER_TEMP/clblast/lib/clblast.dll .\bin\Release\clblast.dll
echo "78a8c98bcb2efe1a63318d901ab204d9ba96c3b29707b4ce0c4240bdcdc698d6 ./bin/Release/clblast.dll" >> tmp
sha256sum -c tmp || exit 255
rm tmp
ls -R
- name: Build
if: ${{ matrix.os == 'ubuntu-22.04' }}
Expand All @@ -149,7 +152,8 @@ jobs:
cd build
cmake .. ${{ env.COMMON_DEFINE }} -DLLAMA_CLBLAST=ON
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
cp $(ldconfig -p | grep libclblast.so | tail -n 1 | cut -d ' ' -f 4) ./
# if we ever want to pull libclblast.so back into the packages, just uncomment this line, and the one below for the upload
# cp $(ldconfig -p | grep libclblast.so | tail -n 1 | cut -d ' ' -f 4) ./
ls -R
- name: Upload artifacts (Windows)
if: ${{ matrix.os == 'windows-latest' }}
Expand All @@ -165,7 +169,7 @@ jobs:
with:
path: |
./build/libllama.so
./build/libclblast.so
# ./build/libclblast.so
name: llama-bin-linux-clblast-x64.so

compile-cublas:
Expand Down Expand Up @@ -305,7 +309,7 @@ jobs:
cp artifacts/llama-bin-linux-cublas-cu12.1.0-x64.so/libllama.so deps/cu12.1.0/libllama.so

cp artifacts/llama-bin-win-clblast-x64.dll/{llama,clblast}.dll deps/clblast/
cp artifacts/llama-bin-linux-clblast-x64.so/lib{llama,clblast}.so deps/clblast/
cp artifacts/llama-bin-linux-clblast-x64.so/libllama.so deps/clblast/

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
27 changes: 27 additions & 0 deletions LLama/runtimes/build/LLamaSharp.Backend.OpenCL.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>LLamaSharp.Backend.OpenCL</id>
<version>$version$</version>
<title>LLamaSharp.Backend.OpenCL - OpenCL Backend for LLamaSharp</title>
<authors>llama.cpp Authors</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<icon>icon512.png</icon>
<projectUrl>https://github.com/SciSharp/LLamaSharp</projectUrl>
<description>LLamaSharp.Backend.OpenCL is a backend for LLamaSharp to use with OpenCL.</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2023 The llama.cpp Authors. All rights reserved.</copyright>
<tags>LLamaSharp LLama LLM GPT AI ChatBot SciSharp</tags>
</metadata>

<files>
<file src="LLamaSharpBackend.props" target="build/netstandard2.0/LLamaSharp.Backend.OpenCL.props" />

<file src="runtimes/deps/clblast/llama.dll" target="runtimes\win-x64\native\clblast\llama.dll" />
<file src="runtimes/deps/clblast/clblast.dll" target="runtimes\win-x64\native\clblast\clblast.dll" />
<file src="runtimes/deps/clblast/libllama.so" target="runtimes\linux-x64\native\clblast\libllama.so" />

<file src="icon512.png" target="icon512.png" />
</files>
</package>