diff --git a/src/prefill/prefill.cpp b/src/prefill/prefill.cpp index edbc47c5..03529cf1 100644 --- a/src/prefill/prefill.cpp +++ b/src/prefill/prefill.cpp @@ -1969,8 +1969,11 @@ bool Prefill::run(const int64_t* tokens, int64_t n, int64_t pos0, std::string& e const bool use_mmq = mmq_plan().any && mmq_plan().layer[(size_t) l]; const int mmq_gt = lay.native ? lay.fmt[(size_t) l].gu_type : 42; const int mmq_dt = lay.native ? lay.fmt[(size_t) l].d_type : 42; - const bool fused_nat = use_mmq && stream_all && !m.pp && lay.native && fused::native_supported(mmq_gt, mmq_dt); - const bool fused_l = (use_mmq && stream_all && !m.pp && !lay.native && fused::enabled()) || fused_nat; + // --peer-device: MMQ only, whether or not the peer took the prompt path (set_peer can decline), as + // fused_ring() sized the ring and the buffers for it + const bool no_peer = !core::peer_portable(); + const bool fused_nat = use_mmq && stream_all && no_peer && lay.native && fused::native_supported(mmq_gt, mmq_dt); + const bool fused_l = (use_mmq && stream_all && no_peer && !lay.native && fused::enabled()) || fused_nat; size_t n_order = 0; // the routed experts (the debug report; unknown when fused) bool peer_now = false; // multi-GPU: the peer computed rows of this layer (MMQ path only) if (fused_l) {