Skip to content

Hardware

Hardware-detection functions AlgorithmEntry auto-populates its cpu_type/ram_bytes/gpu_type/cuda_version/cudnn_version fields from. See navix.benchmarks (this package's __init__.py) for the full design.

Reads the CPU's model name.

Returns:

Name Type Description
str str

/proc/cpuinfo's model name on Linux,

str

sysctl -n machdep.cpu.brand_string on macOS, or

str

platform.processor()/platform.machine() as a fallback on

str

any other platform, or if the platform-specific lookup fails.

Reads the CUDA version jaxlib is running on.

Returns:

Type Description
Optional[str]

Optional[str]: The installed nvidia-cuda-runtime-cuXX

Optional[str]

package version (the same one a pip install jaxlib[cudaXX]

Optional[str]

pins), falling back to nvidia-smi's reported CUDA version if

Optional[str]

that package isn't found. None if JAX isn't running on a

Optional[str]

GPU.

Reads the cuDNN version jaxlib is running on.

Returns:

Type Description
Optional[str]

Optional[str]: The installed nvidia-cudnn-cuXX package

Optional[str]

version (the same one a pip install jaxlib[cudaXX] pins).

Optional[str]

None if JAX isn't running on a GPU.

Reads the specific GPU model JAX is running on.

Returns:

Type Description
Optional[str]

Optional[str]: The GPU model (e.g. distinguishes an SXM from a

Optional[str]

PCIe variant of the same chip), or None if JAX isn't running

Optional[str]

on a GPU.

Reads total system RAM.

Returns:

Name Type Description
int int

Total system RAM, in bytes. POSIX-only (Linux/macOS).