File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -19312,18 +19312,16 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
19312
19312
};
19313
19313
19314
19314
threadpool = ggml_create_threadpool_impl(&ttp, true, cgraph, cplan);
19315
- } else if (n_threads > threadpool->n_threads_max) {
19316
- GGML_PRINT("WARNING: cplan is requesting more threads than the threadpool contains. Expect a bad time!\n");
19317
- }
19318
-
19319
- // Set up work
19320
- threadpool->cgraph = cgraph;
19321
- threadpool->cplan = cplan;
19322
- threadpool->n_threads_cur = n_threads;
19323
-
19324
- if (!disposable_threadpool) {
19315
+ } else {
19316
+ if (n_threads > threadpool->n_threads_max) {
19317
+ GGML_PRINT("WARNING: cplan is requesting more threads than the threadpool contains. Expect a bad time!\n");
19318
+ }
19319
+ // Not a disposable threadpool:
19325
19320
// Reset some of the paramters that need resetting
19326
19321
// No worker threads should be accessing the parameters below at this stage
19322
+ threadpool->cgraph = cgraph;
19323
+ threadpool->cplan = cplan;
19324
+ threadpool->n_threads_cur = n_threads;
19327
19325
threadpool->n_barrier = 0;
19328
19326
threadpool->n_barrier_passed = 0;
19329
19327
threadpool->current_chunk = 0;
You can’t perform that action at this time.
0 commit comments