[MAGEEC] LLVM Talk Draft Proposal
simon.cook at embecosm.com
Wed Aug 27 08:26:21 BST 2014
Jeremy and I have been working on an abstract for a talk at the upcoming
LLVM conference. Here is what we have so far.
"Title: Machine Guided Compilation and Compiling to Minimize Energy Usage
Compilers currently optimize for execution time and code size. But in a
of diminishing battery life, ever larger data centers and nanoscale energy
scavenging devices, what if the compiler could instead optimize for energy
efficiency of the compiled code? Imagine having "-Oe" as an option to LLVM.
Since June 2013 Embecosm and the University of Bristol, supported by the UK
Technology Strategy Board have developed the Machine Guided Energy Efficient
Compliation system. MAGEEC (www.mageec.org) uses machine learning to train a
compiler on the combinations of compiler optimizations which will minimize
energy consumed by the compiled program. The original target of the project
to reduce the energy of compiled code by 40% compared to optimized code
Unlike previous projects, MAGEEC is completely generic, capable of working
any compiler and target. It can optimize for any criterion, not just energy
efficiency as we have used, and can be integrated with any machine learning
approach. The project is entirely free and open source, with the code and
project design materials freely available online.
In July 2014, the first complete version of the MAGEEC infrastructure was
released, supporting both GCC and LLVM, and is now undergoing refinement and
evaluation. To support energy efficiency optimization, the project has
developed its own low-cost (approx $50) energy measurement board, capable of
sampling voltage and current up to 6 million times per second to an
better than 1%. Training also requires a large pool of benchmark programs,
as part of this project we have also developed a new standard free and open
source benchmark suite, BEEBS (www.beebs.eu), suitable for use with low
deeply embedded systems.
In this talk we will explain the detailed design of MAGEEC, comparing the
challenges in developing for LLVM and GCC. This will include the details of
the integration with the machine learning system, allowing it to control the
pass manager, and which allows us to select the best optimizations on a per
function basis. We will present the latest performance results, which show
that optimizing for energy is a double win, because such programs are almost
always much faster, and will include examples where energy usage is halved
speed doubled compared to -O3.
We will conclude with a demonstration of MAGEEC in action on ARM processors,
using the energy measurement board to measure the energy savings achieved."
We're attempting to cover the entire history of the work we've done so far,
as we don't have the benefit of having done a couple of talks previously
for background information. If anyone has any thoughts before we submit
this, that would be great. In particular, James, the graphs you had a few
months ago with data from trying different passes with opt, have we quoted
have the correct decrease in energy/execution time?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mageec