batch-groups: --adapt-async 1 also keeps the 0.1.41 auto default at one group (said once)

The pipelined slot groups never run the adaptive tier, so --adapt-async 1 with --batch on a layer split and no
--batch-groups resolves auto to one group, like --batch-mtp (batch_groups.hpp, batch_groups_test); --batch-groups G
or auto given on the command line is honoured and turns --adapt-async off through the existing gate.
This commit is contained in:
noon-at-cgn authored and Niko1221 committed 2026-10-09 15:16:22 +02:00
1 parent 495dc43690
commit b5d520313a
4 files changed
+34 -17

No files matched your search

+16 -3
View File
@@ -2,8 +2,8 @@
//
// 1. `auto` picks the most groups, at most one per stage, that divide the slots;
// 2. a layer split with --batch >= 2 and no --batch-groups means `auto` (0.1.41);
// 3. --batch-mtp turns that default into one group, and says which feature did it;
// 4. a number or `auto` given explicitly is honoured, with or without --batch-mtp;
// 3. --batch-mtp (or --adapt-async 1) turns that default into one group, and says which feature did it;
// 4. a number or `auto` given explicitly is honoured, with or without those features;
// 5. no layer split: the number given (1) stays.
#include "strata/program/batch_groups.hpp"
@@ -46,7 +46,7 @@ int main() {
check(r.groups == 1 && !r.from_auto, "no layer split: one group");
}
{ // the shape this is for: parallel 2 on a 2-GPU split with --batch-mtp
{ // the production shape: parallel 2 on a 2-GPU split with --batch-mtp
bg::Input i = in(2, 1);
i.batch_mtp = true;
const auto r = bg::resolve(i);
@@ -54,6 +54,18 @@ int main() {
"--batch-mtp, nothing given: one group, because of --batch-mtp");
check(bg::serial_what(r.serial)[0] == '-', "the reason names the feature");
}
{
bg::Input i = in(2, 1);
i.adapt_async = true;
const auto r = bg::resolve(i);
check(r.groups == 1 && r.serial == bg::Serial::AdaptAsync, "--adapt-async 1, nothing given: one group");
}
{
bg::Input i = in(2, 1);
i.batch_mtp = true;
i.adapt_async = true;
check(bg::resolve(i).serial == bg::Serial::BatchMtp, "both: --batch-mtp is named");
}
{ // nothing to give way: the slots do not divide, so auto is one group anyway and there is nothing to say
bg::Input i = in(3, 1);
i.batch_mtp = true;
@@ -65,6 +77,7 @@ int main() {
i.set = true;
i.given = 2;
i.batch_mtp = true;
i.adapt_async = true;
const auto r = bg::resolve(i);
check(r.groups == 2 && !r.from_auto && r.serial == bg::Serial::None, "--batch-groups 2 with --batch-mtp: 2");
i.given = 1;