Skip to main content

Module system

Module system 

Source
Expand description

Cross-platform system detection (CPU, RAM, OS, Docker, GPU).

Structs§

GpuInfo
One GPU’s identity, capability and VRAM.

Enums§

GpuVendor
Which GPU stack a device belongs to.

Functions§

arch_dir_name
Convert a ;-separated arch list into a variant directory name. Shared by the libtorch and NCCL source builders so their variant paths cannot drift.
cpu_model
cpu_threads
detect_gpus
Enumerate every installed GPU, ignoring visibility masks. Shorthand for survey when the caller does not need the findings.
docker_version
escape_json
Escape a string for embedding in a JSON string literal. Complete per RFC 8259: backslash, quote, and every control char below 0x20. The hand-rolled predecessors missed \t / \r — one control character in a GPU name or mount path produced invalid JSON, which broke cluster probe fan-in.
has_cargo
Check whether cargo is available on the host.
has_command
Check whether a command exists on PATH.
is_inside_docker
nvidia_driver_version
NVIDIA driver version string, or None when nvidia-smi is absent or errors.
os_version
platform_tag
Platform string for download URLs (e.g. “linux-x86_64”, “macos-arm64”).
ram_total_gb