b9937

ggml-org/llama.cppb9937Jul 9, 2026by github-actions[bot]same day as b9936

What changed since b9936

low risk

CUDA snake fusion matcher now matches CPU/Metal type and contiguity rules, fixing missed fusions and unsafe reads.

Improvements

  • CUDA snake fusion now fuses F16/BF16 activation chains that previously fell back to the naive path, matching CPU and Metal behavior.
  • Added a non-contiguous operand guard to the CUDA snake fusion matcher, mirroring the contiguity checks already in CPU, Vulkan, and Metal.

Bug fixes

  • Corrected the CUDA snake fusion type predicate so a and inv_b are treated as F32, preventing a hypothetical all-F16 chain from reinterpreting F16 bits as float.
  • Rejected snake fusion on non-contiguous views in CUDA, which could otherwise silently read incorrect data.

Upgrade notes

This is a CUDA-backend-only correctness fix with no config or API changes; a straight rebuild/redeploy is sufficient. Users on non-CUDA backends see no behavioral difference from b9936.

Analyzed Oct 24, 2026

Upgrading?

Release notes summary

CUDA backend fix aligning snake fusion matcher logic with other backends.

Key Highlights

  • Aligned snake fusion matcher type predicate with CPU and Metal backends (a and inv_b are F32)
  • Added guard to reject snake fusion on non-contiguous operands

Release Notes (excerpt)

<details open> cuda: align snake fusion matcher with the other backends (#25460) * cuda: fix snake fusion type predicate, a and inv_b are F32 The matcher required a->type == x->type while launch_snake reads both as const float *, matching the CPU and Metal contract where a and inv_b stay F32. F16/BF16 chains never fused and fell back to the naive path, and a hypothetical all F16 chain would have read F16 bits as float. Aligns the predicate and the comment with ggml-cpu.c…

Published by ggml-org on GitHub.

Read the full release notes

Related Repositories