replit: free metal context

This commit is contained in:
Aaron Miller 2023-06-30 16:17:59 -07:00 committed by AT
parent 3599663a22
commit 137bc2c367

View File

@ -904,6 +904,11 @@ int32_t Replit::threadCount() const
Replit::~Replit()
{
#ifdef GGML_USE_METAL
if (d_ptr->model->ctx_metal) {
ggml_metal_free(d_ptr->model->ctx_metal);
}
#endif
if(d_ptr->model->ctx) {
ggml_free(d_ptr->model->ctx);
d_ptr->model->ctx = nullptr;