Skip to content

Commit 5796caf

Browse files
committed
ggml: change ggml_aligned_malloc alignment to 256
256 is the cache line size for s390x platforms Signed-off-by: Aaron Teo <[email protected]>
1 parent 8ced2ab commit 5796caf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml/src/ggml.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,11 @@ void ggml_log_callback_default(enum ggml_log_level level, const char * text, voi
236236

237237

238238
void * ggml_aligned_malloc(size_t size) {
239+
#if defined(__s390x__)
240+
const int alignment = 256;
241+
#else
239242
const int alignment = 64;
243+
#endif
240244

241245
#if defined(_MSC_VER) || defined(__MINGW32__)
242246
return _aligned_malloc(size, alignment);

0 commit comments

Comments
 (0)