diff --git a/src/split/src/hip/rccl_dl.hpp b/src/split/src/hip/rccl_dl.hpp index 4b3f0746e4..b79dff1e1a 100644 --- a/src/split/src/hip/rccl_dl.hpp +++ b/src/split/src/hip/rccl_dl.hpp @@ -69,7 +69,7 @@ inline RcclDecision rccl_decide(const char* env, bool peer_on, bool default_on, const bool wanted = env ? std::strcmp(env, "0") != 0 : default_on; if (!wanted) return d; if (!peer_on) { - d.line = "RCCL is not used for the prompt sums: the peer push between the cards is off, so the host exchange stays."; + if (env) d.line = "RCCL is not used for the prompt sums: the peer push between the cards is off, so the host exchange stays."; // (asked for: say so; the default stays quiet) return d; } std::string why; diff --git a/src/split/tools/rccl_policy_test.cpp b/src/split/tools/rccl_policy_test.cpp index 2710d0e4c8..7979c09f1a 100644 --- a/src/split/tools/rccl_policy_test.cpp +++ b/src/split/tools/rccl_policy_test.cpp @@ -26,6 +26,11 @@ int main() { // =1 without the peer push: the host exchange stays, one line, no open d = rccl_decide("1", false, false, pass); CHECK(!d.use && calls == 0 && d.line == "RCCL is not used for the prompt sums: the peer push between the cards is off, so the host exchange stays."); + // the default alone (unset) without the peer push: the host exchange, quiet + calls = 0; + d = rccl_decide(nullptr, false, true, pass); + CHECK(!d.use && calls == 0 && d.line.empty()); + calls = 0; // =1 with the peer push and a library that opens: used, the line says which d = rccl_decide("1", true, false, pass); CHECK(d.use && calls == 1 && d.line == "The prompt sums use RCCL (librccl.so.1).");