File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2489,6 +2489,14 @@ ggml_status llama_context::graph_compute(
24892489 set_n_threads_fn.second (set_n_threads_fn.first , n_threads);
24902490 }
24912491
2492+ // WP_PAGED_BATCH: mark each MUL_MAT_ID and its ids-producer as batch-range
2493+ // break points before the scheduler splits/computes gf, so the eval-cb can
2494+ // isolate every routing op (fixes the batched-MoE read-before-produce fault).
2495+ // No-op unless the pager is active; cheap (cached, skips when topology unchanged).
2496+ if (model.wp_pager ) {
2497+ model.wp_pager ->mark_routing_boundaries (gf);
2498+ }
2499+
24922500 auto status = ggml_backend_sched_graph_compute_async (sched.get (), gf);
24932501 if (status != GGML_STATUS_SUCCESS ) {
24942502 LLAMA_LOG_ERROR (" %s: ggml_backend_sched_graph_compute_async failed with error %d\n " , __func__, status);
You can’t perform that action at this time.
0 commit comments