Skip to content

Commit f99ef53

Browse files
authored
llama : Changing off_t to size_t for Windows (#18204)
1 parent cc0a043 commit f99ef53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/llama-model-loader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,10 +1086,10 @@ bool llama_model_loader::load_all_data(
10861086
} else {
10871087
// If upload_backend is valid load the tensor in chunks to pinned memory and upload the buffers asynchronously to the GPU.
10881088
if (upload_backend) {
1089-
auto offset = (off_t) weight->offs;
1089+
size_t offset = weight->offs;
10901090
alignment = file->read_alignment();
1091-
off_t aligned_offset = offset & ~(alignment - 1);
1092-
off_t offset_from_alignment = offset - aligned_offset;
1091+
size_t aligned_offset = offset & ~(alignment - 1);
1092+
size_t offset_from_alignment = offset - aligned_offset;
10931093
file->seek(aligned_offset, SEEK_SET);
10941094

10951095
// Calculate aligned read boundaries

0 commit comments

Comments
 (0)