From cdada779224ce16aeb663e953034ea810f26dd3a Mon Sep 17 00:00:00 2001 From: igneum-josh <337424239+igneum-josh@users.noreply.github.com> Date: Wed, 7 Oct 2026 23:03:07 +0100 Subject: [PATCH] PC 1 helper scripts: four leading dev padding lines absorb the 0.3.20 helper's start-count skip (the update-return lane's reading of the silent helper; fixed in 0.3.21 a64c193f) Co-Authored-By: Claude Fable 5.1 --- tools/ca3-v4-amend/pc1-ca4-microbench.ps1 | 2 +- tools/ca3-v4-amend/pc1-ca4-packs.ps1 | 2 +- tools/ca3-v4-amend/pc1-v4-efficiency.ps1 | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/ca3-v4-amend/pc1-ca4-microbench.ps1 b/tools/ca3-v4-amend/pc1-ca4-microbench.ps1 index c4f18f79b..867fdd8ca 100644 --- a/tools/ca3-v4-amend/pc1-ca4-microbench.ps1 +++ b/tools/ca3-v4-amend/pc1-ca4-microbench.ps1 @@ -34,7 +34,7 @@ function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if function HelperSend([string] $verb) { $s0 = HelperSeqBase; $s1 = $s0 + 1 $mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count } - Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii + $pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii $t = 0; while ($t -lt 30) { Start-Sleep -Seconds 1; $t++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark) { $hit = $new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s1 nvidia-smi " } | Select-Object -First 1; if ($hit) { return ($hit -replace '^\d+\s+', '') } } } return "no helper.log line for seq $s1 within 30 s" } diff --git a/tools/ca3-v4-amend/pc1-ca4-packs.ps1 b/tools/ca3-v4-amend/pc1-ca4-packs.ps1 index ae652e8da..2aed76b18 100644 --- a/tools/ca3-v4-amend/pc1-ca4-packs.ps1 +++ b/tools/ca3-v4-amend/pc1-ca4-packs.ps1 @@ -40,7 +40,7 @@ function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if function HelperSend([string] $verb) { $s0 = HelperSeqBase; $s1 = $s0 + 1 $mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count } - Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii + $pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii $t = 0; while ($t -lt 30) { Start-Sleep -Seconds 1; $t++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark) { $hit = $new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s1 nvidia-smi " } | Select-Object -First 1; if ($hit) { return ($hit -replace '^\d+\s+', '') } } } return "no helper.log line for seq $s1 within 30 s" } diff --git a/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 b/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 index 0b4b4f16f..a38ae4a3c 100644 --- a/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 +++ b/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 @@ -120,6 +120,9 @@ function Mean($vals) { $v = @($vals | ForEach-Object { [double]$_ }); if ($v.Cou $helperDir = Join-Path $env:LOCALAPPDATA 'igneum\app\sweep' $cmdFile = Join-Path $helperDir 'cmd.txt' $helperLog = Join-Path $helperDir 'helper.log' +# the 0.3.20 helper also skips the first N lines of cmd.txt, N = the line count when it started (fixed in 0.3.21, a64c193f): four +# leading `dev` padding lines with climbing numbers absorb that skip (the engine writes 4-line files, so N is at most 4), the real +# dev and the command stand after them; never pad after the command (update-return lane, 7 October 2026, 22:00Z) # the helper skips any sequence number at or under the last one it ran (powertask.rs: `seq <= last_seq`), and the installed app's # own Ember tune writes the same file with its own rising numbers while it tunes another card (the floor pass of 20:21Z: the app # tuned the 5080 at seqs 423596 to 423598 while this script wrote 419500 to 419527, so every lock from 1,000 MHz down and the @@ -148,7 +151,7 @@ function HelperSend([string] $verb) { $script:seq += 2 $s0 = $script:seq; $s1 = $script:seq + 1; $script:seq = $s1 $mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count } - Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii + $pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii $t = 0 while ($t -lt 30) { Start-Sleep -Seconds 1; $t++ @@ -165,7 +168,7 @@ function HelperSend([string] $verb) { $script:seq = $base $s0 = $script:seq; $s1 = $script:seq + 1; $script:seq = $s1 $mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count } - Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii + $pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii $t = 0 while ($t -lt 30) { Start-Sleep -Seconds 1; $t++