Repository navigation
Overview
ggml v1.2.0 adds quantization-scale support for FP8 and NVFP4 through extended matrix-multiplication APIs, introduces internal ops, and cleans up the FlashAttention sinks/bias API. It adds the experimental HRX backend, lets the meta/TP backend place a tensor entirely on a single device, adds an RPC SUPPORTS_OP command with graph preprocessing, and adds a CONCAT backward pass plus a BF16 src1 path for matrix multiplications. Backend work includes a CUDA fusion refactor with new fused chains, Vulkan FP8/scaled matmul and FlashAttention KV-row support, Metal Neural Accelerator detection, SYCL GDN replay, WebGPU scaled matmul, Hexagon HMX W8A8 tuning, and an OpenVINO 2026.5 update.
API changes
- Add
ggml_needs_scale,ggml_mul_mat_extandggml_mul_mat_id_extfor FP8/NVFP4 scales (per-tensor/channel/expert) llama/28898 - Rename the mul_mat scale parameters after their operands llama/33431
- Add
ggml_flash_attn_ext_set_sinksandggml_flash_attn_ext_set_biasand deprecate the previous sink/bias setters llama/33178 - Add internal ops: custom nodes with a NULL callback carry an op id implemented by the backends llama/33000
- Add
ggml_backend_dev_graph_preprocessso devices can preprocess a graph before scheduling llama/32532 - Add
GGML_BACKEND_SPLIT_AXIS_NONEso the meta/TP backend can keep a tensor entirely on a single device llama/32983 - Reject NUL bytes in GGUF keys and tensor names and document the rule llama/33355 llama/33443
- Bump the RPC protocol to 11.0 llama/32532
Core changes
- Apply the FP8/NVFP4 quantization scales in the CPU mat-mul paths and the meta backend split logic llama/28898
- Add the CONCAT backward pass llama/32151
- Support a BF16 src1 in MUL_MAT and MUL_MAT_ID, and reject BF16 inputs in supports_op for ops without a BF16 kernel llama/32533 llama/33190
- Fix a view init being skipped after a buft max_size split llama/25584
- Add the internal saxpy op on the CPU backend llama/33000
Backend changes
CPU
- Add SVE GEMV kernels for Q6_K/Q8_K on ARM llama/29256
- Vectorize the SSM scan on RVV llama/32448
- Optimize the s390x vector intrinsics llama/32253
CUDA / HIP
- Move the fusion code out of
ggml-cuda.cuinto a dedicated unit llama/33087 - Fuse the short conv, depth mix, loop controller, L2 clip and situ chains, and vectorize depth_mix with float4 llama/33060 llama/33504 llama/33507
- Fuse the top-k MoE weight norm with an additive sum bias llama/32943
- Add few-row MMQ for NVFP4 llama/32610
- Read K/V through kv_rows in the vec FlashAttention kernel and speed up the f16 conversion llama/32520 llama/33427
- Add FlashAttention with indexed bias and a consistent ncols2 selection for mma FA llama/33063 llama/32626
- Use the MMA FA kernel for maskless attention on RDNA and add GCN sparse fattn llama/32930 llama/30370
- Add a flat 1D CONCAT kernel for small-ne0 non-contiguous cases and loop over ne2/ne3 llama/33389 llama/33006
- Use one thread per row for soft_max and sum_rows on short rows llama/33187
- Implement internal ops and cache the device type at init llama/33600 llama/33142
- Fix the ADD_ID launch for more than 65535 tokens, the k_get_rows grid-stride step and the NVFP4 y_scale over-read llama/33162 llama/33140 llama/33136
- Fix the dp4a MMQ hint for CUDA 13 and the Pascal DP4A nwarps selection llama/33064 llama/25479
- Fix the tile FA selection for DKQ 576 on ROCm and the
__restrict__usage in FA vec helpers with PDL llama/33045 llama/33384 - Fix non-contiguous src rejection in XIELU/LEAKY_RELU and use dst strides in the strided unary kernel llama/33383 llama/33322
- Add a DDP path for the sum reduction and few-row MMQ with WMMA for RDNA3.5 llama/32215 llama/32224
- Fix the bf16 MFMA operand vector type for CDNA and the CU_CHECK macro shadowing with VMM llama/33086 llama/33227
Metal
- Detect Neural Accelerators without hardcoding chip names llama/33272
- Keep the MUL_MAT weight scale off skipped MoE slots llama/33430
- Use one thread per row for soft_max and sum_rows on short rows llama/33189
- Keep the ADD chain fusion independent of batch size and check all fused nodes for concurrency llama/33217 llama/33175
- Avoid a second pipeline cache lookup llama/32977
- Remove the quantized FA kernels for head sizes that are not multiples of 32 llama/33534
- Use Taylor series for ELU, EXPM1 and XIELU llama/33226
Vulkan
- Add FP8 and scaled matmul support llama/29791
- Add KV-row support to FlashAttention and fold verify tokens and GQA heads into one row tile llama/33172 llama/30190
- Enable split-K for GQA batches above the tile row count and add FA compact bias support llama/32097 llama/32898
- Optimize SSM_SCAN and add coopmat2 support llama/32916
- Further optimize coopmat2 GDN llama/32860
- Hoist the K-quant dequant in mul_mat_vecq llama/31022
- Use one thread per row for soft_max and sum_rows on short rows llama/33197
- Read the IQ1/IQ2/IQ3 grid tables from a storage buffer llama/32915
- Reduce the cm1 int8 MMQ gap between AMD shader compilers via accumulate folding llama/32528
- Improve CONV_2D/3D performance and handle empty conv3d kernels llama/32629 llama/33106
- Handle ADD_ID with more tokens than maxComputeWorkGroupCount and update topk_moe to handle bias llama/33232 llama/32957
- Use Taylor series for ELU llama/33226
- Fix large ROLL shifts and Windows driver RDNA1 misclassification llama/32876 llama/33123
SYCL
- Add GDN replay support llama/32944
- Extend the K-type validation to V-types for flash attention llama/32703
- Fix batched f16 mul_mat with broadcast batches and strided src1 llama/33214
- Convert f32 to f8_e4m3 without frexpf in device code llama/33035
- Dequantize reordered q6_K in f32 like the canonical kernel llama/32726
- Route D=256 single-query decode to the FA vector kernel llama/30606
OpenCL
- Support scaled matmul and add log with non-contiguous scale llama/33240 llama/33237
- Add a multi-token f32 GEMV for speculative verification llama/33098
- Add MoE int8 bin kernel host-side changes for Adreno A850 llama/33069
WebGPU
- Apply the weight scale of MUL_MAT and MUL_MAT_ID and skip expert slots with id -1 llama/33266 llama/33515
- Split the GDN replay into a separate pipeline and skip the cache fusion on overlapping states llama/33289 llama/28841
- Choose the mat-vec workgroup size by row length llama/33308
- Speed up prefill for flash_attn llama/33192
- Add CONV_TRANSPOSE_1D support llama/32719
Hexagon
- Improve 5x5 depthwise conv2d performance llama/32979
- Add online FWHT-32 and quantization-scale support llama/33347
- Optimize the IQ2_XSS grid gathers llama/33407
- Fix F8_E4M3 INF scale handling in the matmul epilogue llama/33497
- Fix accuracy issues in act and weight scaling and drop the w8a8+f16 hybrid mode llama/33166
OpenVINO
- Update to OpenVINO 2026.5 and add model and mtmd support llama/33505
- Improve NPU handling and fix the CI op tests llama/33088
ET
- Fix the multi-line L2 flush and replace the L2-SCP polling with FCC 0 llama/33313
zDNN
- Make zTensor memory usage visible for fitting llama/31849
HRX
- Add the experimental HRX backend llama/32700
RPC
- Add the SUPPORTS_OP command with a layout cache and graph preprocessing to prefetch the results llama/32532
- Fix a stale alloc_size cache entry being reused for a larger src tensor llama/33611
More info
Changelog since v1.1.1
4b32604 sync : llama.cpp
dca2d71 hexagon: CONV_2D/3D Cin chunking and cost-based tile solver (llama/32989)
f8f427c sync : llama.cpp
4452b6a hexagon: move conv2d_dw kernels to a separate file (llama/32982)
3e5d15c vulkan: add subgroup shader for pool1d (llama/33221)
dc99f96 ggml : bump version to 1.2.0 (#1714)
94b1a56 sync : llama.cpp
a6df2b8 rpc : fix stale alloc_size cache entry reused for larger src tensor (llama/33611)
0b6901d hexagon: conv2d_dw 5x5 performance improvement (llama/32979)
a290fea sync : llama.cpp
4cf9d09 vulkan: SSM_SCAN optimizations and coopmat2 support (llama/32916)
3b6a84a vulkan: hoist K-quant dequant in mul_mat_vecq (llama/31022)
66c294f ggml : fix view init skipped after buft max_size split (llama/25584)
d205621 CUDA: add internal ops (llama/33600)
2c6ed73 cuda : add flat 1D kernel for small-ne0 non-contiguous CONCAT (llama/33389)
05ea7f1 CUDA: vectorize Inkling 2 depth_mix with float4 (llama/33507)
c3323b7 metal : remove the quantized FA kernels for head sizes that are not multiples of 32 (llama/33534)
d90fb14 ggml : add internal ops (llama/33000)
b909d0c openvino: update to OV 2026.5, CI fixes, add model support, add mtmd support (llama/33505)
e0612b5 vulkan: add support for kv rows to Flash Attention (llama/33172)
0508f66 ggml-cpu(arm): SVE Implementation of gemv q6 k 8x8 q8 k (llama/29256)
02d2e72 CUDA: allow the short conv fusion when past is the state cell (llama/33504)
8e696a6 metal, vulkan : use Taylor series for metal ELU, EXPM1, XIELU and vulkan ELU (llama/33226)
65cfaae webgpu: skip the expert slots with id -1 in mul_mat_scale (fix CI) (llama/33515)
a6352f5 ggml : reject BF16 inputs in supports_op for ops without a BF16 kernel (CPU, CUDA) (llama/33190)
e7eef1d ggml : rename the mul_mat scale arguments after their operands (llama/33431)
6d6be23 rpc : add SUPPORTS_OP command (llama/32532)
d0eef7c vulkan: update topk_moe to handle bias rather than clamp (llama/32957)
d3f840a CUDA: reject non-contiguous src in XIELU and LEAKY_RELU supports_op (llama/33383)
fb4e279 CUDA: do not use restrict in FA vec helpers with PDL (llama/33384)
b3467a0 CUDA: fix grid-stride loop step in k_get_rows (llama/33140)
e406ca1 hexagon : fix F8_E4M3 INF scale handling in matmul epilogue (llama/33497)
f208f83 sycl: extend K-type validation to V-types for flash attention (llama/32703)
d8de639 CUDA: few-row MMQ for NVFP4 (llama/32610)
49b9d04 hexagon: optimize IQ2_XSS grid gathers (llama/33407)
ca15910 ggml-cuda : optimize mmvq nwarps for Pascal DP4A (llama/25479)
8a49e87 Vulkan: one thread per row for soft_max and sum_rows on short rows (llama/33197)
a843ad1 opencl: add log and non-contig scale (llama/33237)
6b2fef4 ggml-et : fix multi-line L2 flush and replace L2-SCP polling with FCC 0 (llama/33313)
13085cd metal : detect Neural Accelerators without hardcoding chips (llama/33272)
04b3120 CUDA/HIP: Use the MMA FA kernel for maskless attention on RDNA (llama/32930)
439c47a gguf: document and test the NUL byte rule for keys and tensor names (llama/33443)
0607620 vulkan: read IQ1/IQ2/IQ3 grid tables from a storage buffer (llama/32915)
9e15adc cuda : use dst strides in unary_op_kernel_strided (llama/33322)
4e5a5d7 vulkan: reduce cm1 int8 MMQ performance gap between AMD shader compilers - part 1: accumulate folding (llama/32528)
d054091 CUDA: optimize f16 conversion when using kv_rows (llama/33427)
ca480da metal : keep the MUL_MAT weight scale off skipped MoE slots (llama/33430)
afb6800 vulkan: enable split-K for GQA batches above the tile row count (llama/32097)
980f9a6 vulkan : fix large ROLL shifts (llama/32876)
1c2ba5f webgpu: split the GDN replay into a separate pipeline (llama/33289)
c2c6386 ggml-cpu : vectorize the Mamba-2 SSM scan on RVV (llama/32448)
dc48a7e CUDA : read K/V through kv_rows in the vec flash attention kernel (llama/32520)
36409f8 sycl: Add GDN Replay support (llama/32944)
67e179f opencl: support scaled mm (llama/33240)
a5eaf7e vulkan: add fp8 and scaled matmul support (llama/29791)
9c7345f CUDA: one thread per row for soft_max and sum_rows on short rows (llama/33187)
6642a0f ggml : add HRX backend (experimental, TinyStories-15M) (llama/32700)
ad09a32 gguf: reject keys and tensor names containing NUL bytes (llama/33355)
be6795d vulkan: handle ADD_ID with more tokens than maxComputeWorkGroupCount[1] (llama/33232)
3bd7a61 sync : llama.cpp
d42c0f5 hexagon: add support for online FWHT-32 and Quant Scales (llama/33347)
08270ae sync : llama.cpp
dbc1a32 sycl : fix batched f16 mul_mat with broadcast batches and strided src1 (llama/33214)
07f9c4f vulkan: improve CONV_2D/3D performance (llama/32629)
5896929 webgpu: mat-vec workgroup size by row length (llama/33308)
dea9a9b metal : one thread per row for soft_max and sum_rows on short rows (llama/33189)
cc4e2e1 ggml : clean up FA bias API (llama/33178)
401d12d sycl: convert f32 to f8_e4m3 without frexpf in device code (llama/33035)
dd7e5b6 vulkan: fold verify tokens and GQA heads into one flash-attention row tile (llama/30190)
1f1c3a4 metal : avoid a second pipeline cache lookup (llama/32977)
44bd72a ggml-cuda: Add GCN HIP sparse fattn (llama/30370)
cb23de0 hip: fix CU_CHECK macro shadowing causing infinite loop with VMM (llama/33227)
218132d webgpu: speed up prefill for flash_attn (llama/33192)
63fce7b webgpu: apply the weight scale of MUL_MAT and MUL_MAT_ID (llama/33266)
05b67d7 metal : keep ADD chain fusion independent of batch size (llama/33217)
0b88bed HIP: implement a ddp path for sum reduction operator (llama/32215)
323f5a3 HIP: few-row MMQ with WMMA for RDNA3.5 (llama/32224)
a5559a9 TP: can assign data to single device (llama/32983)
ef7548a CUDA: fix dp4a MMQ compiler hint for CUDA 13 (llama/33064)
cac02f3 webgpu : add CONV_TRANSPOSE_1D support (llama/32719)
8e1d8f2 ggml : add CONCAT backward pass (llama/32151)
ecdba79 ggml-cpu: optimize s390x vector intrinsic (llama/32253)
676ebdc tests : use the fused mul_mat tolerance for LOOP_CTRL (llama/33238)
5f72958 CUDA: consistent ncols2 selection for mma FA (llama/32626)
59a69bf CUDA: fix ADD_ID launch for more than 65535 tokens (llama/33162)
19f04ec vulkan: handle empty conv3d kernel, fixes validation error (llama/33106)
7ffb206 vulkan: further optimize coopmat2 GDN (llama/32860)
7fbf310 ggml-zdnn: make zTensor memory usage visible for fitting (llama/31849)
5eb590a CUDA: cache the device type at init (llama/33142)
8f83086 ggml: support quant scales for fp8 and nvfp4 (llama/28898)
4c2cd8b graph : read recurrent states in place instead of copying (llama/28841) (llama/30139)
0e24d25 cuda : fix NVFP4 MMQ y_scale over-read in the stream-k fixup (llama/33136)
d6be3de metal : check all fused nodes for concurrency (llama/33175)
d4fcc80 hex-hmx: fix accuracy issues in act and weight scaling, drop w8a8+f16 hybrid mode (no longer needed) (llama/33166)
079cdfd vulkan: add FA compact bias support for Inkling 2 Mini (llama/32898)
bc1aa7a sycl: dequantize reordered q6_K in f32 like the canonical kernel (llama/32726)
faa0636 ggml-openvino: CI op-test fixes and NPU improvements (llama/33088)
76d5ef8 sycl: route BMG D=256 single-query decode to the FA vector kernel (llama/30606)
59f1cf7 opencl: add multi token f32 GEMV for spec verify (llama/33098)
0f2e844 hip : fix bf16 MFMA operand vector type for CDNA (llama/33086)
9d50139 ggml/CUDA+HIP: Flash Attention with indexed bias (llama/33063)
4aabfdb opencl: add MoE int8 bin kernel host side changes for Adreno A850 (llama/33069)
5b75272 tests : relax the DEPTH_MIX tolerance to the mul_mat one (llama/33141)
bdf4644 CUDA: fuse the Inkling 2 short conv, depth mix, loop controller, L2 clip and situ chains (llama/33060)
a44f413 vulkan: fix Windows driver RDNA1 architecture misclassification (llama/33123)
27d47d7 CUDA: move the fusion code out of ggml-cuda.cu (llama/33087)
2ebcaa2 ggml : support a BF16 src1 in MUL_MAT and MUL_MAT_ID (CPU, CUDA) (llama/32533)
8d1878b CUDA: fuse the top-k MoE weight norm with an additive sum bias (llama/32943)
86b836e CUDA: loop over ne2/ne3 in non-contiguous concat (llama/33006)
b3e1921 CUDA: fix ROCm CI, do not pick the tile FA kernel for DKQ 576 with a GQA ratio not divisible by 4 (llama/33045)