Skip to content

Commit 952f395

Browse files
authored
ggml : allow CUDA graphs when using pipeline parallelism (#13814)
1 parent 8171312 commit 952f395

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ggml/src/ggml-backend.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,9 @@ void ggml_backend_sched_synchronize(ggml_backend_sched_t sched) {
15981598
for (int i = 0; i < sched->n_backends; i++) {
15991599
ggml_backend_synchronize(sched->backends[i]);
16001600
}
1601+
// reset the current copy to 0 so that the graphs will be similar during generation
1602+
// necessary for CUDA graphs
1603+
sched->cur_copy = 0;
16011604
}
16021605

16031606
void ggml_backend_sched_set_eval_callback(ggml_backend_sched_t sched, ggml_backend_sched_eval_callback callback, void * user_data) {

0 commit comments

Comments
 (0)