Repository navigation
ggml : remove DIAG_MASK_INF and DIAG_MASK_ZERO - #31946
Merged
ggerganov merged 1 commit intoNov 10, 2026
Merged
Conversation
losewayy
requested review from
a team,
JohannesGaessler and
ggerganov
as code owners
November 9, 2026 14:10
This was referenced Nov 9, 2026
ggerganov
approved these changes
Nov 9, 2026
max-krasnyansky
approved these changes
Nov 9, 2026
0cc4m
approved these changes
Nov 10, 2026
ggerganov
merged commit Nov 10, 2026
b18af06
into
ggml-org:gg/ggml-prune-deprecated
45 of 51 checks passed
ggerganov
pushed a commit
that referenced
this pull request
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
ref #17654
Remove
GGML_OP_DIAG_MASK_INF,GGML_OP_DIAG_MASK_ZEROand the fourggml_diag_mask_*functions for v1.0.0, as discussed in #17654. This PR targets the #29801 branch.This also removes their CPU, CUDA, Vulkan, SYCL, OpenCL and CANN kernels, the backward cases, the DIAG_MASK_INF case in the Vulkan debug check, the test-backend-ops cases and the
docs/opsentries. No model in the repo uses these ops.To migrate:
ggml_diag_mask_zero(ctx, a, 0)->ggml_tri(ctx, a, GGML_TRI_TYPE_LOWER_DIAG), for a contiguous square F32a, not in placeggml_diag_mask_infbefore a softmax -> pass an additive mask toggml_soft_max_ext, with 0 for visible and -INFINITY for masked positionsAdditional information
Removing these ops shifts the IDs of later ops, as the ADD1 removal in #29801 already does. I left the RPC and backend API versions unchanged so they can be bumped once for the whole branch. Note that the RPC handshake does not check the patch version, so a patch bump alone would not catch a mismatch.
Validation
ggml-cuda.cucompile. SYCL and CANN were not built, the changes there are removals only.Requirements