metal: fix threadgroup half4x4 compilation error in lightning indexer - #26646
Merged
ggerganov merged 2 commits intoAug 7, 2026
Merged
Conversation
…lightning_indexer - In MSL, declaring an array of matrix types like `threadgroup half4x4` causes a 'no matching constructor' compilation error because MSL matrix types do not have zero-argument default constructors and threadgroup variables cannot have initializers. - Fix this by declaring a POD `threadgroup half` array instead and casting to `threadgroup half4x4 *` for matrix indexing. Signed-off-by: JamePeng <jame_peng@sina.com>
|
Hi @JamePeng, thanks for your contribution! Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:
Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below. |
ggerganov
approved these changes
Aug 6, 2026
miltos22
pushed a commit
to miltos22/llama.cpp-wackMall-merge-request
that referenced
this pull request
Aug 10, 2026
…tning_indexer (ggml-org#26646) - In MSL, declaring an array of matrix types like `threadgroup half4x4` causes a 'no matching constructor' compilation error because MSL matrix types do not have zero-argument default constructors and threadgroup variables cannot have initializers. - Fix this by declaring a POD `threadgroup half` array instead and casting to `threadgroup half4x4 *` for matrix indexing. Signed-off-by: JamePeng <jame_peng@sina.com>
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 11, 2026
…tning_indexer (ggml-org#26646) - In MSL, declaring an array of matrix types like `threadgroup half4x4` causes a 'no matching constructor' compilation error because MSL matrix types do not have zero-argument default constructors and threadgroup variables cannot have initializers. - Fix this by declaring a POD `threadgroup half` array instead and casting to `threadgroup half4x4 *` for matrix indexing. Signed-off-by: JamePeng <jame_peng@sina.com>
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 12, 2026
…tning_indexer (ggml-org#26646) - In MSL, declaring an array of matrix types like `threadgroup half4x4` causes a 'no matching constructor' compilation error because MSL matrix types do not have zero-argument default constructors and threadgroup variables cannot have initializers. - Fix this by declaring a POD `threadgroup half` array instead and casting to `threadgroup half4x4 *` for matrix indexing. Signed-off-by: JamePeng <jame_peng@sina.com>
huaxel
pushed a commit
to huaxel/CachyLLama
that referenced
this pull request
Aug 12, 2026
…tning_indexer (ggml-org#26646) - In MSL, declaring an array of matrix types like `threadgroup half4x4` causes a 'no matching constructor' compilation error because MSL matrix types do not have zero-argument default constructors and threadgroup variables cannot have initializers. - Fix this by declaring a POD `threadgroup half` array instead and casting to `threadgroup half4x4 *` for matrix indexing. Signed-off-by: JamePeng <jame_peng@sina.com>
brittlewis12
pushed a commit
to brittlewis12/llama.cpp
that referenced
this pull request
Aug 17, 2026
…tning_indexer (ggml-org#26646) - In MSL, declaring an array of matrix types like `threadgroup half4x4` causes a 'no matching constructor' compilation error because MSL matrix types do not have zero-argument default constructors and threadgroup variables cannot have initializers. - Fix this by declaring a POD `threadgroup half` array instead and casting to `threadgroup half4x4 *` for matrix indexing. Signed-off-by: JamePeng <jame_peng@sina.com>
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.
In MSL, declaring an array of matrix types like
threadgroup half4x4causes a 'no matching constructor' compilation error because MSL matrix types do not have zero-argument default constructors and threadgroup variables cannot have initializers.Fix this by declaring a POD
threadgroup halfarray instead and casting tothreadgroup half4x4 *for matrix indexing.Overview
In #25893,
kernel_lightning_indexerdeclared an array ofthreadgroup half4x4.MSL does not support implicit zero-argument constructors for matrix types,
causing a 'no matching constructor' build failure on Metal.
This fixes the issue by declaring a POD
threadgroup halfarray and castingit to
threadgroup half4x4 *.After this patch:
Additional information
Requirements