Pyhwloc
Python bindings for hwloc
Install / Use
/learn @open-mpi/PyhwlocREADME
################################################################### Python Interface for the Portable Hardware Locality (hwloc) Library ###################################################################
Documentation <https://pyhwloc.readthedocs.io/>__Official site <https://www.open-mpi.org/projects/hwloc/>__ of the hwloc library.GitHub repository <https://github.com/open-mpi/hwloc>__ of the hwloc library.
Quick Start Example
.. code-block:: python
from pyhwloc import from_this_system
# Create and load system topology
with from_this_system() as topo:
# Get basic system information
n_cores = topo.n_cores()
n_numa = topo.n_numa_nodes()
print(f"System has {n_cores} CPU cores")
print(f"System has {n_numa} NUMA nodes")
# Get the current CPU binding
cpuset = topo.get_cpubind()
print(f"Current CPU binding: {cpuset}")
Install
.. code-block:: sh
pip install pyhwloc
Supported platforms:
- Linux distributions, tested with latest Ubuntu LTS.
- Latest Windows.
The binaries on PyPI have optional support for CUDA 13 plugins.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
