01-server: ollama native CUDA 12.9 backend (sm_50) — carry-over of #23 into main #24

Merged
litelotus merged 1 commit from feat/ollama-cuda12 into main 2026-09-14 12:52:41 +00:00
Owner

The CUDA swap (commit e750cc2) was merged into its base branch feat/ollama-vulkan-fixes via PR #23, but that base branch had already been merged into main (PR #22) before #23 landed — so main never received the change. Running generation on 01 is still pkgs.ollama-vulkan (journalctl shows OLLAMA_VULKAN:true).

This PR carries the same single-file change into main: package = pkgs.ollama.override { acceleration = "cuda"; cudaPackages = pkgs.cudaPackages_12; cudaArches = [ "sm_50" "sm_52" ]; }.

After merge: pull ~/.nix on the build machine and nixos-rebuild switch 01, then verify with journalctl -u ollama -n 30 | grep -iE "cuda|vulkan" — expect the cuda_v12 runner and no OLLAMA_VULKAN env.

The CUDA swap (commit e750cc2) was merged into its base branch `feat/ollama-vulkan-fixes` via PR #23, but that base branch had **already** been merged into main (PR #22) *before* #23 landed — so main never received the change. Running generation on 01 is still `pkgs.ollama-vulkan` (journalctl shows `OLLAMA_VULKAN:true`). This PR carries the same single-file change into main: `package = pkgs.ollama.override { acceleration = "cuda"; cudaPackages = pkgs.cudaPackages_12; cudaArches = [ "sm_50" "sm_52" ]; }`. After merge: pull `~/.nix` on the build machine and `nixos-rebuild switch` 01, then verify with `journalctl -u ollama -n 30 | grep -iE "cuda|vulkan"` — expect the cuda_v12 runner and no `OLLAMA_VULKAN` env.
01-server: ollama native CUDA 12.9 backend (sm_50) instead of Vulkan
Some checks failed
ci/crow/push/check Pipeline failed
e750cc2dc3
Build current ollama 0.32.3 with the CUDA 12 backend targeting Maxwell:

- acceleration=cuda, cudaPackages=cudaPackages_12 (12.9.79 — last 12.x line
  that still compiles sm_50; CUDA 13 dropped Maxwell entirely)
- cudaArches=[sm_50 sm_52] — nixpkgs' 12.x realArches default starts at
  sm_75, so the M10s would get no kernels without explicit arches
- llama.cpp b9509 (ollama 0.32.x pin) still ships '50 == Maxwell' in its
  default CUDA arch list; all feature gates are __CUDA_ARCH__ >= X guards
  that degrade gracefully on sm_50 — no version pin needed

Stacks on feat/ollama-vulkan-fixes (MDWE sandbox fix stays; harmless for
CUDA and preserves the one-line fallback to pkgs.ollama-vulkan).

Expectation: native quantized GEMM kernels + no shader-JIT dependency vs
the Vulkan backend; A/B benchmark on qwen3:8b.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
litelotus/.nix!24
No description provided.