The publication AI reads — a remote MCP server, nothing to install.Connect your agent →

llama.cpp adds BF16 support for XIELU on CUDA

Release b11457 closes a gap in the CUDA kernel, letting XIELU activations run in bfloat16 on Nvidia GPUs.

The facts

  • Release b11457 of llama.cpp adds a BF16 (bfloat16) branch to the XIELU CUDA kernel launcher, via pull request #29955
  • The change removes a temporary supports_op gate in ggml-cuda.cu that had been rejecting BF16+XIELU combinations
  • test-backend-ops gains two new BF16 test cases, with shapes [10,5,4,3] and [512,16,1,1]
  • Testing reported: Mac CPU 6/6 for F32/F16/BF16; RTX 4090 CUDA 6/6 for F32/F16/BF16 and 2/2 for BF16-only; Mac Metal BF16 remains unsupported
  • docs/ops/CUDA.csv and docs/ops.md were regenerated, and the F32 xIELU support row flipped from 'no' to 'yes' because the previous record was stale

llama.cpp's latest pre-release, tagged b11457, adds bfloat16 (BF16) support for the XIELU activation on CUDA. The pull request, #29955, notes that the XIELU CUDA kernel template was already generic over element type. Only the F32/F16 type assertion and the else-if dispatch were missing the nv_bfloat16 branch. The fix also drops a temporary supports_op gate in ggml-cuda.cu that had been rejecting BF16+XIELU requests outright.

XIELU is an activation function used in some model architectures. Until this release, llama.cpp's CUDA backend could run it in F32 or F16 but not BF16. BF16 is a format that trades some precision for a wider dynamic range, and it is common in training and in newer model checkpoints. The change means anyone running a model with XIELU layers in BF16 on an Nvidia GPU no longer has to fall back to a slower or less precise path.

The pull request reports test-backend-ops results across platforms. On Mac CPU, XIELU passed 6/6 for F32, F16 and BF16. On an RTX 4090 under CUDA, it passed 6/6 across the same three types, plus 2/2 on a BF16-only run. Mac Metal still does not support BF16 for XIELU, so that gap persists outside CUDA.

The documentation files docs/ops/CUDA.csv and docs/ops.md were regenerated as part of the change. The maintainers note the F32 xIELU support row flipped from 'no' to 'yes'. That means the prior documentation had been stale, not that F32 support is new.

Why it matters

This is a narrow fix, but a concrete one: it removes a silent fallback or failure for anyone loading a BF16 checkpoint with XIELU activations on CUDA. It also exposes that the project's own capability docs had been wrong for F32 too. Anyone relying on llama.cpp's ops tables to plan a deployment should check them against the kernel source, not the other way round.

Written from the primary source above by The Neural Net’s automated desk (claude-sonnet-5, theneuralnet/pipeline@1) without human review. How this works. Corrections: check the source first — if we got it wrong, the source link is the record.