diff --git a/tools/ca3-v4-amend/pc1-publish-20261007.sh b/tools/ca3-v4-amend/pc1-publish-20261007.sh index b1486c466..a370ed424 100755 --- a/tools/ca3-v4-amend/pc1-publish-20261007.sh +++ b/tools/ca3-v4-amend/pc1-publish-20261007.sh @@ -9,6 +9,8 @@ # Kits (built 7 October 2026, 17:5x UTC; the exes cross-compiled on build-1 with mingw from this tree): # igneum-ca3-v4-sub3-pc1-kit.zip sha256 1d441f5a075d72b1b902d23941e57b0fa4bee08f91a14b10a7a545aaac58c413 (896,071 bytes, 167 files) # igneum-ca3-pc1-amd-family-kit-20261007.zip sha256 9dd82b11ed08ff9270ac7d59f634eaf99267b1bb48a9ae9fdfc0ce7fe41e63ef (39,399 bytes, 3 files) +# The efficiency passes are NOT elevated (the 18:31Z run exit 251: the UAC prompt went unanswered); the clock lock goes through the +# installed app's registered Igneum Power Helper task (no prompt); ids -b because a machine runs an id once. # Order (main, 7 October 2026 evening): eff-5090, eff-5080 (the class v4 efficiency pass; its clock grid carries the four Ember # caps, so the owed "5090 clock rows" fall out of it), amd-g1 (G1 + the AMD ladder on the sub-version 3 kit), family (item 6 # on AMD), tune-5080 (the full Ember Tune on the 5080), tune-9070 (the 9070 XT tune pass). The dr736 derive job is NOT in this @@ -22,8 +24,8 @@ DEPLOY=""; for a in "$@"; do [ "$a" = "--deploy" ] && DEPLOY="--deploy"; done case "$STEP" in kit) $P add --kind fetch --target ae432dc7 --id fetch-ca3-v4-sub3-pc1-20261007 --file "$KITS/igneum-ca3-v4-sub3-pc1-kit.zip" --dir jobs --extract --title "CA3 PC 1: the sub-version 3 kit (worker, 13 packs)" --expires-hours 36 $DEPLOY ;; family-kit) $P add --kind fetch --target ae432dc7 --id fetch-ca3-pc1-amd-family-20261007 --file "$KITS/igneum-ca3-pc1-amd-family-kit-20261007.zip" --dir jobs --extract --title "CA3 PC 1: the family probe kit (7 Oct)" --expires-hours 36 $DEPLOY ;; - eff-5090) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-eff-5090-20261007 --elevated --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 75 --title "CA3 PC 1: class v4 efficiency pass on the RTX 5090 (clock locks, v4 against v3, the card alone)" --expires-hours 36 $DEPLOY ;; - eff-5080) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-eff-5080-20261007 --elevated --cards-off "nvidia:NVIDIA GeForce RTX 5080" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 75 --title "CA3 PC 1: class v4 efficiency pass on the RTX 5080 (clock locks, v4 against v3, the card alone)" --expires-hours 36 $DEPLOY ;; + eff-5090) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-eff-5090-20261007-b --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 75 --title "CA3 PC 1: class v4 efficiency pass on the RTX 5090 (clock locks, v4 against v3, the card alone)" --expires-hours 36 $DEPLOY ;; + eff-5080) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-eff-5080-20261007-b --cards-off "nvidia:NVIDIA GeForce RTX 5080" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 75 --title "CA3 PC 1: class v4 efficiency pass on the RTX 5080 (clock locks, v4 against v3, the card alone)" --expires-hours 36 $DEPLOY ;; amd-g1) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-sub3-amd-g1-20261007 --cards-off amd:gfx1201 --script tools/ca3-v4-amend/pc1-v4-sub3-amd-g1.ps1 --timeout-minutes 45 --title "CA3 PC 1: G1 on the sub-version 3 kit and the AMD ladder on the 9070 XT (the card alone)" --expires-hours 36 $DEPLOY ;; family) $P add --kind run --target ae432dc7 --id run-ca3-pc1-amd-family-20261007-e --cards-off amd:gfx1201 --script tools/ca3-v4-amend/pc1-amd-family-20261007.ps1 --timeout-minutes 20 --title "CA3 PC 1: item 6 family step costs on the 9070 XT (run e, the card alone)" --expires-hours 36 $DEPLOY ;; tune-5080) $P add --kind run --target ae432dc7 --id run-ca3-pc1-ember-5080-20261007 --script tools/ca3-v4-amend/pc1-ember-card.ps1 --timeout-minutes 35 --title "CA3 PC 1: Ember Tune on the RTX 5080 (the installed app tunes the one card)" --expires-hours 36 $DEPLOY ;; diff --git a/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 b/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 index 95899edce..ba63e0011 100644 --- a/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 +++ b/tools/ca3-v4-amend/pc1-v4-efficiency.ps1 @@ -16,7 +16,12 @@ # fingerprint= match=`, one per step and pack; `RESULT TABLE` lines at the end (v3 best against v4 best, the recovered watts, # the rate lost); a `SUMMARY {json}` line. Never quits, pauses, resumes or updates the installed app; never posts to # /api/cards; never writes settings.json; -rgc in finally. Not elevated: the lock is refused, the unlocked rows are -# measured and every lock row says why. Kit: fetch job fetch-ca3-v4-sub3-pc1-20261007 (tools/ca3-v4-amend/pc1-publish-20261007.sh). +# measured and every lock row says why. The lock path when NOT elevated (the 18:31Z run: the UAC prompt went unanswered, exit 251): +# the installed app's registered `Igneum Power Helper` task (app/igneum-app/src/powertask.rs, one approval ever): the script +# starts it (Start-ScheduledTask by the owning user, no prompt) and talks to it through %LOCALAPPDATA%\igneum\app\sweep\cmd.txt +# with the fixed verbs ` dev `, ` lgc ` (the helper runs nvidia-smi -lgc 0,: a cap, which under load +# is the lock), ` rgc`, and reads the result from helper.log beside it; the same channel the app's own Ember tune uses, +# so no new rights and no prompt. Kit: fetch job fetch-ca3-v4-sub3-pc1-20261007 (tools/ca3-v4-amend/pc1-publish-20261007.sh). $ErrorActionPreference = 'Continue' $jobName = 'pc1-v4-efficiency' $kitId = 'fetch-ca3-v4-sub3-pc1-20261007' @@ -98,10 +103,59 @@ function ReadWindow([datetime] $t0, [datetime] $t1) { return ,$sel } function Mean($vals) { $v = @($vals | ForEach-Object { [double]$_ }); if ($v.Count -eq 0) { return $null }; return [math]::Round((($v | Measure-Object -Sum).Sum / $v.Count), 1) } +# ---- the Power Helper task (the lock path without a prompt) ---- +$helperDir = Join-Path $env:LOCALAPPDATA 'igneum\app\sweep' +$cmdFile = Join-Path $helperDir 'cmd.txt' +$helperLog = Join-Path $helperDir 'helper.log' +$viaHelper = $false +$seq = 0 +if (-not $elevated) { + $task = Get-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue + if ($task) { + try { + if (Test-Path $cmdFile) { $seq = @(Get-Content -LiteralPath $cmdFile -ErrorAction SilentlyContinue | ForEach-Object { if ($_ -match '^(\d{1,6})\s') { [int]$Matches[1] } }) | Measure-Object -Maximum | Select-Object -ExpandProperty Maximum } + if (-not $seq) { $seq = 0 } + $seq = [int]$seq + 100 + Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop + Start-Sleep -Seconds 3 + $viaHelper = $true + "RESULT helper task 'Igneum Power Helper' state=$((Get-ScheduledTask -TaskName 'Igneum Power Helper').State) started; commands through $cmdFile from seq $seq; results from $helperLog" + } catch { "RESULT helper task present but Start-ScheduledTask failed: $_" } + } else { 'RESULT helper task NOT REGISTERED (Power control off in the app): no lock path without a prompt' } +} +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 + $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 (is the task running?)" +} function SetLock([int] $mhz) { - $out = (& $smi -i $idx -lgc "$mhz,$mhz" 2>&1 | Out-String).Trim() -replace '\s+', ' ' - if ($out -match 'not have permission|No permission|Insufficient|not supported|Unable|ERROR') { return "refused: $out" } - return "ok: $out" + if ($elevated) { + $out = (& $smi -i $idx -lgc "$mhz,$mhz" 2>&1 | Out-String).Trim() -replace '\s+', ' ' + if ($out -match 'not have permission|No permission|Insufficient|not supported|Unable|ERROR') { return "refused: $out" } + return "ok (direct): $out" + } + if ($viaHelper) { + $out = HelperSend "lgc $mhz" + if ($out -match 'not have permission|No permission|Insufficient|not supported|Unable|ERROR|no helper.log') { return "refused: $out" } + return "ok (helper, -lgc 0,$mhz): $out" + } + return 'refused: not elevated and no helper task' +} +function ResetClocks() { + if ($elevated) { return ((& $smi -i $idx -rgc 2>&1 | Out-String).Trim() -replace '\s+', ' ') } + if ($viaHelper) { return (HelperSend 'rgc') } + return 'not attempted (not elevated, no helper)' } function Bench([string] $pk, [int] $n) { $d = Join-Path $packs $pk @@ -147,7 +201,7 @@ try { "RESULT sampler pid=$($sampler.Id) first=[$($first -join ' | ')]" if ($first.Count -eq 0) { 'RESULT sampler error=no samples in 6 s; watts will read empty on every row' } # the unlocked start: -rgc so the baseline is the driver's own choice, then the batch counts from a short probe per pack - $r0 = (& $smi -i $idx -rgc 2>&1 | Out-String).Trim() -replace '\s+', ' ' + $r0 = ResetClocks "RESULT unlock start $r0" $nb = @{} foreach ($pk in $packOrder) { @@ -159,9 +213,9 @@ try { } } Step 'unlocked' 'driver default (-rgc)' - if (-not $elevated) { - 'RESULT locks skipped: the job is not elevated, nvidia-smi -lgc would be refused (the 6 October reading); the unlocked rows above are the measurement' - foreach ($c in $locks) { foreach ($pk in $packOrder) { "RESULT STEP card=$cardName pack=$pk lock=$c error=not elevated, lock not attempted" } } + if (-not $elevated -and -not $viaHelper) { + 'RESULT locks skipped: the job is not elevated and the Power Helper task is not registered; the unlocked rows above are the measurement' + foreach ($c in $locks) { foreach ($pk in $packOrder) { "RESULT STEP card=$cardName pack=$pk lock=$c error=no lock path (not elevated, no helper task)" } } } else { foreach ($c in $locks) { if ((Get-Date) -gt $deadline) { "RESULT STEP card=$cardName pack=* lock=$c error=budget spent"; continue } @@ -171,7 +225,7 @@ try { Start-Sleep -Seconds 3 Step "$c" $note } - $r1 = (& $smi -i $idx -rgc 2>&1 | Out-String).Trim() -replace '\s+', ' ' + $r1 = ResetClocks $lockState = 'unlocked' "RESULT unlock end $r1" Start-Sleep -Seconds 3 @@ -195,10 +249,10 @@ try { if ($u4 -and $u3 -and $b4 -and $b3) { "RESULT TABLE card=$cardName v3_vs_v4 v4_extra_w_unlocked=$([math]::Round($u4.watts - $u3.watts, 1)) v4_extra_w_at_best=$([math]::Round($b4.watts - $b3.watts, 1)) v4_rate_vs_v3_unlocked_pct=$([math]::Round(100.0 * ($u4.mhs - $u3.mhs) / $u3.mhs, 2)) v4_rate_vs_v3_at_best_pct=$([math]::Round(100.0 * ($b4.mhs - $b3.mhs) / $b3.mhs, 2)) v4_best_lock=$($b4.lock) v3_best_lock=$($b3.lock)" } - Summary 'done' @{ card = $cardName; elevated = $elevated; alone = $alone; steps = $rows.Count; mismatches = (@($rows | Where-Object { $_.match -eq 'no' })).Count } + Summary 'done' @{ card = $cardName; elevated = $elevated; via_helper = $viaHelper; alone = $alone; steps = $rows.Count; mismatches = (@($rows | Where-Object { $_.match -eq 'no' })).Count } exit 0 } finally { - try { $r = (& $smi -i $idx -rgc 2>&1 | Out-String).Trim() -replace '\s+', ' '; "RESULT restore clocks reset: $r (was $lockState)" } catch { "RESULT restore clocks reset failed: $_" } + try { $r = ResetClocks; "RESULT restore clocks reset: $r (was $lockState)" } catch { "RESULT restore clocks reset failed: $_" } if ($sampler -and -not $sampler.HasExited) { try { Stop-Process -Id $sampler.Id -Force -ErrorAction SilentlyContinue; "RESULT restore sampler pid $($sampler.Id) stopped" } catch { } } "RESULT gpus_after $(Stamp) $((& $smi --query-gpu=index,name,power.draw,clocks.sm,clocks.applications.graphics --format=csv,noheader 2>&1 | Out-String).Trim() -replace "`r?`n", ' | ')" }