PC 1 queue: the counter-asic-4 prototype packs job (the per-load shadow and the int8 tile classes against mx8 and sh256x27 through the installed worker, unlocked and at the knee, rows labelled ca4-research) with its kit and publish lines
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
1eb953aa68
commit
c8c5827ed8
2 changed files with 95 additions and 0 deletions
93
tools/ca3-v4-amend/pc1-ca4-packs.ps1
Normal file
93
tools/ca3-v4-amend/pc1-ca4-packs.ps1
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# Counter ASIC 4 research (7 October 2026): the two prototype classes of the research lane (ad6a2bd47d4a46105) on PC 1's RTX 5090,
|
||||
# the card alone through the RUNNER's --cards-off, no prompt. The kit (fetch job fetch-ca4-packs-20261007): mx8-genesis (the class v3
|
||||
# control from packs-ca2-mixer), mx8_sh256x27 (the class v4-shaped shadow control), mx8_shl256x27 (the per-load shadow, 16 blocks of
|
||||
# 16 after each load), mx8_mm128, mx8_mm512, mx8_mm1430 (the int8 mma.m8n8k16 tile block, inline PTX in the kernel text); every pack
|
||||
# generator 2 over seed igneum-genesis, day 2026-10-03, 1 GiB. The INSTALLED igneum-worker-cuda.exe --bench takes each pack as it took
|
||||
# the 6 October ladder packs (NVRTC compiles the pack's own kernel text; an NVRTC refusal of a tile pack is the row). Per pack, 250
|
||||
# batches of 2^24 at --block-warps 1 with nvidia-smi at 1 Hz (the mean from 8 s in): MH/s, watts (all three power fields), SM MHz,
|
||||
# the fingerprint and the self-test verdict (check=PASS: the 96 vector lanes through the bound kernel, the CUDA-against-CPU gate for
|
||||
# both prototypes; a FAIL row is the finding). Once unlocked and once at the 1,300 MHz knee lock through the Power Helper task when it
|
||||
# answers (the sequence rule; rgc in finally; a silent helper skips the locked state and says so). Rows: `RESULT ca4-research pack=
|
||||
# state= mhs= watts= ... fingerprint= check=`, the worker's own RESULT line verbatim. Never quits, pauses, resumes or updates the app.
|
||||
$ErrorActionPreference = 'Continue'
|
||||
$jobName = 'pc1-ca4-packs'
|
||||
$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-packs-20261007') 'packs'
|
||||
if (-not (Test-Path $packs)) { "RESULT error packs missing at $packs (the fetch job fetch-ca4-packs-20261007 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', 'mx8_sh256x27', 'mx8_shl256x27', 'mx8_mm128', 'mx8_mm512', 'mx8_mm1430')
|
||||
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 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 }
|
||||
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) { try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop; Start-Sleep -Seconds 3; $viaHelper = $true; 'RESULT helper task started' } catch { "RESULT helper start failed: $_" } } 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) {
|
||||
$d = Join-Path $packs $pk
|
||||
$cls = ''; try { $cls = [string] ((Get-Content -LiteralPath (Join-Path $d 'program.json') -Raw | ConvertFrom-Json).load_class) } catch { }
|
||||
$t0 = Get-Date
|
||||
$lines = @(& $exe --bench --pack $d --batches 250 --batch-log2 24 --block-warps 1 --device 0 2>&1 | ForEach-Object { "$_" })
|
||||
$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' ) { "RESULT worker pack=$pk 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 class=$cls 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"
|
||||
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' }
|
||||
}
|
||||
|
|
@ -33,6 +33,8 @@ case "$STEP" in
|
|||
helper-diag2) $P add --kind run --target ae432dc7 --id run-ca3-pc1-helper-diag2-20261007 --script tools/ca3-v4-amend/pc1-helper-diag2.ps1 --timeout-minutes 5 --title "PC 1: Power Helper diagnostic 2 (the task exe against the running app, scheduler history, crash log, a 20 s unelevated helper probe)" --expires-hours 12 $DEPLOY ;;
|
||||
ca4-mb-exe) $P add --kind fetch --target ae432dc7 --id fetch-ca4-microbench-exe-20261007 --file "$KITS/ca4/igneum-worker-cuda-ca4mb.exe" --dir jobs --title "CA4 research: the microbench worker exe (scratch build)" --expires-hours 36 $DEPLOY ;;
|
||||
ca4-mb) $P add --kind run --target ae432dc7 --id run-ca4-pc1-microbench-5090-20261007 --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-ca4-microbench.ps1 --timeout-minutes 60 --title "CA4 research: per-block micro-benchmark on the RTX 5090, unlocked and at the 1,300 MHz knee (the card alone)" --expires-hours 36 $DEPLOY ;;
|
||||
ca4-packs-kit) $P add --kind fetch --target ae432dc7 --id fetch-ca4-packs-20261007 --file "$KITS/igneum-ca4-packs-20261007.zip" --dir jobs --extract --title "CA4 research: the two prototype classes' packs plus the mx8 control" --expires-hours 36 $DEPLOY ;;
|
||||
ca4-packs) $P add --kind run --target ae432dc7 --id run-ca4-pc1-packs-5090-20261007 --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-ca4-packs.ps1 --timeout-minutes 60 --title "CA4 research: the per-load shadow and the int8 tile prototypes against mx8 and sh256x27 on the RTX 5090 (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 ;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue