Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Leveraging LLMs to Automate Energy-Aware Refactoring of Parallel Scientific Codes

About

Large language models (LLMs) are increasingly used for generating parallel scientific codes, with a primary focus on generating functionally correct code. Recent work has focused on generating performant code, with an emphasis on its execution time. However, energy efficiency is now recognized as a critical objective, given the significant power demands of large-scale compute systems. This paper addresses the research question of whether LLMs can generate energy-efficient parallel scientific codes when guided by empirical execution feedback. To answer this question, we propose LASSI-EE, an automated LLM-based refactoring framework that generates energy-efficient parallel codes through a multi-stage, iterative approach integrating runtime power profiling, energy-aware prompting, self-correcting feedback loops, and an LLM-as-a-Judge agent for screening generated code. We evaluate LASSI-EE using twenty-two representative scientific benchmarks and applications on NVIDIA A100 and AMD MI100 GPUs. The results indicate an average energy reduction of 36% for MI100 and 34% for A100, across trials that produced passing energy-reducing refactorings.

Matthew T. Dearing, Yiheng Tao, Xingfu Wu, Zhiling Lan, Valerie Taylor• 2025

Related benchmarks

TaskDatasetResultRank
Performance Optimizationsegment-reduce
Energy (J)289.8
4
Performance Optimizationmatrix-rotate
Energy (J)604.1
4
Performance Optimizationchacha20
Energy Consumption (J)237.3
4
Performance Optimizationthreadfence
Energy (J)24.7
4
Performance Optimizationkeogh
Energy (J)267
4
Performance Optimizationcolorwheel
Energy (J)79
4
Performance OptimizationrandomAccess
Energy (J)166.7
4
Performance Optimizationentropy
Energy (J)0.3
4
Performance Optimizationdense-embedding
Energy (J)336.7
4
Performance Optimizationlayout
Energy (J)143.4
4
Showing 10 of 23 rows

Other info

Follow for update