From 3e7b8343b20320dd34ca910eeed94a809f02b77d Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 2 Nov 2026 09:50:35 +0100 Subject: [PATCH] DFlash2 batch slot drafts: on by default only on a layer split (the measured case), one card stays opt-in --- src/program/generate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 4aa6d5946d..b9a7c7bb44 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -6367,14 +6367,15 @@ int main(int argc, char** argv) { // spare, and a round with no spare row does no drafter work (the committed rows wait on the host and are replayed when spare rows return). Measured on 2x // A6000 (RESULTS-DF2MGPU.md section 3): +25% / +9% over no drafts at 2 / 3 active slots, level at 4, within 1.5% at 8 and with users joining and leaving. // They run through the serial windows (one group); a layer split whose slots would be pipelined in groups by default keeps its groups and its undrafted - // slots (the pipelined groups carry no drafts), and so does an explicit --batch-groups above 1. + // slots (the pipelined groups carry no drafts), and so does an explicit --batch-groups above 1. One card: opt-in only (STRATA_BATCH_DF2=1). const bool batch_df2_wanted = [&] { const char* e = std::getenv("STRATA_BATCH_DF2"); const bool off = e != nullptr && e[0] == '0'; const bool forced = e != nullptr && e[0] != '0' && e[0] != '\0'; if (off || !(o.draft == "dflash2" && !o.draft_auto && o.batch >= 2 && o.serve && !split_same)) return false; if (forced) return true; - return batch_groups_for(false).groups <= 1; + // the default is what was measured: a layer split (2x A6000) whose slots would run as one group; one card is opt-in (STRATA_BATCH_DF2=1) until it is measured + return !stages.empty() && batch_groups_for(false).groups <= 1; }(); const char* batch_mtp_env = std::getenv("STRATA_BATCH_MTP"); bool batch_mtp = o.batch_mtp || (batch_mtp_env != nullptr && batch_mtp_env[0] != '\0' && batch_mtp_env[0] != '0') || batch_df2_wanted;