Aditya Ukarande, Dr. Toygun Basaklar, Mingcong Cao, Dr. Umit Ogras
PACT offers a methodology for accurately analyzing power consumption and tracking carbon emissions of a specific hardware setup. By utilizing PACT, we can make informed decisions aimed at optimizing energy efficiency, minimizing carbon footprints, and advancing toward a greener future.
Add PACT tracker to your python script (/src/trackerPACT.py):
currentDir = os.path.dirname(os.path.realpath(__file__))
parentDir = os.path.abspath(os.path.join(currentDir, os.pardir))
sys.path.append(os.path.join(parentDir, "src"))
from trackerPACT import PACTevents_groups = [['MIGRATIONS'],['FAULTS'],['CACHE-MISSES'],['CYCLES']]
@PACT(measure_period = 1, perf_measure_period = 0.01, events_groups = events_groups, tracker_file_name = "./PACT.csv", PSU = "Corsair_1500i")
def your_function():
# your codemeasure_period: Specify the sampling period (in seconds) to measure power.perf_measure_period: Specify the sampling period (in seconds) to collect performance counter data.events_groups: Specify the performance events to monitor during execution.tracker_file_name: Specify the name of the file to store power and performance data.PSU: Specify the power supply unit being used for measurement. Current support for 'Corsair_1500i' and 'NZXT_850'.
- liquidctl: https://github.com/liquidctl/liquidctl.git
- perfmon: https://github.com/VitorRamos/performance_features.git
- pyNVML: https://pypi.org/project/pynvml/
PACT was evaluated by subjecting it to various workloads, including stress tests designed to pressure different hardware components. Additionally, state-of-the-art machine learning models from computer vision, natural language processing, and reinforcement learning were used to assess PACT's performance under real-life workload scenarios.
We stressed various hardware components using the following tools:
Idle Test
CPU, File IO, Virtual Memory (VM), and HDD Tests
- gpu-burn https://github.com/wilicc/gpu-burn
GPU Tests
Source Repository: https://github.com/kuangliu/pytorch-cifar
Applied our tracker to training script in the above repo, and collected emissions and performance metrics while training DenseNet, VGG, ResNet, and MobileNet on CIFAR10 classification task.
Source Repository: https://github.com/aminbigdeli/Text-Classification-using-Transformers
Applied our tracker to training script in the above repo, and collected emissions and performance metrics while fine-tuning bert models on SST-2 classification task.
Source Repository: https://github.com/denisyarats/pytorch_sac
Applied our tracker to training script in the above repo, and collected emissions and performance metrics while training the agent in cheetah-run, finger-turn-hard, humanoid-run, and quadruped-run environments.
