Skip to content

Commit 2b05130

Browse files
committed
Missing alignment
1 parent ddc367c commit 2b05130

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llama.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,9 @@ struct llama_file_loader {
491491
tensor.file_off = file.tell();
492492
tensor.name = name;
493493
tensor.size = llama_calc_tensor_size(tensor.ne, tensor.type);
494+
// skip to the next multiple of 32 bytes
495+
file.seek(-static_cast<ptrdiff_t>(tensor.file_off) & 31, SEEK_CUR);
496+
494497
file.seek(tensor.size, SEEK_CUR);
495498

496499
tensors_map.tensors.push_back(tensor);

0 commit comments

Comments
 (0)