<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Simon,<br>
      <br>
      <blockquote type="cite">We will present the latest performance
        results, which show<br>
        that optimizing for energy is a double win, because such
        programs are almost<br>
        always much faster, and will include examples where energy usage
        is halved and<br>
        speed doubled compared to -O3.</blockquote>
      Do we know if MAGEEC can find these sets of optimizations? I can
      see a few complaints with saying we can double speed (assuming
      that this is coming from the genetic algorithm stuff I did a while
      ago). It was actually a genetic algorithm, made heavy use of
      optimization ordering and it was with an 'old' version of LLVM
      (3.1 or 3.2). Also it was on a Cortex-A8, rather than the embedded
      platforms we're targeting.<br>
      <br>
      It might be better to say that we've found cases where the
      potential is almost 3 times better than -O3, and we expect MAGEEC
      to get closer to that?<br>
      <br>
      I've attached the graph.<br>
      <br>
      Cheers,<br>
      James<br>
      <br>
      On 27/08/14 08:26, Simon Cook wrote:<br>
    </div>
    <blockquote
cite="mid:CAFOzG3t2OoDC35a9cJgEjwiLSCagxg+qdq6g2VV6sbXvrRu_RA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi all,<br>
              <br>
            </div>
            Jeremy and I have been working on an abstract for a talk at
            the upcoming LLVM conference. Here is what we have so far.<br>
            <br>
            "Title: Machine Guided Compilation and Compiling to Minimize
            Energy Usage<br>
            <br>
            Compilers currently optimize for execution time and code
            size. But in a world<br>
            of diminishing battery life, ever larger data centers and
            nanoscale energy<br>
            scavenging devices, what if the compiler could instead
            optimize for energy<br>
            efficiency of the compiled code? Imagine having "-Oe" as an
            option to LLVM.<br>
            <br>
            Since June 2013 Embecosm and the University of Bristol,
            supported by the UK<br>
            Technology Strategy Board have developed the Machine Guided
            Energy Efficient<br>
            Compliation system. MAGEEC (<a moz-do-not-send="true"
              href="http://www.mageec.org" target="_blank">www.mageec.org</a>)
            uses machine learning to train a<br>
            compiler on the combinations of compiler optimizations which
            will minimize the<br>
            energy consumed by the compiled program. The original target
            of the project was<br>
            to reduce the energy of compiled code by 40% compared to
            optimized code today.<br>
            <br>
            Unlike previous projects, MAGEEC is completely generic,
            capable of working with<br>
            any compiler and target. It can optimize for any criterion,
            not just energy<br>
            efficiency as we have used, and can be integrated with any
            machine learning<br>
            approach. The project is entirely free and open source, with
            the code and all<br>
            project design materials freely available online.<br>
            <br>
            In July 2014, the first complete version of the MAGEEC
            infrastructure was<br>
            released, supporting both GCC and LLVM, and is now
            undergoing refinement and<br>
            evaluation.  To support energy efficiency optimization, the
            project has<br>
            developed its own low-cost (approx $50) energy measurement
            board, capable of<br>
            sampling voltage and current up to 6 million times per
            second to an accuracy of<br>
            better than 1%.  Training also requires a large pool of
            benchmark programs, and<br>
            as part of this project we have also developed a new
            standard free and open<br>
            source benchmark suite, BEEBS (<a moz-do-not-send="true"
              href="http://www.beebs.eu" target="_blank">www.beebs.eu</a>),
            suitable for use with low energy<br>
            deeply embedded systems.<br>
            <br>
            In this talk we will explain the detailed design of MAGEEC,
            comparing the<br>
            challenges in developing for LLVM and GCC.  This will
            include the details of<br>
            the integration with the machine learning system, allowing
            it to control the<br>
            pass manager, and which allows us to select the best
            optimizations on a per<br>
            function basis.  We will present the latest performance
            results, which show<br>
            that optimizing for energy is a double win, because such
            programs are almost<br>
            always much faster, and will include examples where energy
            usage is halved and<br>
            speed doubled compared to -O3.<br>
            <br>
            We will conclude with a demonstration of MAGEEC in action on
            ARM processors,<br>
            using the energy measurement board to measure the energy
            savings achieved."<br>
            <br>
          </div>
          <br>
          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?<br>
          <br>
        </div>
        Many thanks,<br>
        Simon<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mageec mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mageec@mageec.org">mageec@mageec.org</a>
<a class="moz-txt-link-freetext" href="http://mageec.org/cgi-bin/mailman/listinfo/mageec">http://mageec.org/cgi-bin/mailman/listinfo/mageec</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>