gguf : support custom alignment value
This commit is contained in:
parent
6b3a7b9f4f
commit
7aa0a0e7f7
3 changed files with 10 additions and 2 deletions
5
ggml.c
5
ggml.c
|
@ -18543,7 +18543,10 @@ struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_p
|
|||
|
||||
ctx->alignment = GGUF_DEFAULT_ALIGNMENT;
|
||||
|
||||
// TODO: determine new alignment from kv if available
|
||||
int alignment_idx = gguf_find_key(ctx, "general.alignment");
|
||||
if (alignment_idx != -1) {
|
||||
ctx->alignment = gguf_get_u32(ctx, alignment_idx);
|
||||
}
|
||||
|
||||
// we require the data section to be aligned, so take into account any padding
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue