#cpu-gpu #cpu-memory #devices #system-info #query #querying #back-end

memonitor

Query CPU and GPU memory information in a portable way

7 releases

0.2.4 Apr 11, 2024
0.2.3 Apr 8, 2024
0.1.1 Mar 8, 2024

#525 in Hardware support

Download history 54/week @ 2024-07-29 19/week @ 2024-09-23

433 downloads per month

Apache-2.0

2.5MB
7.5K SLoC

C 4K SLoC // 0.0% comments Python 3K SLoC // 0.3% comments Rust 682 SLoC // 0.0% comments Shell 72 SLoC AsciiDoc 5 SLoC

memonitor

License Documentation Crate


Memonitor is a lightweight library that allows querying information from various CPU and GPU devices. The main purpose is the ability to query memory related information, like how much local memory a device has and how much is currently available to be allocated.

This is achieved by dynamically loading, if present, various device APIs found in the system, and querying them directly. At the moment, the following backends are supported:

  • sysinfo (CPU only)
  • Vulkan
  • CUDA (NVIDIA devices only)
  • Metal (macOS only) (planned #2)

Platforms

  • Linux
  • Windows
  • macOS

Dependencies

  • Clang
  • CMake

Dependencies

~1–26MB
~384K SLoC