From 67f1f36dd99dedf8a55d9107c5f4c5a92b9c5eb4 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Thu, 8 Oct 2026 00:25:06 +0000 Subject: [PATCH] PC 1 queue: the hot-table streaming-hint job (the eight packs-ca2-hot packs plus the mx8 control, base against --variant ldcs, unlocked and at the knee through the cleared helper sequence, rows labelled ca4-research) with its kit and publish lines Co-Authored-By: Claude Fable 5.1 --- tools/ca3-v4-amend/pc1-ca4-hot-ldcs.ps1 | 111 +++++++++++++++++++++ tools/ca3-v4-amend/pc1-publish-20261007.sh | 2 + 2 files changed, 113 insertions(+) create mode 100644 tools/ca3-v4-amend/pc1-ca4-hot-ldcs.ps1 diff --git a/tools/ca3-v4-amend/pc1-ca4-hot-ldcs.ps1 b/tools/ca3-v4-amend/pc1-ca4-hot-ldcs.ps1 new file mode 100644 index 000000000..0bb5fe2a4 --- /dev/null +++ b/tools/ca3-v4-amend/pc1-ca4-hot-ldcs.ps1 @@ -0,0 +1,111 @@ +# Counter ASIC 4 research (8 October 2026, the research lane's tail item; the coordinator's order): the 3.0 layer-5 hot table re-run with the +# streaming hint on PC 1's RTX 5090, the card alone through the RUNNER's --cards-off, no prompt. The kit (fetch job fetch-ca4-hot-packs-20261008): +# the eight 5 October hot-table packs of proto-cuda/packs-ca2-hot (hot32k4, hot32k4a, hot64k2, hot64k4, hot64k4a, hot64k8, hot96k4, hot96k4a: a +# second table of 32, 64 or 96 MiB sized to the L2, k loads per hash from it) and mx8-genesis as the control. The INSTALLED igneum-worker-cuda.exe +# --bench on every pack twice: base, and `--variant ldcs` (the worker's existing variant: __ldcs, streaming / evict-first, on every DATASET load, +# so the hot-table loads stay plain and L2-resident; the 5 October rows without the hint read g 0.84 to 0.87). 250 batches of 2^24 per run at +# --block-warps 1, nvidia-smi at 1 Hz (the three power fields, the mean from 8 s in): MH/s, watts, SM MHz, the fingerprint (base and ldcs must +# agree: the hint changes no byte) and check=PASS; once unlocked and once at the 1,300 MHz knee through the Power Helper task (the cleared +# sequence; rgc in finally; a silent helper skips the locked state and says so). Rows: `RESULT ca4-research pack= dir= program_id= class= +# variant= state= mhs= watts= ... fingerprint= check=`, the worker's own RESULT and race lines verbatim. Never quits, pauses, resumes +# or updates the app. +$ErrorActionPreference = 'Continue' +$jobName = 'pc1-ca4-hot-ldcs' +$started = Get-Date +function Stamp { (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ') } +function Summary([string] $status, [hashtable] $extra) { $o = [ordered]@{ job = $jobName; status = $status; duration_s = [int]((Get-Date) - $started).TotalSeconds; finished_at = (Stamp) }; foreach ($k in $extra.Keys) { $o[$k] = $extra[$k] }; 'SUMMARY ' + ($o | ConvertTo-Json -Compress -Depth 4) } +$jobDir = $env:IGNEUM_JOB_DIR; if (-not $jobDir) { $jobDir = Join-Path $env:TEMP 'igneum-ca4-mb' } +New-Item -ItemType Directory -Force -Path $jobDir | Out-Null +$jobs = Split-Path $jobDir +$packs = Join-Path (Join-Path $jobs 'fetch-ca4-hot-packs-20261008') 'packs' +if (-not (Test-Path $packs)) { "RESULT error packs missing at $packs (the fetch job fetch-ca4-hot-packs-20261008 runs first)"; Summary 'failed' @{ error = 'packs missing' }; exit 2 } +$inst = @("$env:LOCALAPPDATA\Programs\Igneum Miner", "$env:ProgramFiles\Igneum Miner") | Where-Object { Test-Path (Join-Path $_ 'igneum-worker-cuda.exe') } | Select-Object -First 1 +if (-not $inst) { 'RESULT error no installed igneum-worker-cuda.exe'; Summary 'failed' @{ error = 'no worker' }; exit 2 } +$exe = Join-Path $inst 'igneum-worker-cuda.exe' +$packOrder = @('mx8-genesis', 'hot32k4', 'hot32k4a', 'hot64k2', 'hot64k4', 'hot64k4a', 'hot64k8', 'hot96k4', 'hot96k4a') +$variants = @('base', 'ldcs') +foreach ($pk in $packOrder) { $d = Join-Path $packs $pk; if (-not (Test-Path $d)) { "RESULT error pack missing at $d"; Summary 'failed' @{ error = "pack $pk missing" }; exit 2 }; foreach ($f in (Get-ChildItem $d -File | Sort-Object Name)) { "RESULT kitfile $pk/$($f.Name) sha256 $((Get-FileHash -Algorithm SHA256 $f.FullName).Hash.ToLower())" } } +"RESULT start $(Stamp) job=$jobName exe=$exe sha256=$((Get-FileHash -Algorithm SHA256 $exe).Hash.ToLower()) label=ca4-research" +$smi = (Get-Command nvidia-smi -ErrorAction SilentlyContinue).Source +if (-not $smi) { foreach ($p in @((Join-Path $env:ProgramFiles 'NVIDIA Corporation\NVSMI\nvidia-smi.exe'), (Join-Path $env:SystemRoot 'System32\nvidia-smi.exe'))) { if (Test-Path $p) { $smi = $p; break } } } +$row = @(& $smi --query-gpu=index,name,uuid,pci.bus_id --format=csv,noheader 2>&1 | ForEach-Object { "$_" }) | Where-Object { $_ -match 'RTX 5090' } | Select-Object -First 1 +if (-not $row) { 'RESULT error no RTX 5090'; Summary 'failed' @{ error = 'no 5090' }; exit 2 } +$fld = $row -split ',\s*'; $idx = $fld[0].Trim(); $uuid = $fld[2].Trim(); $bus = $fld[3].Trim() +"RESULT card index=$idx uuid=$uuid bus=$bus" +$apps = @(& $smi --query-compute-apps=gpu_bus_id,pid,process_name --format=csv,noheader 2>$null | ForEach-Object { "$_" } | Where-Object { $_ -match [regex]::Escape($bus) -and $_ -match 'igneum' }) +$t = 0; while ($t -lt 150 -and $apps.Count -gt 0) { Start-Sleep -Seconds 5; $t += 5; $apps = @(& $smi --query-compute-apps=gpu_bus_id,pid,process_name --format=csv,noheader 2>$null | ForEach-Object { "$_" } | Where-Object { $_ -match [regex]::Escape($bus) -and $_ -match 'igneum' }) } +"RESULT card $(Stamp) $(if ($apps.Count -eq 0) { "quiet after $t s (the runner's --cards-off took)" } else { "UNCONFIRMED: $($apps -join '; ')" })" +# ---- the helper (the lock path), as pc1-v4-efficiency.ps1 ---- +$helperDir = Join-Path $env:LOCALAPPDATA 'igneum\app\sweep'; $cmdFile = Join-Path $helperDir 'cmd.txt'; $helperLog = Join-Path $helperDir 'helper.log' +function HelperAliveAge() { $a = Join-Path $helperDir 'helper.alive'; if (-not (Test-Path -LiteralPath $a)) { return 9999 }; try { $v = [int64]((Get-Content -LiteralPath $a -Raw).Trim()); return ([int64][double]::Parse((Get-Date -UFormat %s)) - $v) } catch { return 9999 } } +# the 0.3.20 helper's skip rule (update-return lane, 8 October 2026, 01:17 BST): it skips the first N lines of cmd.txt, N = the line count +# when it started, for its whole life; so every job starts it over an EMPTY file (skip 0), waits for helper.alive within 4 s, and repeats +# the sequence whenever helper.alive is stale (the helper idle-exits 20 min after its last command). A refused start (0x800710E0) or no fresh +# heartbeat within 60 s stops the lock path: nothing escalates, nothing not set is restored, the text goes on a RESULT line. +function HelperReset() { + Set-Content -LiteralPath $cmdFile -Value '' -NoNewline -Encoding ascii + try { Stop-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue } catch { } + Start-Sleep -Seconds 2 + try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false } + $t = 0 + while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } } + 'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates' + return $false +} +function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if (Test-Path $f) { foreach ($l in (Get-Content -LiteralPath $f -ErrorAction SilentlyContinue)) { if ($l -match '(?:^|\s)(\d{1,6}) (?:dev|pl|lgc|rgc|lmc|rmc|nvidia-smi|reregister)\b') { $v = [int]$Matches[1]; if ($v -gt $m) { $m = $v } } } } }; return $m + 100 } +function HelperSend([string] $verb) { + $s0 = HelperSeqBase; $s1 = $s0 + 1 + $mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count } + if ((HelperAliveAge) -gt 10) { if (-not (HelperReset)) { return "no helper (the reset failed)" } }; 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" +} +$viaHelper = $false +if (Get-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue) { $viaHelper = (HelperReset); if ($viaHelper) { 'RESULT helper task up over an empty cmd.txt' } } else { 'RESULT helper task not registered: the locked state is skipped' } +# ---- the sampler ---- +$samples = Join-Path $jobDir 'nv-samples.csv'; if (Test-Path $samples) { Remove-Item -LiteralPath $samples -Force } +$sampler = Start-Process -FilePath $smi -ArgumentList @('-i', $idx, '--query-gpu=timestamp,power.draw,clocks.sm,clocks.mem,temperature.gpu,utilization.gpu,power.draw.instant,power.draw.average', '--format=csv,noheader,nounits', '-lms', '1000') -RedirectStandardOutput $samples -WindowStyle Hidden -PassThru +Start-Sleep -Seconds 5 +"RESULT sampler pid=$($sampler.Id) first=[$((Get-Content -LiteralPath $samples -ErrorAction SilentlyContinue | Select-Object -First 1))]" +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) } +function Window([datetime] $t0, [datetime] $t1) { $sel = @(); if (Test-Path $samples) { foreach ($l in (Get-Content -LiteralPath $samples -ErrorAction SilentlyContinue)) { $p = $l -split ',\s*'; if ($p.Count -lt 6) { continue }; try { $ts = [datetime]::ParseExact($p[0].Trim(), 'yyyy/MM/dd HH:mm:ss.fff', [cultureinfo]::InvariantCulture) } catch { continue }; if ($ts -ge $t0 -and $ts -le $t1) { $sel += ,$p } } }; return ,$sel } +function ParseUtc([string] $s) { try { return [datetime]::Parse($s, [cultureinfo]::InvariantCulture, [System.Globalization.DateTimeStyles]::AdjustToUniversal).ToLocalTime() } catch { return $null } } +function RunState([string] $state) { + $env:CUDA_VISIBLE_DEVICES = $uuid + "RESULT packs-state $state start $(Stamp) $((& $smi -i $idx --query-gpu=clocks.sm,clocks.applications.graphics,power.draw --format=csv,noheader 2>&1 | Out-String).Trim())" + foreach ($pk in $packOrder) { foreach ($variant in $variants) { + $d = Join-Path $packs $pk + $cls = ''; $pid = ''; try { $pj = Get-Content -LiteralPath (Join-Path $d 'program.json') -Raw | ConvertFrom-Json; $cls = [string] $pj.load_class; $pid = [string] $pj.program_id } catch { } + $t0 = Get-Date + $extra = @(); if ($variant -ne 'base') { $extra = @('--variant', $variant) } + $lines = @(& $exe --bench --pack $d --batches 250 --batch-log2 24 --block-warps 1 @extra --device 0 2>&1 | ForEach-Object { "$_" }) + $race = (($lines | Where-Object { $_ -match 'race' }) -join ' / ') -replace '\s+', ' ' + $rc = $LASTEXITCODE + $t1 = Get-Date + $res = $lines | Where-Object { $_ -match '^RESULT pack=' } | Select-Object -First 1 + foreach ($l in $lines) { if ($l -match '^RESULT pack=|error|FAIL|MISMATCH|compile|nvrtc|vector|lane|self-test|checksum|race' ) { "RESULT worker pack=$pk variant=$variant state=$state $l" } } + $fp = ''; $mhs = ''; $check = '' + if ($res -and $res -match 'fingerprint=([0-9a-f]{16})') { $fp = $Matches[1] }; if ($res -and $res -match 'mhs=([\d.]+)') { $mhs = $Matches[1] }; if ($res -and $res -match 'check=(\S+)') { $check = $Matches[1] } + $w = Window $t0.AddSeconds(8) $t1 + $watts = Mean ($w | ForEach-Object { $_[1] }); $sm = Mean ($w | ForEach-Object { $_[2] }); $mem = Mean ($w | ForEach-Object { $_[3] }); $util = Mean ($w | ForEach-Object { $_[5] }) + $wi = Mean ($w | Where-Object { $_.Count -ge 8 -and $_[6] -match '^\s*[\d.]+\s*$' } | ForEach-Object { $_[6] }); $wa = Mean ($w | Where-Object { $_.Count -ge 8 -and $_[7] -match '^\s*[\d.]+\s*$' } | ForEach-Object { $_[7] }) + $eff = if ($watts -and $mhs) { [math]::Round([double]$mhs / $watts, 4) } else { '' } + $err = ''; if (-not $res -or $rc -ne 0) { $e = ($lines | Where-Object { $_ -match 'FAIL|error|MISMATCH|compile' } | Select-Object -First 1); $err = if ($e) { ($e -replace '\s+', ' ') } else { "exit $rc, no RESULT line" } } + "RESULT ca4-research pack=$pk dir=$d program_id=$pid class=$cls variant=$variant state=$state mhs=$mhs watts=$watts watts_instant=$wi watts_average=$wa mh_per_w=$eff sm_mhz=$sm mem_mhz=$mem util=$util fingerprint=$fp check=$check exit=$rc wall_s=$([int]($t1 - $t0).TotalSeconds) samples=$($w.Count) error=$err race=[$race]" + Start-Sleep -Seconds 3 + } } + "RESULT packs-state $state end $(Stamp)" +} +$locked = $false +try { + RunState 'unlocked' + if ($viaHelper) { + $r = HelperSend 'lgc 1300' + if ($r -match 'no helper.log') { "RESULT lock1300 skipped: the helper gave no answer ($r)" } else { "RESULT lock1300 set: $r"; $locked = $true; Start-Sleep -Seconds 3; RunState 'lock1300' } + } else { 'RESULT lock1300 skipped: no helper path' } + Summary 'done' @{ locked_state_ran = $locked } + exit 0 +} finally { + if ($locked) { $r = HelperSend 'rgc'; "RESULT restore rgc: $r ; applications clock: $((& $smi -i $idx --query-gpu=clocks.applications.graphics --format=csv,noheader 2>&1 | Out-String).Trim())" } + if ($sampler -and -not $sampler.HasExited) { Stop-Process -Id $sampler.Id -Force -ErrorAction SilentlyContinue; 'RESULT restore sampler stopped' } +} diff --git a/tools/ca3-v4-amend/pc1-publish-20261007.sh b/tools/ca3-v4-amend/pc1-publish-20261007.sh index 6884e8cb7..7d33f2d9b 100755 --- a/tools/ca3-v4-amend/pc1-publish-20261007.sh +++ b/tools/ca3-v4-amend/pc1-publish-20261007.sh @@ -38,6 +38,8 @@ case "$STEP" in v5-kit) $P add --kind fetch --target ae432dc7,1ccfe586 --id fetch-ca3-v5-kit-20261007 --file "$KITS/v5kit/packs-ca3-v5-20261007T221001Z.zip" --dir jobs --extract --title "Class v5 kit (the v5 lane, 7f58af97): packs, workers, SHA256SUMS" --expires-hours 36 $DEPLOY ;; v5-amd) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v5-amd-bench-20261007 --script tools/ca3-v4-amend/pc1-v5-amd-bench-20261007.ps1 --timeout-minutes 12 --title "Class v5 kit fingerprint on the RX 9070 XT (beside the miners; the v5 lane's script)" --expires-hours 36 $DEPLOY ;; v5-intel) $P add --kind run --target 1ccfe586 --id run-ca3-pc2-v5-intel-bench-20261007 --script tools/ca3-v4-amend/pc1-v5-intel-bench-20261007.ps1 --timeout-minutes 12 --title "Class v5 kit fingerprint on PC 2's Arc B580 eGPU (the v5 lane's script, class-v5 a4b08245; beside the miners; only on the shipper's PC 2 clear)" --expires-hours 36 $DEPLOY ;; + hot-kit) $P add --kind fetch --target ae432dc7 --id fetch-ca4-hot-packs-20261008 --file "$KITS/igneum-ca4-hot-packs-20261008.zip" --dir jobs --extract --title "CA4 research: the eight 5 October hot-table packs plus the mx8 control" --expires-hours 36 $DEPLOY ;; + hot-ldcs) $P add --kind run --target ae432dc7 --id run-ca4-pc1-hot-ldcs-5090-20261008 --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-ca4-hot-ldcs.ps1 --timeout-minutes 75 --title "CA4 research: the hot table with the streaming hint (base against ldcs) on the RTX 5090, unlocked and at the knee (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 ;;