]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
metal : add f16 and bf16 support for concat operator (#24724)
authorGeorgi Gerganov <redacted>
Wed, 17 Jun 2026 16:38:55 +0000 (19:38 +0300)
committerGitHub <redacted>
Wed, 17 Jun 2026 16:38:55 +0000 (19:38 +0300)
commit8d2e5806322d5207c164717eda617de58a1729c1
treef787b8df1f7344a87d7116ab31c5df12b1c03c83
parent4b4d13ae721e5eb79b749ca2c6feefd157f90ed7
metal : add f16 and bf16 support for concat operator (#24724)

* metal : add f16 and bf16 support for concat operator

Extend the Metal backend concat operator to support f16 and bf16 tensor
types in addition to the existing f32 and i32 support.

- Template kernel_concat on type T with specializations for float, half,
  bfloat, and int
- Add type-specific pipeline getter ggml_metal_library_get_pipeline_concat()
- Update device support check to allow f16 unconditionally and bf16 when
  device supports bfloat16
- Update dispatch to select the correct kernel specialization by type

Assisted-by: pi:llama.cpp/Qwen3.6-27B
* metal : extend concat operator to support f16, bf16, i8, i16 and i64

Assisted-by: pi:llama.cpp/Qwen3.6-27B
ggml/src/ggml-metal/ggml-metal-device.cpp
ggml/src/ggml-metal/ggml-metal-device.h
ggml/src/ggml-metal/ggml-metal-device.m
ggml/src/ggml-metal/ggml-metal-ops.cpp
ggml/src/ggml-metal/ggml-metal.metal