interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / scripts / gpu_bench / README.md

64 lines · 3866 bytes Raw Blame History Source

scripts/gpu_bench -- bench scripts for the ck_gpu_bench console

The console (ck_gpu_bench, docs/IMAC_GPU_BENCH.md on feat/imac-gpu-bench) reads these. Check them before a run:

bash scripts/gpu_bench/check_bench.sh          # exit 0 clean, 1 grammar error, 3 allowlist gaps

Grammar is checked against the console's commands and argument counts. An allowlist gap (exit 3) is not a grammar error: the console refuses that write with BENCH_ERR_RANGE until the entry below is added to its allowlist. The console lives on the bench branch, so this branch cannot add the entries itself.

Register numbers are checked against AMD's headers

bash scripts/gpu_bench/check_regs.sh           # exit 0 when every number matches, 1 otherwise

It fetches AMD's MIT register headers from the Linux kernel (v6.12, cached in ~/.cache/aienos-amd-hdr) and checks every mm... index, mask and shift in native/kernel/gpu/amd_gpu_regs.h (value and the cited header:line), the SMU constants, and every bar5_* index in the STEP files. Earlier versions of these files used numbers that were never checked (GRPH 0x5045 where the header says 0x1a04, SMC 0x178 where it says 0x94).

Write allowlist entries the STEPs need

The console on feat/imac-gpu-bench allowlists BAR5 DWORD 0x4800-0x4900, 0x4A00-0x4C00, GRPH 0x1a04-0x1a12 (DCP0), SMC 0x94-0x95 and 0xa4.

StepWrites (BAR5 DWORD index)In the allowlist
STEP10x1a04, 0x1a07, 0x1a11, 0x1a12 (GRPH, controller 0)yes
STEP3none (reads 0x94, 0x95, 0xa4)not needed

Entries STEP4-6 need (the same console change, for those runs)

StepWrites (BAR5 DWORD index)Entry to add
STEP40x2008, 0xf814, 0xf83c, 0xec00, 0x3041, 0x3045those indices (GRBM_SOFT_RESET, CP_PFP_UCODE_ADDR, RLC_GPM_UCODE_ADDR, RLC_CNTL, CP_RB0_CNTL, CP_RB0_WPTR)
STEP50x3480, 0x3483, 0x34840x3480-0x3489 (SDMA0 gfx ring)
STEP60xc200, 0x3247, 0x324f, 0x3256, 0x326c0xc200, 0x3247-0x326c (review the queue-select step first, see STEP6)

Changes from the first version of these files

Not verified (do not run blind)

Register indices are from native/kernel/gpu/amd_gpu_regs.h. Every STEP index was checked against that header on 2026-10-19; the STEP2/3/4/5/6 byte offsets match except where noted.