Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions engine/src/prefill/prefill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8184,7 +8184,14 @@ int64_t Prefill::lm_prepare(int64_t n, std::string& why, int64_t cap) {
// no layer-major form
const bool split = stage_lb_ != 0 || stage_le_ != g.n_layers || next_ != nullptr;
if (hand_in_ != nullptr) { why = "a layer split's chunk hand-off is in use"; return 0; }
// a peer GPU's share of the prompt rows has no layer-major form; STRATA_PREFILL_LM_FORCE=1 asks for the walk anyway.
// HIP keeps the gate as it was: the walk with a peer GPU has not been run on an AMD card.
#if defined(STRATA_USE_HIP) || defined(STRATA_HIP_GFX906)
if (m.pp || helper_ != nullptr || core::peer_portable()) { why = "a peer GPU"; return 0; }
#else
if (helper_ != nullptr) { why = "a peer GPU"; return 0; }
if ((m.pp || core::peer_portable()) && !lm_force_env()) { why = "a peer GPU"; return 0; }
#endif
// the PLE block (layer 1) reads the token history: on a split it runs in a first stage that holds layers 0 and 1
// (a later stage never reaches it)
if (split && m.ss->ple.ready() && stage_lb_ <= 1 && !(stage_lb_ == 0 && stage_le_ >= 2)) {
Expand Down
Loading