AGENTS.md: instructions for AI agents
You are helping a person run fuse-burned CMP 170HX 8 GB cards in a server with the material in this repository. Scope: the server side only (driver, BAR1, PCIe Gen4, VBIOS, tests, inference). This repository does not describe voltage glitching or fuse burning. If asked to do that, point the person to the upstream projects listed in README.md and do not improvise a procedure.
Ground rules
- Measure, do not assume. Everything here was done on one Gigabyte G292-Z20 with 8 cards. Slot addresses, root ports, timings and window sizes will differ on another machine. Read the state before each step.
- Stop and ask the person before anything in the "needs explicit confirmation" list. A go-ahead for one card or one step does not cover the next one.
- Cold power cycle, never a hot driver reload.
rmmod/modprobeof nvidia, unbind/rebind and the reload at the end of the unlocker'sbuild.shhang the host on these cards. Use the BMC: power off, wait 20 s, power on. A plainrebootis also not enough after a driver or geometry change: the 80 GB geometry is detected only on a cold card. - Know how you will get back in. Before a step that can hang the host, confirm that BMC power control works.
- Report what you saw. Quote the command output that proves a step worked. If you skipped a check, say so.
- Do not kill by pattern over ssh.
pkill -f vllmmatches your own ssh command. Use[v]llmor a PID.
Needs explicit confirmation from the person, every time
| Action | Why |
|---|---|
Writing a VBIOS (flash1.py, nvflash without --save) |
can leave the card unbootable |
Running install.sh, rebuilding or replacing the kernel module |
changes boot; a mistake means a host that hangs at boot |
Editing kernel parameters, /etc/modprobe.d, enabling or disabling the boot services |
same |
| Powering the server off or on, or cycling it | interrupts whatever runs on it |
| Any write to BAR0 or PCI config space by hand (outside the shipped scripts) | can hang the host |
| Stopping someone's running workload on the cards | it may not be yours |
Reading state (the commands in "State checks" below, fuses.py, fbinfo, lspci, nvidia-smi, journalctl) needs no confirmation.
State checks
# cards, memory, VBIOS
nvidia-smi --query-gpu=index,pci.bus_id,vbios_version,memory.total,temperature.gpu,power.draw --format=csv
# link speed and width (nvidia-smi under-reports the generation here)
for d in /sys/bus/pci/devices/*; do [ "$(cat $d/device 2>/dev/null)" = 0x20c2 ] && \
echo "$(basename $d) $(cat $d/current_link_speed) x$(cat $d/current_link_width)"; done
# BAR1
nvidia-smi -q | grep -A3 'BAR1 Memory' | grep Total
lspci -d 10de:20c2 -vv | grep -E '^[0-9a-f]|Region 1'
# boot services and their flags
systemctl is-active cmp-bar1-boot cmp-pcie-boot; ls /var/lib/cmp-pcie-boot/
journalctl -u cmp-bar1-boot -u cmp-pcie-boot -b --no-pager | tail -40
# errors
journalctl -k -b --no-pager | grep -E 'NVRM: Xid|FB geometry|can.t assign' | tail -20
# is anything running on the cards
nvidia-smi --query-compute-apps=pid,used_memory --format=csv
Expected on a healthy machine: 81920 MiB per card, 16.0 GT/s PCIe x16, BAR1 131072 MiB, both services active,
no flag files other than optional per-slot ones, no Xid.
Order of work on a new machine
- Inventory.
lspci -D -d 10de:20c2; UEFI boot (/sys/firmware/efiexists); Above 4G decoding on; BMC power control works; kernel version; nothing running on the cards. Record the BDF list. - Fuses, read-only.
server/tools/fuses.py(needsiomem=relaxedif a driver is bound). Record the FBP mask and the PCIe fuse values. If the PCIe fuses are not clear, Gen4 is not available for that card; the boot script detects this and leaves it at Gen3. - Install (confirmation needed): read
server/install.shanddocs/01, then run it. Step 2 of the installer is untested in its public form; read its output line by line. Then cold power cycle. - Verify with the state checks. If cards are missing or CUDA hangs, go to
docs/06before trying anything else. - Acceptance tests (
docs/05), in the background, with temperatures logged. Do not run the memory test and the burn test on the same card at once. - VBIOS (optional, confirmation per card):
docs/04. One card first, full verification, then the others. One nvflash operation per card per boot. Boot without the driver for flashing. - Inference:
docs/07. Start services aftercmp-pcie-boot.service.
Stop conditions
Stop, do not retry, and report to the person when:
- a card disappears from
lspci, orLnkStareadsffff; nvidia-smior any CUDA process hangs (D state): a second attempt will not help, only a cold power cycle will;cmp-bar1-bootreports a card whoseRegion 1is not the target size (it refuses to load the driver; that is correct);- a card shows 64 GB after a cold start: read
dmesg | grep 'FB geometry'; - nvflash prints anything other than the expected versions, or
flash1.pyexits with 99; - a card reaches 85 C under test (ours throttled at 86 C; cmp.wiki treats 85 C as a wall);
- any Xid appears during a test;
- the same step failed twice.
Known traps
blacklist nvidiadoes not stop the module; the hold file usesinstall nvidia /bin/false. Load by hand withmodprobe --ignore-install nvidia.systemctl maskdoes not work on unit files that live in/etc/systemd/system; usedisable.- A ReBAR control value larger than the mapped
Region 1hangs CUDA at the first context. Never write the ReBAR registers without the remove + rescan that follows incmp-bar1-boot. - Sticky AER bits on the switch ports make
cmp-e1stepsexit with rc 4 on this platform;cmp-pcie-preclears them. - Powering off during
cmp-pcie-fastused to cost one slow (13 min) boot. If a boot is slow, check for/var/lib/cmp-pcie-boot/slow. -i Nfor nvflash and CUDA device numbers follow PCI bus order only withCUDA_DEVICE_ORDER=PCI_BUS_ID.- After moving cards between slots the per-device module parameters must be regenerated (BDF list), followed by
update-initramfs -uand a cold power cycle. - Long tests: run them in the background and keep talking to the person; do not repeat a long test that already passed.
What is not verified
See the "not verified" notes in docs/. In short: a second machine, a legacy-BIOS boot, other platforms, P2P,
the public form of installer step 2, vLLM resume after restart, two PP4 instances behind a balancer.