79 lines
6.3 KiB
PowerShell
79 lines
6.3 KiB
PowerShell
# Counter ASIC 3.0, PC 1 AMD job 2 (6 October 2026): item 6's step cost of every reserve candidate family of spec
|
|
# 1.13.2 on PC 1's RX 9070 XT (machine ae432dc7, gfx1201), docs/plans/counter-asic-3-reserve.md, status file section
|
|
# 3 "Item 6" (the OWED AMD column). Published as a plain signed `run` job (NOT --stop-miners) and run BESIDE THE MINERS:
|
|
# a dependent-chain ratio (each family against the add-xor-rotate chain, both measured in the same minute on the
|
|
# same card) survives a shared card, so no card is switched here; the process list says what the card carried and
|
|
# every line says loaded or quiet. The probe is the kit's family-probe-cl.exe (proto-opencl/family-probe.c of branch
|
|
# ca3-pc1-amd, cross-compiled with mingw, OpenCL.dll loaded at run time; the Mac ran the same source bit-exact on
|
|
# Apple OpenCL on 6 October 2026, 15:2x UTC), run three times on every AMD OpenCL device the machine lists (the
|
|
# gfx1201 on the current platform, its older-platform duplicate, the gfx1036 when present), each run best of 3 with
|
|
# a fresh seed per repetition, device event time, bit-exact against the CPU reference on two whole 32-lane groups.
|
|
# Every family is tried through every form AMD's OpenCL C offers (clang builtins ds_bpermute / ds_swizzle / sudot4 /
|
|
# wmma, cl_khr_subgroup_shuffle, cl_intel_subgroups, cl_amd_media_ops2 amd_bfe / amd_perm, the plain C form, the
|
|
# __local emulation); a form that does not compile prints build=failed with the first line of the build log and
|
|
# the run goes on. The script never quits, pauses, resumes or updates the installed app and never writes settings.json.
|
|
# Lines: the probe's own `RESULT FAMILY name=<f> ms=<best> gsteps=<x> ratio=<r> exact=<yes/no/unverified>
|
|
# path=<native|sequence|emulated> variant=<v> ...` and `RESULT FAMILYBEST ...` (the row per family the status file
|
|
# takes), each prefixed `RESULT run=<n> dev=<d>`; a `SUMMARY {json}` line at the end. Read back with `node tools/jobs.mjs <job id>`.
|
|
$ErrorActionPreference = 'Continue'
|
|
$jobName = 'pc1-amd-family'
|
|
$kitId = 'fetch-ca3-pc1-amd-20261006'
|
|
$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)
|
|
}
|
|
"RESULT start $(Stamp) job=$jobName machine=$env:COMPUTERNAME app_version=$env:IGNEUM_APP_VERSION"
|
|
$jobs = Split-Path $env:IGNEUM_JOB_DIR
|
|
$kit = Join-Path $jobs $kitId
|
|
if (-not (Test-Path $kit)) { "RESULT error kit missing at $kit (the fetch job $kitId runs first; republish it after any app update)"; Summary 'failed' @{ error = 'kit missing' }; exit 2 }
|
|
$probe = Join-Path $kit 'bin\family-probe-cl.exe'
|
|
$src = Join-Path $kit 'src\family-probe.c'
|
|
if (-not (Test-Path $probe)) { "RESULT error probe missing at $probe"; Summary 'failed' @{ error = 'probe missing' }; exit 2 }
|
|
"RESULT probe $probe sha256 $((Get-FileHash -Algorithm SHA256 $probe).Hash.ToLower()) bytes $((Get-Item $probe).Length)"
|
|
if (Test-Path $src) { "RESULT source family-probe.c sha256 $((Get-FileHash -Algorithm SHA256 $src).Hash.ToLower()) bytes $((Get-Item $src).Length)" }
|
|
|
|
# what the card carries during the run (read only; nothing is switched)
|
|
function Workers { @(Get-CimInstance Win32_Process -Filter "Name = 'igneum-worker-opencl.exe' OR Name = 'igneum-worker-cuda.exe'" -ErrorAction SilentlyContinue | ForEach-Object { "$($_.Name):$($_.ProcessId):[$($_.CommandLine -replace '\s+', ' ')]" }) }
|
|
$w = @(Workers)
|
|
$amdLoaded = ($w | Where-Object { $_ -match 'igneum-worker-opencl' }).Count -gt 0
|
|
"RESULT workers_before $(Stamp) $($w -join ' ')"
|
|
"RESULT context card_state=$(if ($amdLoaded) { 'LOADED (an igneum-worker-opencl process mines on an AMD card: absolutes are shared-card figures, ratios stand)' } else { 'quiet (no igneum-worker-opencl process)' })"
|
|
|
|
# every AMD device the probe lists (both platform entries of the 9070 XT, the gfx1036 when present)
|
|
$list = @(& $probe --list 2>&1 | ForEach-Object { "$_" })
|
|
$list | ForEach-Object { "RESULT list $_" }
|
|
$devs = @()
|
|
foreach ($l in $list) { if ($l -match '^\[(\d+)\] (.*?) \| (.*?) \|' -and $l -match 'gfx1201|gfx1036|AMD|Radeon') { if ($l -notmatch 'NVIDIA') { $devs += [pscustomobject]@{ idx = [int]$Matches[1]; name = $Matches[2]; platform = $Matches[3] } } } }
|
|
if ($devs.Count -eq 0) { "RESULT error no AMD OpenCL device in the probe's list (the eGPU is off the bus and no gfx1036: every row OWED)"; Summary 'failed' @{ error = 'no AMD device' } ; exit 2 }
|
|
"RESULT devices $(($devs | ForEach-Object { "[$($_.idx)] $($_.name) on $($_.platform)" }) -join ' ; ')"
|
|
# the gfx1201 on the current platform first (the row the status file takes), then the rest
|
|
$ordered = @($devs | Where-Object { $_.name -match 'gfx1201' } | Sort-Object { $_.platform } -Descending) + @($devs | Where-Object { $_.name -notmatch 'gfx1201' })
|
|
|
|
$runs = 0; $exactRows = 0; $rowsTotal = 0; $built = 0; $failedBuilds = 0
|
|
foreach ($d in $ordered) {
|
|
for ($r = 1; $r -le 3; $r++) {
|
|
"RESULT run=$r dev=$($d.idx) start $(Stamp) name=$($d.name) platform=$($d.platform) card_state=$(if ($amdLoaded) { 'loaded' } else { 'quiet' })"
|
|
$t0 = Get-Date
|
|
$lines = @(& $probe --device $d.idx --reps 3 2>&1 | ForEach-Object { "$_" })
|
|
$rc = $LASTEXITCODE
|
|
foreach ($l in $lines) {
|
|
if ($l -match '^RESULT ') { "RESULT run=$r dev=$($d.idx) $($l.Substring(7))" } else { "RESULT run=$r dev=$($d.idx) text $l" }
|
|
if ($l -match '^RESULT FAMILY name=\S+ ms=') { $rowsTotal++; if ($l -match ' exact=yes ') { $exactRows++ } }
|
|
if ($l -match '^RESULT FAMILY .*build=failed') { $failedBuilds++ }
|
|
if ($l -match '^RESULT FAMILYBEST name=\S+ ms=') { $built++ }
|
|
}
|
|
"RESULT run=$r dev=$($d.idx) end $(Stamp) exit=$rc wall_s=$([int]((Get-Date) - $t0).TotalSeconds)"
|
|
if ($rc -ne 0) { "RESULT run=$r dev=$($d.idx) error=probe exit $rc" }
|
|
$runs++
|
|
Start-Sleep -Seconds 2
|
|
}
|
|
}
|
|
"RESULT workers_after $(Stamp) $((Workers) -join ' ')"
|
|
"RESULT end $(Stamp)"
|
|
$status = if ($rowsTotal -gt 0) { 'done' } else { 'failed' }
|
|
Summary $status @{ runs = $runs; devices = $ordered.Count; family_rows = $rowsTotal; exact_rows = $exactRows; failed_builds = $failedBuilds; familybest_rows = $built; card_state = $(if ($amdLoaded) { 'loaded' } else { 'quiet' }) }
|
|
if ($status -eq 'failed') { exit 1 }
|
|
exit 0
|