-
Notifications
You must be signed in to change notification settings - Fork 343
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
Enable OpenCL/ROCm #464
Comments
Definitely a good idea, are you willing to work on the modifications to the Github actions pipeline to compile the necessary binaries? That's the first step to getting this supported. |
I have already started working on it! 😄 |
I was trying to deploy llm unity to android , thought about : |
Now that the CLBLAST binaries are included in the project (or at least, will be once #479 is merged) the next step is to create a nuspec file and make sure it's covered by the deployment automation script. Are you up for working on that @jasoncouture? |
According to this comment clblast.dll may need to be included in the distributed package. |
Indeed. I'm having some trouble getting it working, which is why no pr yet.
Alright. |
Please consider LLamaSharp.Backend.Vulkan I tried using the llama.cpp prebuilt vulkan dlls
But "using var model = LLamaWeights.LoadFromFile(parameters);"
|
Is this what I would need to do to get the OpenCL (from clblast runtime folder) working? I am having a hard time building from source, so I installed the 0.9.1 NuGet package and copied those binaries. But I now get a similar error to what you were having before:
Thanks for any advice, and glad to see you have Vulkan working. |
@soyfrien @moozoo64 In general there is zero compatibility between llama.cpp versions - i.e. you can't just swap in a new binary an expect it to work. You'll probably have better luck if you consult this table and use llama.cpp versions from that exact commit hash. If either of you are interested in making the changes necessary to create a backend.Vulkan package that'd be a great addition! |
@martindevans With the latest nuget LlamaSharp (0.9.1) you need llama.cpp 9fb13f9
yeah thinking about that. I don't know that much about making nuget packages and testing them locally. I'm guessing LlamaSharp is actually binding against one of the llama.dll's (noavx?) and since the rest have the same entry points, they just work. |
If 0.9.1 is too old you might be able to use 0.10.0, that's not released to nuget yet but it's what's currently on the master branch. That's only 2 weeks old.
The nuget packages are the easy bit! There are a few stages before that:
Even if you don't want to go all the way through this process, just doing a couple of the steps as PRs brings us closer to eventual vulkan support :) |
Thank you for detailing how to do that, though I still don't get how the backends are created. I just want to leave an update for anyone else using OpenCL: when using the current source instead of NuGet, you no longer need to rename |
Thats mostly just copy and paste from around line 410 of
Just need download and expand all the latest release versions of llama.cpp and compare .dll's I don't think ggml_shared.dll and llava_shared.dll are needed but "Dependency Walker" would check that.
ok, now I know how it's finding the dlls :)
Take a copy of the OpenCL one, replace the word "OpenCL" with "Vulkan" everywhere. and update the files section. |
llamacpp supports AMD GPUs with ROCm and OpenCL via clblas.
We should create an additional NuGet package for this, and update the native loader to support them.
The text was updated successfully, but these errors were encountered: