Skip to content

pgpu

A terminal: GPU jobs are queued with pgpu run, and pgpu status shows the ones holding the GPU’s lanes, how busy the card is, and each waiting job with why it waits; when a running job ends, the next one takes its lane.

pgpu shares one GPU between jobs on a Linux machine with an AMD GPU, part of PITO MD. Put pgpu run -- in front of a GPU command: it waits for a lane, runs, and hands the card on the moment it ends. Renders, tests, benchmarks and searches from many terminals, scripts and agent sessions take turns instead of fighting over the card, and the card stays busy.

  • 2.1 ms to start a job through pgpu, 5.7 ms to hand a lane to the next job, 1.4 ms for pgpu status.
  • One 2.0 MB binary, 770 KB to download, no daemon: the queue is a folder of tickets, and every pgpu call does its share.
  • 5 direct dependencies (clap, anstream, anstyle, humantime, libc), 10,482 lines of Rust, a clean release build in 11.2 s.
  • 3.5 MB of memory for each job’s waiting wrapper.