]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
metal: template GLU kernels to support f16/f32 (llama/23882)
authorShrivas Shankar <redacted>
Mon, 1 Jun 2026 12:40:28 +0000 (07:40 -0500)
committerGeorgi Gerganov <redacted>
Mon, 8 Jun 2026 11:36:36 +0000 (14:36 +0300)
commit050b8567a0fff75392c249d9283f8ee2dfa89292
tree4c31807582040e2e20573e6bf67e7d6a867872fe
parent71d80aa49eb93868a8ed7e9f8abeae9e061adcfe
metal: template GLU kernels to support f16/f32 (llama/23882)

Drops the hardcoded f32 GLU kernels in favor of a single template. We now load/store in the native tensor type (half or float) to save memory bandwidth, but keep the actual ALU compute in float to avoid exploding math in geglu/swiglu. Also opened up the dispatch gate to allow f16 inputs.
ggml/src/ggml-metal/ggml-metal-device.m
ggml/src/ggml-metal/ggml-metal.metal