Skip to content

Commit 9a4b0df

Browse files
Load little-endian models on s390x
Introduce byteswap function for ggml data. Implement some of them. Currently tested on llama3.2.
1 parent 96f4053 commit 9a4b0df

File tree

4 files changed

+332
-1
lines changed

4 files changed

+332
-1
lines changed

ggml/include/ggml.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,6 +2144,7 @@ extern "C" {
21442144
#endif
21452145
typedef void (*ggml_to_float_t) (const void * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
21462146
typedef void (*ggml_from_float_t)(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
2147+
typedef void (*ggml_byteswap_t) ( void * GGML_RESTRICT buffer, size_t elements);
21472148

21482149
struct ggml_type_traits {
21492150
const char * type_name;
@@ -2153,6 +2154,7 @@ extern "C" {
21532154
bool is_quantized;
21542155
ggml_to_float_t to_float;
21552156
ggml_from_float_t from_float_ref;
2157+
ggml_byteswap_t byteswap;
21562158
};
21572159

21582160
GGML_API const struct ggml_type_traits * ggml_get_type_traits(enum ggml_type type);

0 commit comments

Comments
 (0)