Variables | |
| handle = pynvml.nvmlDeviceGetHandleByIndex(0) | |
| float | measurement_interval = 0.01 |
| int | mW_to_W = 1e3 |
| now = datetime.now() | |
| current_datetime = now.strftime("%Y%m%d %H:%M:%S.%f") | |
| float | sec = 0.01 |
| int | measure = pynvml.nvmlDeviceGetPowerUsage(handle) / mW_to_W |
================================================================================
@file: gpu_power_monitor.py
@brief: Monitors and prints real-time GPU power usage with timestamps.
@author: Mingyu Yang (yang926@yonsei.ac.kr), School of Mathematics and Computing (Computational Science and Engineering), Yonsei University
Oh-Kyoung Kwon (okkwon@kisti.re.kr), Korea Institute of Science and Technology Information
Jung-Il Choi (jic@yonsei.ac.kr), School of Mathematics and Computing (Computational Science and Engineering), Yonsei University
@date: May 2023
@version: 2.0
@copyright: Copyright (c) 2023 Mingyu Yang, Oh-Kyoung Kwon, Jung-Il Choi. All rights reserved.
@license: This project is released under the terms of the MIT License (see LICENSE file).
================================================================================
| gpu_power_monitor.current_datetime = now.strftime("%Y%m%d %H:%M:%S.%f") |
Definition at line 35 of file gpu_power_monitor.py.
| gpu_power_monitor.handle = pynvml.nvmlDeviceGetHandleByIndex(0) |
Definition at line 26 of file gpu_power_monitor.py.
Definition at line 37 of file gpu_power_monitor.py.
| float gpu_power_monitor.measurement_interval = 0.01 |
Definition at line 29 of file gpu_power_monitor.py.
| int gpu_power_monitor.mW_to_W = 1e3 |
Definition at line 30 of file gpu_power_monitor.py.
| gpu_power_monitor.now = datetime.now() |
Definition at line 34 of file gpu_power_monitor.py.
| float gpu_power_monitor.sec = 0.01 |
Definition at line 36 of file gpu_power_monitor.py.