sysinfo#
System information helpers.
Module Attributes
Intel PCI device IDs that are not useful compute targets. |
Functions
Discover Intel GPUs on this machine. |
|
|
Get the device name for a PCI address. |
Get the git describe hash for the current repo state. |
|
Get the Intel icpx compiler version string if available. |
|
Get the Intel IGC revision string if available. |
|
Get the CPU model name from /proc/cpuinfo. |
|
Get the Intel NEO revision string if available. |
|
Get the CUDA nvcc version string if available. |
|
Get NVIDIA GPU compute capabilities from nvidia-smi. |
|
Get the first NVIDIA GPU name if present. |
|
Get the OpenCL driver version string if available. |
|
Get the installed torch version without importing it. |
|
Get the total amount of system memory in kB from /proc/meminfo. |
|
Get system info for the current worker. |
|
Pick the Intel GPU to target on a machine that has more than one, prefering discrete GPU. |
- kernelfoundry.eval_pipeline.utils.sysinfo.get_intel_cpu_name()[source]#
Get the CPU model name from /proc/cpuinfo.
- Returns:
CPU model name, or an empty string if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_total_system_memory_kb() int[source]#
Get the total amount of system memory in kB from /proc/meminfo.
- Returns:
Total memory in kB (from MemTotal), or 0 if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_torch_version()[source]#
Get the installed torch version without importing it.
- Returns:
Torch version string.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_nvcc_version()[source]#
Get the CUDA nvcc version string if available.
- Returns:
nvcc version string, or an empty string if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_icpx_version()[source]#
Get the Intel icpx compiler version string if available.
- Returns:
icpx version string, or an empty string if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_ocl_driver_version()[source]#
Get the OpenCL driver version string if available.
- Returns:
OpenCL driver version string, or an empty string if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_neo_revision()[source]#
Get the Intel NEO revision string if available.
- Returns:
Intel NEO revision string, or an empty string if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_igc_revision()[source]#
Get the Intel IGC revision string if available.
- Returns:
Intel IGC revision string, or an empty string if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_git_commit_hash() str | None[source]#
Get the git describe hash for the current repo state.
- Returns:
Git describe hash, or an empty string if unavailable.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.IGNORED_INTEL_DEVICE_IDS = frozenset({'0x4680'})#
Intel PCI device IDs that are not useful compute targets.
- kernelfoundry.eval_pipeline.utils.sysinfo.discover_intel_gpus() list[tuple[Path, str, str]][source]#
Discover Intel GPUs on this machine. Reads DRM devices from sysfs on Linux and the PnP database on Windows.
- kernelfoundry.eval_pipeline.utils.sysinfo.select_intel_gpu() tuple[Path, str, str] | None[source]#
Pick the Intel GPU to target on a machine that has more than one, prefering discrete GPU.
- kernelfoundry.eval_pipeline.utils.sysinfo.get_device_name_by_pci_address(pci_address: str) str[source]#
Get the device name for a PCI address.
Uses lspci on Linux and the PnP database on Windows, where lspci does not exist and the “PCI address” the discovery helpers hand out is really a PNPDeviceID.
- Parameters:
pci_address (str) – PCI address of the device (e.g., “0000:3b:00.0”), or on Windows a PNPDeviceID as returned by
discover_intel_gpus().- Returns:
Device name, or an empty string if not found.
- Return type:
- kernelfoundry.eval_pipeline.utils.sysinfo.get_nvidia_compute_capabilities() list[str][source]#
Get NVIDIA GPU compute capabilities from nvidia-smi.