Skip to content

Commit ec372c6

Browse files
committed
llama_model_loader: use at instead of operator[] if this should never add to the map.
1 parent 9940df4 commit ec372c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3293,7 +3293,7 @@ struct llama_model_loader {
32933293
// unmap offloaded tensors and metadata
32943294
if (use_mmap) {
32953295
for (uint32_t idx = 0; idx < mappings.size(); idx++) {
3296-
const auto & mmap_used = mmaps_used[idx];
3296+
const auto & mmap_used = mmaps_used.at(idx);
32973297
auto & mapping = mappings.at(idx);
32983298
mapping->unmap_fragment(0, mmap_used.first);
32993299
if (mmap_used.second != 0) {

0 commit comments

Comments
 (0)