interplane.Get Omega
Read in your language

omega-harness

Agent skills for operating, encoding and communicating in Omega (.om) and the AIEN repositories

Brought by drakestapleton

branch main Branches Tags History

omega-harness / skills / nvidia-gb10 / SKILL.md

372 lines · 33252 bytes Raw Blame History Source

name: nvidia-gb10 description: Load before touching the NVIDIA GPU in Drake's DGX Spark (the GB10 chip). Covers running or benchmarking a model on the Spark GPU, the shared model service, the chip lock and timing windows, NVIDIA driver debugging, writing kernels for the chip, and the mistakes already made there.


NVIDIA GB10 (the Spark's GPU): how to work on it without repeating old mistakes

Researched 2026-11-14 (Spark clock 2026-11-15T01:54Z) from our own records, plus NVIDIA's documentation fetched through Context7 the same day (section 12). Every line carries a source. Sources: RULES = the agent instruction file installed on the Spark from this repository's rules/rules.txt plus the machine's local overlay (generated, binding, newer than anything here); BOARD <time> = a line of HANDOFFS/BOARD.md on the Spark; Lnnn = an entry of ledger list all on the Spark; cortex <id> = cortex_get <id>; TEAM-MEMORY:n = line n of HANDOFFS/TEAM-MEMORY.md. Machine-local places are named, not spelled out; the Spark's local configuration says where each one is: HANDOFFS = the team's shared handoff folder (board, team memory, evidence); BIN = the operator's local tool folder; STATE = the operator's local state folder; DOCS = the offline vendor manuals; YARDSTICKS = the timing windows and receipts folder; MODEL_PORT = the local port of the shared model service. The Spark's local overlay of RULES spells out the real folders and port that HANDOFFS, BIN, STATE, DOCS and MODEL_PORT stand for; the header of spark-receipt names YARDSTICKS. Substitute the real values from there before running a command below. Numbers are quoted from those records with their dates. Nothing here was re-measured. If a record and this file disagree, the record wins. Section 11 lists what the records themselves disagree on.

1. What the hardware is

2. Binding rules that govern GPU use (read RULES; this is only an index)

3. Before you touch the chip

  1. Look: spark-window status, nvidia-smi --query-compute-apps=pid,name,used_memory --format=csv, ps, and the last 40 lines of HANDOFFS/BOARD.md. [RULES "Play well together"] BOARD.md is about 3 MB: always tail it or grep ... | cut -c1-600.
  2. If a current CLAIM, START or RESERVED line names the chip or MODEL_PORT, wait or settle it on the board.
  3. Post one board line before you start (what, how long, how to reach or pause you) and a RELEASE or DONE line after: echo "$(date -u +%FT%H:%MZ) CLAIM <lane> to all: ..." >> HANDOFFS/BOARD.md. [RULES "Team board"]
  4. The chip lock is the file /tmp/aien-gb10.lock (flock). Take it through spark-window, not by hand, when timing. spark-window locks gb10 shows holders and queue. [BIN/spark-window header]
  5. Check memory before any load (section 5).
  6. CPU-side work during someone's timing window: run under the queen pool locks (HANDOFFS/hive/queen/pool-*.lock, flock), taskset, nice 10, and post pid/pgid so the timing lane can SIGSTOP and SIGCONT you. [cortex omp-learn-0bcfaab846d0e636]

spark-window usage (from its header, read 2026-11-14; do not paraphrase from memory, run sed -n 1,60p on it):

Automatic actors you will meet:

4. The shared model on port MODEL_PORT

5. Memory: one pool, and MemAvailable lies

6. Measuring speed correctly

7. Known traps (symptom; cause; fix; source)

  1. Host-polled completion marker arrives about 1.06 s late or never (marker2_wait word=0x0); the marker memory was GPU-cacheable system memory, which NVIDIA's nvos.h says is not coherent with CPU mappings; allocate poll and marker memory with nvrm_alloc_gpu_uncached. [cortex d03a999a-1d55-4875-83d1-ba277daae049, a4f2b40e-5327-410c-8763-d38cac94202b]
  2. GPU re-executes old commands or never reports the next job; CPU-rewritten, GPU-read memory (GPFIFO/USERD, pushbuffers, pools) was GPU-cacheable; make it GPU-uncached, or use NVIDIA's flush and invalidate sequence. Regression test: physics nvrm/submission_visibility_gates.c. [cortex d116ecf9-6d98-439e-880b-8a721d77cf46]
  3. Decode slow (GEMV 153 of 273 GB/s) after "uncache everything"; chip-only intermediates were uncached, so every read went to DRAM; keep host-touched regions uncached and chip-only intermediates cached (153 to about 207 GB/s, 2026-10-19). Caching weights gave no gain. [cortex 015433e3-f08c-43f6-a666-adf4fd1ca630]
  4. Resident GPU program unreliable; fix was four rules: scoreboard every control word, uncached poll memory, regcount >= used + 2 (top 2 registers reserved), MEMBAR.SC.SYS before the tail store. [cortex 1d867912-a365-4af3-948d-74055e7bfef1]
  5. NV_ERR_TIMEOUT ... STOP_CHANNEL jams (158 on 2026-09-28); our own tests were killed mid-run and the resident seat kept spinning; never kill, force-stop or timeout a chip test with a resident seat, run it detached, one GPU test at a time. [cortex d601e9b6-c4e7-4076-b2f9-9c6af933c604]
  6. New GPU client fails at channel create with status 81 (0x51 NV_ERR_NO_MEMORY) while tens of GB are free; the driver wants one contiguous block and /proc/buddyinfo shows 0 free order-9 blocks; read MemFree and buddyinfo, not MemAvailable. What cleared it on 2026-11-12, run with root privileges: sync, then sysctl vm.drop_caches=2, then sysctl vm.compact_memory=1 (see section 11 before using). [cortex 13b21036-23ea-497f-956a-9b12f476ead4, 45a41b22-bf26-4013-848f-1c2fb21156a9]
  7. A gate inside the judge sat 83 minutes in flock -x; it re-opened the lock its own parent held; use physics tests/gb10_lock.sh (walks ancestors), honour AIEN_GB10_LOCK_HELD=1; to unstick, kill only the waiting flock, never the holder. [cortex f92b85a0-7c59-4ad6-b12f-14b9af1401f2]
  8. Server answers 503 "GPU lock held" forever while sweeps run; its non-blocking poll never wins against queued flock(1) waiters; queued blocking acquire fixed the 27B door (2026-10-19). [cortex 53b7935d-e09a-404e-872b-bf92950945c1]
  9. Builds stall for 25 min behind a measurement; quiet-measure flock /tmp/aien-gb10.lock CMD took the quiet lock first then queued for the chip; lock order is chip first, then quiet. The fix was recorded as not yet installed. [cortex 7c23b9f3-1cf9-4ebe-a1ad-07da3d83c94c]
  10. Kernel refuses or misbehaves above 32 KiB shared memory; QMD word 36 was a constant; it is now written per launch, code cap 65536 bytes. Treat any such constant as unproven until a chip gate has run above it. [cortex e10e9c85-a431-4f9b-81cc-8089b1c247ac, omp-learn-6ef9994f2b45d5ef]
  11. Hand-written cubin rejected by cuModuleLoadData (error 200) on sm_121; it lacks the .nv.capmerc and .nv.merc.* sections. [cortex omp-learn-73e93cda4e7f6b89, 2026-10-23]
  12. A "native" harness secretly linked libcuda (M16, failed audit); prove independence with ldd, nm -u and /proc/PID/maps. [cortex 77d59ce6-40d7-4991-8e6a-f72cd34f2340]
  13. Outputs left unwritten after completion was signalled (about 1 in 2,800 launches, marked UNVERIFIED in the record); a 200 ms host delay cut 781/6000 to 2/6000; full cause unresolved. [cortex a667cbb7-dd17-44f5-a7ce-085d3d3ab9f7]
  14. Power: on 2026-11-08 a sustained full-GPU load hit an 85 W hard stop 3 times in 5 min (peak 87 W); notes from that workload's authors say some Sparks power off at sustained 88 to 92 W. Changing clocks (nvidia-smi -lgc) is Drake's call; the standing brief was stock clocks and power limits only. [BOARD 2026-11-08T23:37:31Z, 2026-11-09T01:46:45Z]
  15. NVRM "Out of memory" retry lines without an Xid can appear in the kernel log on a run that still finishes rc 0 with correct numbers. [BOARD 2026-11-14T19:33:26Z]
  16. A long job launched over ssh hangs; use nohup setsid ... </dev/null >log 2>&1 &. [cortex omp-learn-0bcfaab846d0e636]
  17. Own-driver (aien_gpu.ko) Stage B stops immediately on a warm Spark (mmio_us=230, polls=0,0,0,0, gsp_mb0=0x80000000) and reloading nvidia.ko then fails (`ksec2PollForCanSend_IMPL: Timed out waiting for SEC2 command queue to be empty, 0x110094=0xbadf4100); unloading nvidia.ko` leaves GSP suspended (LIBOS_INTERRUPT_PROCESSOR_SUSPENDED), and SEC2 only cold-starts GSP once per reset; never hot-swap aien_gpu onto a warm nvidia-booted Spark — own-driver GSP boot requires a cold boot with nvidia blacklisted (Window 0) and explicit operator approval for the restart. Also stop aien-run-spark-sensors.service beside nvidia-persistenced if unloading nvidia*, or rmmod returns EBUSY. [BOARD 2026-11-18T23:08:51Z, 23:17:45Z, 23:18:38Z]
  18. Sysfs PCIe FLR (echo 1 > /sys/bus/pci/devices/000f:01:00.0/reset) drops SSH and forces a full SoC reboot (~60 s) instead of resetting only the GPU; PDB_PROP_GPU_TRIGGER_PCIE_FLR is GB10B-only (NV_FALSE on GB20B, open-gpu-kernel-modules 580.173.02 g_gpu_nvoc.c); never use sysfs FLR as a non-reboot recovery or hand-back step on the Spark. [BOARD 2026-11-18T23:17:45Z, 23:42:35Z]
  19. Driver patches, built .ko modules, staged GSP packages, and live logs disappear after a GPU swap/reboot; they were staged under /tmp; always stage driver checkouts, built modules, firmware packages, .om binaries, and checksum manifests in persistent storage and write live logs into HANDOFFS before any module swap or reboot. [BOARD 2026-11-18T23:17:45Z]
  20. Cold-boot Stage B fails at stage=7 (polls=0,0,0,1, hwcfg2=0xbadf4100, gsp_mb0=0xbadf4100) even with NO_NVIDIA_LOADED; the driver used GB10B HALs (SEC2 MAILBOX0 poll, COTv1, GB10B images, .fwsignature_gb10y) on a GB20B die (BOOT_42=0x1bba1000), and step 8 mistook PRI target-mask lockdown (0xbadf4100) for lockdown release; port every HAL to GB20B (see ./references/gb20b-gsp-boot.md) before spending a Window 0 reboot. [HANDOFFS/L332/window0-20261118T234217Z; BOARD 2026-11-18T23:44:02Z, 23:51Z]

8. What we do not use

9. Where evidence goes

10. What needs Drake

11. Where the records disagree or are unconfirmed

12. NVIDIA's own documentation (fetch it, never recall it)

Do not answer a vendor question from memory. Fetch the current page through Context7 (MCP server context7; without the tools: curl -G https://context7.com/api/v1/<id> --data-urlencode type=txt --data-urlencode topic=...) and quote the source URL. Library ids checked 2026-11-14:

What those pages say that matters here (fetched 2026-11-14, each from the URL named):

13. Own-driver (aien-gpu) GB20B boot checklist

Before editing aien-gpu or scheduling a Window 0 cold boot on the Spark, read gb20b-gsp-boot.md. For the 4x-verified bit-for-bit structure of gsp_ga10x.bin (580.173.02) and firmware study hygiene rules (0700 local-only, zero repo contamination), read gsp-firmware-580-173-02.md. Summary: