#cpu-gpu #devices #memory #information #back-end #query #querying

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

#403 in Hardware support

Download history 135/week @ 2024-03-02 124/week @ 2024-03-09 6/week @ 2024-03-16 372/week @ 2024-03-30 239/week @ 2024-04-06

624 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–30MB
~402K SLoC