ggml-cpu : disable tiled matmul on AIX to fix page boundary segfault#22293
Open
shalinib-ibm wants to merge 2 commits intoggml-org:masterfrom
Open
ggml-cpu : disable tiled matmul on AIX to fix page boundary segfault#22293shalinib-ibm wants to merge 2 commits intoggml-org:masterfrom
shalinib-ibm wants to merge 2 commits intoggml-org:masterfrom
Conversation
vec_xst operations in the tiled path crash on AIX when writing near 4KB page boundaries due to strict memory protection. Fall back to mnpack implementation on AIX for stable execution. Signed-off-by: Shalini Salomi Bodapati <Shalini.Salomi.Bodapati@ibm.com>
Contributor
Author
|
@taronaeo Request to review this patch . Thanks in advance. |
Contributor
Author
|
@ggerganov Request to review this patch. Thanks in advance |
Co-authored-by: Aaron Teo <taronaeo@gmail.com>
Contributor
Author
|
@taronaeo |
Member
|
Noted on the CI failures. All seem unrelated to this PR. |
taronaeo
approved these changes
Apr 24, 2026
CISC
approved these changes
Apr 24, 2026
| mnpack(0, m, n_aligned, n); | ||
| } | ||
| } else { | ||
| #if defined(_AIX) || defined(__BIG_ENDIAN__) |
Member
There was a problem hiding this comment.
You should probably unindent the directives style-wise.
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.
vec_xst operations in the tiled path crash on AIX when writing near 4KB page boundaries due to strict memory protection. Fall back to mnpack implementation on AIX for stable execution.
Overview
This patch fixes segmentation faults in q4_0 model inference on AIX/PowerPC systems by disabling the tiled matrix multiplication path in llamafile's sgemm implementation.
vec_xstoperations crash on AIX when writing near 4KB page boundaries due to strict memory protection. Thevec_xstinstruction cannot write across page boundaries on AIX, and when the buffer offset lands at addresses like0x1100ed000(exactly at a page boundary), the write operation attempts to access unmapped memory, triggering a segfault.This issue does not occur on Linux because Linux has more lenient memory management and may have adjacent pages already mapped. On AIX, page boundaries are strictly enforced.
Additional information
Requirements