Skip to content

fix: update ggml to prevent permute metadata truncation - #2018

Merged
leejet merged 1 commit into
masterfrom
fix/ggml-permute-overflow
Sep 21, 2026
Merged

leejet merged 1 commit into
masterfrom
fix/ggml-permute-overflow

Conversation

@leejet

@leejet leejet commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Summary

Update ggml to fix dimension and byte-stride truncation in ggml_permute.

The function previously copied int64_t dimensions and size_t strides through temporary int arrays. An F32 tensor shaped [1536, 2048, 288, 1] has a byte stride of 3,623,878,656, exceeding INT32_MAX. On the affected platform, narrowing this value produces a negative int, which becomes an enormous invalid stride when converted back to 64-bit size_t.

Using int64_t and size_t temporaries preserves the original metadata and prevents the resulting CUDA/HIP binary-broadcast assertion.

Related Issue / Discussion

Fix #2013.

Additional Information

N/A

Checklist

@leejet
leejet merged commit 2726dd3 into master Sep 21, 2026
9 checks passed
@leejet
leejet deleted the fix/ggml-permute-overflow branch September 21, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant