fixed use after release bug

This commit is contained in:
Faisal Zaghloul 2024-07-31 12:42:30 -04:00 committed by fmz
parent a0aae528bb
commit d5c9c14dea

View file

@ -19363,11 +19363,13 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
// don't leave affinity set on the main thread
clear_numa_thread_affinity();
enum ggml_status ret = threadpool->ec;
if (disposable_threadpool) {
ggml_release_threadpool(threadpool);
}
return threadpool->ec;
return ret;
}
enum ggml_status ggml_graph_compute_with_ctx(struct ggml_context * ctx, struct ggml_cgraph * cgraph, int n_threads) {