robustness: the stall report's prompt lines and the Windows resume error in the approved wording

The stall report's three lines about the prompt's GPU work and the error a
Windows start raises when the suspended child cannot be resumed now read as
the owner approved them on 11-11; the placeholder markers are gone.
stream_watch_test checks the three lines in full.
This commit is contained in:
Niko1221 committed 2026-11-11 00:10:43 +01:00
1 parent 5d87c4d8eb
commit ca9c53c1fd
4 files changed
+19 -15

No files matched your search

+7 -5
View File
@@ -39,7 +39,7 @@ public:
return n;
}
/// One line per watched stream; `query(stream, device, why)` must not block (cudaStreamQuery). Nothing when
/// no stream is watched (the stall is elsewhere). The lines' wording is a DRAFT (RESULTS-GH-FIX.md, robust 3).
/// no stream is watched (the stall is elsewhere). `what` names the work ("the prompt's GPU work", prefill.cpp).
template <class Query>
void report(std::FILE* f, Query&& query) {
std::lock_guard<std::mutex> lk(mu_);
@@ -47,10 +47,12 @@ public:
if (!s.used) continue;
std::string why;
const StreamState st = query(s.stream, s.device, why);
std::fprintf(f, " [DRAFT] %s (GPU %d): %s\n", s.what, s.device,
st == StreamState::finished ? "its work is finished (a host still waiting on it was not woken)"
: st == StreamState::working ? "its work is still running on the GPU"
: ("the query failed: " + why).c_str());
if (st == StreamState::finished)
std::fprintf(f, " %s (GPU %d) had finished, but the engine was still waiting for it\n", s.what, s.device);
else if (st == StreamState::working)
std::fprintf(f, " %s (GPU %d) was still running\n", s.what, s.device);
else
std::fprintf(f, " the state of %s could not be read: %s\n", s.what, why.c_str());
}
}
+3 -2
View File
@@ -118,8 +118,9 @@ def start_contained(args, **kw):
resumed = isinstance(pid, int) and pid > 0 and _resume(pid) # (a stand-in wrapping a real process is resumed too)
if real and not resumed:
_end(proc)
# PLACEHOLDER wording, pending review (RESULTS-GH-FIX.md robust item 6)
raise OSError(f"the process started for {args[0] if args else '?'} could not be resumed")
program = args[0] if args else "?"
raise OSError(f"Windows started {program} but did not let it run, so Strata stopped it. "
"Start it again; if this keeps happening, restart the computer.")
return proc
+1 -1
View File
@@ -3316,7 +3316,7 @@ bool Prefill::run_impl(const int64_t* tokens, int64_t n, int64_t pos0, std::stri
Impl& m = *impl_;
const core::OnDevice on_device(m.device);
// the stall report asks this stream (the one the waits below block on) whether its work is done (#5718 follow-up)
const core::WatchedStream watched("the prompt path's compute stream", (void*) m.cs, m.device);
const core::WatchedStream watched("the prompt's GPU work", (void*) m.cs, m.device);
const core::ModelGeometry& g = *m.g;
core::SessionState& ss = *m.ss;
const auto t_start = Clock::now();
+8 -7
View File
@@ -36,17 +36,18 @@ std::string report_text() {
int main() {
CHECK(report_text().empty()); // nothing watched: no line
{
WatchedStream a("the prompt path's compute stream", (void*) 1, 0);
WatchedStream a("the prompt's GPU work", (void*) 1, 0);
CHECK(stream_watch().count() == 1);
{
WatchedStream b("the prompt path's compute stream", (void*) 2, 1);
WatchedStream c("a third stream", (void*) 3, 0);
WatchedStream b("the prompt's GPU work", (void*) 2, 1);
WatchedStream c("the prompt's GPU work", (void*) 3, 0);
const std::string t = report_text();
std::printf("%s", t.c_str());
CHECK(t.find("(GPU 0): its work is finished") != std::string::npos);
CHECK(t.find("(GPU 1): its work is still running on the GPU") != std::string::npos);
CHECK(t.find("the query failed: invalid resource handle") != std::string::npos);
CHECK(stream_watch().count() == 3);
CHECK(t.find(" the prompt's GPU work (GPU 0) had finished, but the engine was still waiting for it\n")
!= std::string::npos);
CHECK(t.find(" the prompt's GPU work (GPU 1) was still running\n") != std::string::npos);
CHECK(t.find(" the state of the prompt's GPU work could not be read: invalid resource handle\n")
!= std::string::npos); CHECK(stream_watch().count() == 3);
}
CHECK(stream_watch().count() == 1); // b and c left with their scopes
const std::string t = report_text();