All pages
Install
One command installs the newest release into ~/.local/bin:
curl -fsSL https://sx.041.io/install.sh | shThe script picks the binary for this machine, verifies its SHA-256 checksum, and prints the version it installed. Then:
$ sexpgpu --version
sexpgpu 0.1.0A published binary sends one anonymous usage event after each command; usage analytics says what it holds and how to turn it off.
Platforms
| platform | binary | devices |
|---|---|---|
macOS on Apple silicon, darwin-arm64 | the Metal build | cpu, metal |
Linux x86_64, linux-x86_64 | the CUDA build and the ROCm build, glibc 2.28 or newer | cpu, cuda, rocm |
Linux aarch64, linux-aarch64 | the CUDA build, glibc 2.28 or newer | cpu, cuda |
Every binary runs the CPU backend and reference interpreter, plus every verb
that needs no GPU; --device cuda also needs the
CUDA libraries, and --device rocm the
ROCm libraries. A shell under Rosetta on an Apple silicon Mac
still gets the arm64 binary. Intel Macs and other systems have no published
binary.
On Linux x86_64 the script installs two files side by side: sexpgpu, the CUDA
build, and sexpgpu-rocm, the ROCm build. You run sexpgpu; it hands a command
to sexpgpu-rocm when --device or SEXPGPU_DEVICE names rocm, or when the
command names no device on a machine with an AMD GPU and no NVIDIA one. A
command that names no device still runs on cpu; on that machine it is the ROCm
build that answers, so sexpgpu doctor reports the AMD GPU.
Choosing a version and a directory
| variable | default | meaning |
|---|---|---|
SEXPGPU_VERSION | latest | latest, the newest stable release; nightly, the newest nightly build; or an exact version such as 0.1.0 |
SEXPGPU_INSTALL_DIR | ~/.local/bin | the directory sexpgpu is written to, replacing the file there |
SEXPGPU_PLATFORM | this machine's | another platform, such as linux-x86_64 for a Mac's bundle; see below |
curl -fsSL https://sx.041.io/install.sh | SEXPGPU_VERSION=nightly sh
curl -fsSL https://sx.041.io/install.sh | SEXPGPU_INSTALL_DIR=/opt/bin shSEXPGPU_PLATFORM installs one file, sexpgpu. linux-x86_64 is the CUDA
build alone, and removes a sexpgpu-rocm already in the directory;
linux-x86_64-rocm is the ROCm build alone, as sexpgpu, for a bundle or a
container that runs only on AMD GPUs.
When the sexpgpu your shell finds is not the file the script wrote, the script
says so. Put the directory first on PATH, in ~/.zshrc or ~/.bashrc:
export PATH="$HOME/.local/bin:$PATH"Updating
sexpgpu update # the newest release of this binary's channel
sexpgpu update --check # only say whether there is one
sexpgpu update --channel nightly # move to nightlies; --channel stable moves backA nightly binary follows the nightlies; a stable one follows stable releases.
When the channel's newest version is this binary's own, update says so and
changes nothing. Otherwise it downloads the binary for this platform, verifies
its checksum, and renames it over the running executable, through any symlink:
$ sexpgpu update
updated /home/me/.local/bin/sexpgpu: 0.1.0 -> 0.2.0On Linux x86_64 the CUDA build updates sexpgpu-rocm beside it too, first, to
the same version: it installs it when it is missing and the release has one, and
removes it when the release has none. A ROCm build installed alone as sexpgpu
updates to the ROCm build.
A download that receives nothing for 30 seconds is asked again, from where it
stopped, three times before update fails. A checksum that does not match
leaves the old binary in place. update needs write access to the binary's
directory; without it, make the directory writable or reinstall with the script
into one you own.
Automatic updates
Installed binaries check for updates in the background at most once every six hours, following their stable or nightly channel. Downloads must match their SHA-256 before replacing the binary. The check starts only after a command has finished, so a running command, a long training run included, keeps the version it started with; later commands use the new one. An offline machine keeps its installed version without changing command output or exit status.
The binary in a bundle updates the same way: a bundle's run.sh
leaves the switches below as the machine sets them, and
sexpgpu rrun sends them to the job as they are set
where it is launched. A later ./run.sh --resume latest from the same directory
may then run a newer version than the one that started the run; a version reads
the checkpoints earlier ones wrote (resume). The update
runs in a detached worker that can outlive its command, so it inherits none of
the command's credentials: only PATH, HOME, TMPDIR, the locale,
XDG_STATE_HOME, XDG_CACHE_HOME, the proxy variables and
SSL_CERT_FILE/SSL_CERT_DIR.
Set O41_AUTO_UPDATE=0 to disable automatic updates for all 041 CLIs, or
SEXPGPU_AUTO_UPDATE=0 for SexpGPU. CI (any CI variable) skips automatic
updates. sexpgpu update still works when automatic updates are disabled. A
binary installed at an exact SEXPGPU_VERSION updates too; to keep it at that
version, set SEXPGPU_AUTO_UPDATE=0 where it runs.
Uninstalling
Delete the file, rm ~/.local/bin/sexpgpu, and on Linux x86_64
~/.local/bin/sexpgpu-rocm. With no update running, also remove
~/.local/bin/.sexpgpu-update.lock if present. The binaries it downloaded, for
bundles and other versions, are under ~/.cache/sexpgpu, and the usage id under
~/.local/state/sexpgpu; delete those too to leave nothing.
What a machine needs
The binary needs no Python and no toolchain; a GPU run needs only the GPU's libraries.
| to | the machine needs |
|---|---|
check, explain, fmt and every authoring verb | nothing; any machine the binary runs on |
run --device cpu, the host backend | nothing; see devices |
run --device reference, the interpreter | nothing; small reference sizes, see devices |
run --device metal | an Apple silicon Mac with macOS 12 or newer; see Metal |
run --device cuda | a CUDA 13 driver (580 series or newer), an Ampere or newer GPU (A100, L4, H100) and the CUDA libraries |
run --device rocm | the ROCm build, an AMD Instinct GPU (MI250X, MI300X) and ROCm 7.2's libraries |
CUDA libraries
The driver is not enough: a CUDA run loads CUDA 13's libraries when it opens the device. A remote job installs them before it runs when its image lacks them (bundle); on your own Linux machine, install them once.
| library | file | a run without it |
|---|---|---|
| cuBLAS, cuBLASLt | libcublas.so.13, libcublasLt.so.13 | stops before the device opens |
| NVRTC | libnvrtc.so.13 | stops before the device opens |
| cuDNN 9 | libcudnn.so, then libcudnn.so.9 | runs; the work cuDNN would do takes another path. The unversioned link is loaded first: where it is cuDNN 8's (libcudnn8-dev), a run loads cuDNN 8, its attention takes the other path, and doctor and the lowering report say so |
| NCCL | libnccl.so.2 or libnccl.so | runs on one GPU; over several GPUs or nodes it stops before they start. On Ubuntu it comes with libnccl2, and NVIDIA's CUDA 13 runtime images have it |
sudo pacman -S cuda cudnn # Arch; nccl for several GPUs
sudo apt install libcublas-13-0 cuda-nvrtc-13-0 libcudnn9-cuda-13 # Ubuntu, NVIDIA's CUDA repository; libnccl2 for several GPUsA run that cannot load one names it. Libraries outside the loader's search path
need their directory on LD_LIBRARY_PATH. The full CUDA requirements are in
devices.
ROCm libraries
A ROCm run loads ROCm 7.2's libraries when it opens the device, from the
loader's search path and then from $ROCM_PATH/lib, /opt/rocm/lib when
ROCM_PATH is unset. A ROCm installation or a ROCm 7.2 container image carries
all four.
| library | file | a run without it |
|---|---|---|
| HIP runtime | libamdhip64.so | stops before the device opens |
| HIPRTC | libhiprtc.so | stops before the device opens |
| rocBLAS | librocblas.so | stops before the device opens |
| RCCL | librccl.so | runs on one GPU; over several GPUs or nodes it stops before they start |
The full ROCm requirements are in devices.
Check the machine
sexpgpu doctordoctor prints one line per thing (the binary, the GPU and its driver and
compute-capability floor, each CUDA library with its version or none, or on an
AMD GPU the GPU and its architecture, the environment, credentials, disk) and
exits 1 for the configurations that stop a run before its first step. A failed
floor is printed but does not change the exit code; read the floor line. See
doctor.
Next: the quickstart.