]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
metal : add f16 and bf16 support for concat operator (llama/24724)
authorGeorgi Gerganov <redacted>
Wed, 17 Jun 2026 16:38:55 +0000 (19:38 +0300)
committerGeorgi Gerganov <redacted>
Fri, 19 Jun 2026 09:53:43 +0000 (12:53 +0300)
commitad19c98240527975b5aeb0245522c18e07030c1d
treef555f095e9d9e61171a6488cdba46c212c674e3e
parent6772827b26a2c4b015bc729333e259709069fe96
metal : add f16 and bf16 support for concat operator (llama/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