Energy-efficient software helps improve mobile device experiences and reduce the carbon footprint of data centers. However, energy goals are often de-prioritized in order to meet other requirements. We take inspiration from recent work exploring the use of large language models (LLMs) for different software engineering activities. We propose a novel application of LLMs: as code optimizers for energy efficiency. We describe and evaluate a prototype, finding that over 6 small programs our system can improve energy efficiency in 3 of them, up to 2x better than compiler optimizations alone. From our experience, we identify some of the challenges of energy-efficient LLM code optimization and propose a research agenda.
翻译:节能软件有助于改善移动设备体验并降低数据中心的碳足迹。然而,为满足其他需求,节能目标常被置于次要地位。我们受近期探索大语言模型(LLMs)在不同软件工程活动中应用的研究启发,提出LLMs的一种新颖应用:作为面向能效的代码优化器。我们描述并评估了一个原型系统,发现在6个小型程序中,我们的系统能提升其中3个程序的能效,最高可比单独使用编译器优化提升2倍。基于实践经验,我们指出了能效导向的LLM代码优化面临的部分挑战,并提出了相应的研究议程。