![]() _device.RaplUncoreDomain : integrated GPU (specify the socket id in parameter)._device.RaplDramDomain : RAM (specify the socket id in parameter)._device.RaplPackageDomain : CPU (specify the socket id in parameter).You can append the following domain list to monitor them : nvidia_device import NvidiaGPUDomain measure_energy( domains =) def foo(): rapl_device import RaplPackageDomain from pyJoules. energy_meter import measure_energy from pyJoules. You can easily configure which device to monitor using the parameters of the measureit decorator.įor example, the following example only monitors the CPU power consumption on the CPU socket 1 and the Nvidia GPU 0.īy default, pyJoules monitors all the available devices of the CPU sockets.įrom pyJoules. Rapl domain are described here Configure the decorator specifying the device to monitor device_name: power consumption of the device device_name in uJįor cpu and ram devices, device_name match the RAPL domain described on the image below plus the CPU socket id.tag: tag of the measure, if nothing is specified, this will be the function name.begin timestamp : monitored function launching time.Output descriptionĭecorator basic usage will print iformation with this format :īegin timestamp : XXX tag : YYY duration : ZZZ device_name: AAAA This will print on the console the recorded energy consumption of all the monitorable devices during the execution of function foo. energy_meter import measure_energy measure_energy def foo(): To measure the energy consumed by the machine during the execution of the function foo() run the following code:įrom pyJoules. Decorate a function to measure its energy consumption This will give the closest measure to the real energy consumption of the measured code. That is why we recommend to eliminate any extra programs that may alter the energy consumption of the machine hosting experiments and to keep only the code under measurement ( i.e., no extra applications, such as graphical interface, background running task.). This includes the global energy consumption of all the process running on the machine during this period, thus including the operating system and other applications. Please note that the reported energy consumption is not only the energy consumption of the code you are running. For more in depth description, read the documentation here This Readme describe basic usage of pyJoules. If you want to use pyJoule to also measure nvidia GPU energy consumption, you have to install it with nvidia driver support using this command : pip install pyJoules. You can install pyJoules with pip: pip install pyJoules Pyjoule will return null values if the measurement period is to short. Thus, you can't use Pyjoule to measure energy consumption during a period shorter than the device energy measurement frequency. Theses tools have a mesasurement frequency that depend of the device. PyJoule use hardware measurement tools (intel RAPL, nvidia GPU tools. However, if a counter overflows twice during a single energy measurement, the reported energy will be max_energy_range_uj less than the expected value. PyJoules takes this into account and adds the counter's maximum possible value, max_energy_range_uj, to negative energy measurements. RAPL energy counters overflow after several minutes or hours, potentially causing false-negative energy readings. We are working on Mac support Known issues Only GNU/Linux support is available for the moment. The energy measurement API is only available on nvidia GPU with Volta architecture(2018) Windows and MacOS PyJoules uses the nvidia " Nvidia Management Library" technology to measure energy consumption of nvidia devices. This technology is available on Intel CPU since the Sandy Bridge generation(2010). PyJoules uses the Intel " Running Average Power Limit" (RAPL) technology that estimates power consumption of the CPU, ram and integrated GPU. intel integrated GPU (for client architectures).It monitors the energy consumed by specific device of the host machine such as : PyJoules is a software toolkit to measure the energy footprint of a host machine along the execution of a piece of Python code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |