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 @@ -19355,18 +19355,16 @@ enum ggml_status ggml_graph_compute(struct ggml_cgraph * cgraph, struct ggml_cpl
19355
19355
};
19356
19356
19357
19357
threadpool = ggml_create_threadpool_impl(&ttp, true, cgraph, cplan);
19358
- } else if (n_threads > threadpool->n_threads_max) {
19359
- GGML_PRINT("WARNING: cplan is requesting more threads than the threadpool contains. Expect a bad time!\n");
19360
- }
19361
-
19362
- // Set up work
19363
- threadpool->cgraph = cgraph;
19364
- threadpool->cplan = cplan;
19365
- threadpool->n_threads_cur = n_threads;
19366
-
19367
- if (!disposable_threadpool) {
19358
+ } else {
19359
+ if (n_threads > threadpool->n_threads_max) {
19360
+ GGML_PRINT("WARNING: cplan is requesting more threads than the threadpool contains. Expect a bad time!\n");
19361
+ }
19362
+ // Not a disposable threadpool:
19368
19363
// Reset some of the paramters that need resetting
19369
19364
// No worker threads should be accessing the parameters below at this stage
19365
+ threadpool->cgraph = cgraph;
19366
+ threadpool->cplan = cplan;
19367
+ threadpool->n_threads_cur = n_threads;
19370
19368
threadpool->n_barrier = 0;
19371
19369
threadpool->n_barrier_passed = 0;
19372
19370
threadpool->current_chunk = 0;
You can’t perform that action at this time.
0 commit comments