[Engine] SYCL: print the pipelined commit's count when a state dump is requested
The pipelined state dump showed the first multi-token window leaving the GDN state one row ahead of the serial path, so the next question was whether the commit count was wrong. With STRATA_PIPELINE_DUMP set, `pl_commit_async` now prints `n_keep`, `T`, `pos0` and whether the one-token skip applies, which answers it: the counts are right. ``` commit n_keep=1 T=1 pos0=18 self_skip=1 (stage 0) commit n_keep=1 T=1 pos0=19 self_skip=1 verdict p=19 T=1 a=0 B none commit n_keep=1 T=1 pos0=19 self_skip=1 (stage 1) commit n_keep=2 T=2 pos0=20 self_skip=0 (stage 0) commit n_keep=2 T=2 pos0=20 self_skip=0 (stage 1) verdict p=20 T=2 a=1 B launched ON ``` So the multi-token window commits two rows in both stages, exactly as the verdict says, and the extra row must come from the *window's own* self-commit: `record_window` self-commits when `T == 1 && !batch_rec_ && !g_qfuse() && one_token_self_commit()` (verify.cpp:844), and the transition from a self-committed single-token window to the first graph-committed window is where the state gains the row. That is the next thing to diff - the dump currently hashes the recurrence and the conv history together. Debug only: the print needs a state dump to be requested and changes no behaviour.
This commit is contained in:
1 parent
11d337537c
commit
7356aa1404
1 file changed
+6
@@ -3975,6 +3975,12 @@ catch (sycl::exception const &exc) {
|
||||
bool Verifier::pl_commit_async(int n_keep, std::string &err) try {
|
||||
const OnDevice on_device(device_);
|
||||
if (n_keep < 1 || n_keep > last_t_) { err = "verify: commit count out of range"; return false; }
|
||||
// Debug: with a state dump requested, print what this commit is launched with, so a wrong count names
|
||||
// itself next to the verdict log (STRATA_PIPELINE_LOG).
|
||||
static const bool cdbg = std::getenv("STRATA_PIPELINE_DUMP") != nullptr;
|
||||
if (cdbg)
|
||||
std::fprintf(stderr, "strata commit: n_keep=%d T=%d pos0=%lld self_skip=%d\n", n_keep, (int) last_t_,
|
||||
(long long) last_pos0_, (last_t_ == 1 && one_token_self_commit()) ? 1 : 0);
|
||||
if (commit_exec_ == nullptr || ev_commit_ == nullptr) { err = "verify: pipelined commit not prepared"; return false; }
|
||||
const Clock::time_point t0 = Clock::now();
|
||||
if (commit_live_) { // its graph reads the words below when it starts: the previous one has (a window ago)
|
||||
|
||||
Reference in new issue
Block a user