Avoir copying the entire vector

Co-authored-by: slaren <slarengh@gmail.com>
This commit is contained in:
Pierrick Hymbert 2024-03-21 04:36:06 +01:00 committed by GitHub
parent 7c64fef91b
commit b8feff411f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5251,7 +5251,7 @@ static bool llm_load_tensors(
// load tensor data
for (auto & it : ctx_bufs) {
ggml_context * ctx = it.first;
std::vector<ggml_backend_buffer_t> bufs = it.second;
auto & bufs = it.second;
if (!ml.load_all_data(ctx, progress_callback, progress_callback_user_data, bufs, use_mlock ? &model.mlock_mmaps : NULL)) {
return false;
}