LLamaSharp icon indicating copy to clipboard operation
LLamaSharp copied to clipboard

[Feature]: Cuda 13 support

Open aropb opened this issue 8 months ago • 8 comments

Background & Description

Building binary files for cuda 13.

API & Usage

No response

How to implement

No response

aropb avatar Mar 21 '26 22:03 aropb

@martindevans Is it possible to do this?

aropb avatar Apr 09 '26 15:04 aropb

If llama.cpp supports CUDA 13 then it can probably be added to the list here to produce the binaries. That would be the first step.

However, CUDA builds are very slow, so I'm hesitant to add a new one. What does CUDA 13 add over our current CUDA 12 binaries?

martindevans avatar Apr 10 '26 01:04 martindevans

This is the current version of CUDA, the 12th version is already archived.

https://developer.nvidia.com/cuda-downloads

You don't even have to make nuget packages, Llamasharp Binaries are enough.

The latest version is CUDA 12 -> 12.9 https://developer.nvidia.com/cuda-12-9-1-download-archive

aropb avatar Apr 10 '26 06:04 aropb

What does CUDA 13 add over our current CUDA 12 binaries?

CUDA 13 is a big improvement: https://www.linkedin.com/pulse/whats-new-cuda-13-why-matters-bojan-tunguz-ph-d--e4ele

Some apps I had improvements with CUDA 13 so It will be great to have CUDA 13 supported in LlamaSharp

manutiedra avatar Jul 04 '26 16:07 manutiedra

Is it planned to add a build for CUDA13? I think cuda11 can be removed.

aropb avatar Aug 29 '26 21:08 aropb

This would be a good issue for a new contributor to take on. The steps involved would be:

  1. All our builds are made with this GitHub action. First up remove CUDA11 from there and replace it with CUDA13.

  2. LL# works out with DLLs to load at runtime, replace CUDA11 with CUDA13 there. Start here.

  3. Create a nuspec file for CUDA13 (see CUDA12 nuspec), so that a nuget package gets published.

(these can be tackled as individual PRs, by different people if necessary)

martindevans avatar Sep 01 '26 01:09 martindevans

I'll take this.

compile.yml on master is already CUDA 12.4.0 only, so rather than swapping 12 out I added a CUDA 13.0.0 job next to it and wired the loader plus LLamaSharp.Backend.Cuda13 packages.

PR: https://github.com/SciSharp/LLamaSharp/pull/1439

The compile workflow still has to produce the cu13.0.0 binaries (Update Binaries) before those packages have anything to ship. Happy to split this if you'd rather land the loader first.

modelpath-dev avatar Sep 16 '26 13:09 modelpath-dev

Thank you very much, it works about 10 % faster than CUDA 12.

aropb avatar Oct 17 '26 15:10 aropb