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 <noreply@anthropic.com>
This commit is contained in:
parent
3bf8212493
commit
cdada77922
3 changed files with 7 additions and 4 deletions
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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++
|
||||
|
|
|
|||
Loading…
Reference in a new issue