Skip to content

metal : add set_rows with f16 src0 - #25434

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
fairydreaming:set-rows-f16-metal
Jul 8, 2026
Merged

metal : add set_rows with f16 src0#25434
ggerganov merged 1 commit into
ggml-org:masterfrom
fairydreaming:set-rows-f16-metal

Conversation

@fairydreaming

Copy link
Copy Markdown
Collaborator

Overview

This PR adds support for Metal GGML_OP_SET_ROWS where src0 type is f16 and dst type is also f16. This will come in handy in models based on DeepSeek Sparse Attention (DeepSeek V3.2, V4, GLM 5.0, 5.1, 5.2) where we have to "sparsify" KQ mask based on lightning indexer indices. With f16 support in GGML_OP_SET_ROWS it will be possible to use f16 FA KQ masks without any extra casts, this will reduce memory usage and simplify code.

Additional information

Used @ggerganov code as discussed in #25370

Requirements

@fairydreaming
fairydreaming requested a review from a team as a code owner July 8, 2026 05:40
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels Jul 8, 2026
@ggerganov
ggerganov merged commit 0512ef1 into ggml-org:master Jul 8, 2026
31 of 33 checks passed
ggerganov added a commit that referenced this pull request Jul 8, 2026
ggerganov added a commit that referenced this pull request Jul 10, 2026
CowboyTim pushed a commit to aardbeiplantje/llama.cpp that referenced this pull request Jul 21, 2026
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
gianni-cor pushed a commit to tetherto/qvac-fabric-llm.cpp that referenced this pull request Jul 25, 2026
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
ggerganov added a commit that referenced this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple Metal https://en.wikipedia.org/wiki/Metal_(API) ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants