Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 818 Bytes

nvidia_gpu.rst

File metadata and controls

17 lines (12 loc) · 818 Bytes

Nvidia GPU

pyJoules uses the nvidia "Nvidia Management Library" technology to measure energy consumption of nvidia devices. The energy measurement API is only available on nvidia GPU with Volta architecture (2018)

Usage

To configure your function decorator, context manager or energy meter to measure the energy consumption of a GPU, pass as domain attribute a list of instance of pyJoules.device.rapl_device.NvidiaGPUDomain.

For example, if you want to configure a context manager to measure the energy consumed by the gpu of id 0 follow this example :

from pyJoules.device.nvidia_device import NvidiaGPUDomain
with EnergyContext(domains=[NvidiaGPUDomain(0)):
    foo()