Free model gpu buffers on exit
This commit is contained in:
parent
cd34b87de0
commit
c05883f3a9
1 changed files with 3 additions and 0 deletions
|
@ -1451,6 +1451,9 @@ struct llama_model {
|
||||||
ggml_cl_free_data(tensors_by_name[i].second);
|
ggml_cl_free_data(tensors_by_name[i].second);
|
||||||
}
|
}
|
||||||
#elif defined(GGML_USE_VULKAN)
|
#elif defined(GGML_USE_VULKAN)
|
||||||
|
for (size_t i = 0; i < tensors_by_name.size(); ++i) {
|
||||||
|
ggml_vk_free_data(tensors_by_name[i].second);
|
||||||
|
}
|
||||||
ggml_vk_cleanup();
|
ggml_vk_cleanup();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue