Skip to main content

Module system

Module system 

Source
Expand description

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

Structs§

GpuInfo

Functions§

arch_dir_name
Convert a ;-separated CUDA capability list into a variant directory name: "6.1;12.0" -> "sm61-sm120", "12.0" -> "sm120". Shared by the libtorch and NCCL source builders so their variant paths cannot drift.
cpu_model
cpu_threads
detect_gpus
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
os_version
platform_tag
Platform string for download URLs (e.g. “linux-x86_64”, “macos-arm64”).
ram_total_gb