AMD RDNA4 over USB (ASM2464 chestnut + RX 9060 8GB): JIT graph replay hangs; page-table assertion under reduced context
Hardware: comma chestnut dock (ASM2464, custom firmware ed4e39b7-CLEAN, USB3 10Gbps link) + AMD RX 9060 8GB (RDNA4/gfx12), Apple M5 Max, macOS 26.6.2, Python 3.14.5, tinygrad 017d51bb.
Working baseline: DEV=AMD device opens, PCIe Gen3 x2 up, matmuls correct vs CPU (max abs diff 6.1e-4 at fp32). Qwen3.5-4B Q4_K_M (tinygrad.llm, BEAM=2) is fast and stable: 14.1 tok/s, clean 20-token benchmark, default JIT.
Bug: Qwen3.5-9B Q4_K_M (5.68GB weights, 5.9GB VRAM at max_context 4096) generates at ~19.9 tok/s with BEAM=2-tuned kernels, then hangs deterministically after ~10-12 tokens — right where JIT batched graph replay kicks in. A 30s synchronize timeout fires, then "Device hang detected"; the SMU stops answering (SMU msg 0x1a timeout in fini/set_clocks). Reproduced on consecutive runs at the same token position.
Isolation matrix (all BEAM=2, same cache):
- JIT=0: 40/40 tokens, zero errors (~11.7 s/tok) — tuned kernels are not the cause
- JIT=2 (no graphs): 40/40 tokens, zero errors (~10 s/tok)
- JIT_BATCH_SIZE=16 and 64: both hang like default (KeyError: 'CPU' in hcq2 synchronize during teardown after the hang)
- --max_context 1024 (VRAM-pressure test): different failure — AssertionError: Not allowed to create new page table (AM memory manager)
Also seen twice: device hang mid-BEAM-search on 9B-sized kernels, wedging the SMU until device reopen.
Repro: DEV=AMD BEAM=2 python -m tinygrad.llm -m qwen3.5:9b --benchmark 40 (macOS extras: LLVM_PATH=/opt/homebrew/opt/llvm@22/lib/libLLVM.dylib; note the pip wheel omits tinygrad/llm/kernels, copied from source. llvm@22 also isn't in the autogen search list.)
Happy to run diagnostics on request — full logs of every configuration above are saved. The 4B/9B asymmetry (3.2GB vs 5.9GB VRAM) plus the page-table assertion suggests graph replay under high VRAM pressure on this transport.
Related: #17780 (also chestnut + tinygrad.llm, but a different failure: server startup crashes on RDNA3 from two qwen-3.8 commits — no hang, no page-table assert).
Source: tinygrad/tinygrad