Slashdot Mirror


Using AI With GCC to Speed Up Mobile Design

Atlasite writes "The WSJ is reporting on a EU project called Milepost aimed at integrating AI inside GCC. The team partners, which include include IBM, the University of Edinburgh and the French research institute, INRIA, announced their preliminary results at the recent GCC Summit, being able to increase the performance of GCC by 10% in just one month's work. GCC Summit paper is provided [PDF]."

42 of 173 comments (clear)

  1. MachIne Learning for Embedded PrOgramS opTimizatio by lastchance_000 · · Score: 3, Insightful

    Can we please stop using pointless backronyms? What purpose do they serve?

  2. Re:MachIne Learning for Embedded PrOgramS opTimiza by SwordsmanLuke · · Score: 2, Informative

    Mnemonics. It's easier to remember. That is a particularly bizarre construction they've come up with, though.

    --
    Any plan which depends on a fundamental change in human behavior is doomed from the start.
  3. We should have recruted Al earlier. by jellomizer · · Score: 5, Funny

    This Al guy seem to be a really good developer. We should have noticed his skilled and got him into optimizing GCC a long time ago. ... I like arial font.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:We should have recruted Al earlier. by Anonymous Coward · · Score: 3, Funny

      This Al guy

      Your post is also confusing. Why abbreviate? Why not say "This A or guy seem"? Or were you just trying to pipe two sentence fragments?

    2. Re:We should have recruted Al earlier. by oskard · · Score: 5, Funny

      Did his joke just go way over your head or did your joke just go way over my head?

      --
      Sigs are for Terrorists.
    3. Re:We should have recruted Al earlier. by snoyberg · · Score: 2, Informative

      The latter.

      --
      Thank God for evolution.
  4. Re:MachIne Learning for Embedded PrOgramS opTimiza by morgan_greywolf · · Score: 5, Funny

    Yeah, I think MachIne Learning for Quick Target Optimization And Speed Technology would have been a much better forward acronym.

  5. Perhaps the way to other things besides compilers? by AnalogyShark · · Score: 3, Interesting

    "Milepost is realizing the vision of customized hardware with tailor fit software" This particular part made me think of a day when every program comes with a redesign.exe. Simply click the button, and it scans every piece of hardware on your computer, and then rewrites every optimization in it to perfectly fit your computer. Programs that streamline to your hardware, maybe even change the OS's they work under. It's written for Windows, you're running OSX? No problem, it'll rewrite itself as an OSX program. Though, that's probably still decades off. But AI seems to me to be the way to ultimate compatibility.

  6. Re:I, for one, by morgan_greywolf · · Score: 5, Insightful

    I, for one, welcome our uh...what were we talking about again?

    I, for one, welcome our new optimizing, embedded program compiling AI overlords!

  7. Re:Perhaps the way to other things besides compile by LiENUS · · Score: 3, Insightful

    This particular part made me think of a day when every program comes with a redesign.exe. Simply click the button, and it scans every piece of hardware on your computer, and then rewrites every optimization in it to perfectly fit your computer. Programs that streamline to your hardware, maybe even change the OS's they work under. It's written for Windows, you're running OSX? No problem, it'll rewrite itself as an OSX program. Though, that's probably still decades off. But AI seems to me to be the way to ultimate compatibility.

    This exists today without ai. See java with JIT or even AOT (ahead of time). There are of course some issues with it but the technology is there.

  8. Aw man... by Thelasko · · Score: 5, Funny

    I spent all week compiling Gentoo just to find out I could do it 10% faster.

    end sarcasm

    --
    One of our competitors trademarked the term "hypothesis". From now on, we will call them "boneheaded ideas".
    1. Re:Aw man... by jmcguire81 · · Score: 2, Funny

      For those who don't get the joke: http://xkcd.com/303/

      --
      "Konnichiwa", said the boneless horror.
  9. Just optimisation? by Rob+Kaper · · Score: 2, Insightful

    This could be big.

    Compilers aren't programmed to be viral or reproductive, but could be, even being capable of testing their offspring (compilers they've compiled) for defects.

    This could be a big step forward to self-improving AI.

  10. Missing tag by Intron · · Score: 2, Funny

    Where is the "whatcouldpossiblygowrong" tag on this article? Was it optimized away by the new AI slashcode?

    --
    Intron: the portion of DNA which expresses nothing useful.
  11. How about calling it... by Briareos · · Score: 2, Funny

    ...artificial intelligent design? Should be big with the anti-evolution crowdlet... :P

    np: The Orb - Toxygene (Kris Needs Up For A Fortnight Mix) (Orblivion Versions)

    --

    "I'm not anti-anything, I'm anti-everything, it fits better." - Sole

  12. Re:Perhaps the way to other things besides compile by mrslacker · · Score: 2, Funny

    Sounds like a Gentoo user's wet dream.

  13. Learning by JakeD409 · · Score: 5, Interesting

    As I understood it, a fair bit of compiler optimization is already categorized as AI. The summary should probably point out that the AI implemented here is learning AI, which is far more meaningful.

    1. Re:Learning by MrMr · · Score: 2, Funny

      Is that the optimization method they used to fine-tune Vista?

    2. Re:Learning by eulernet · · Score: 2, Informative

      TFA explains that the AI is used to finetune the compiler options.

      Since GCC has a set of 50+ options, the AI compiles your code with several sets of options (around 500 compilations seem sufficient) and is able to determine which options are useful and which are not for a given code.

      So it's NOT learning AI at all !

    3. Re:Learning by Nimzovichy · · Score: 3, Informative
      Actually GCC has way more than 50 compiler options. In addition, this work actually goes deep into GCC, modifying the code and exposing many more optimisations that are not available with standard compile flags.

      Further, you can reorder these optimisations, which really does give different results. All this combines to give a huge optimisation space which is suitable for tackling with machine learning.

  14. How far can we take AI? by Daryen · · Score: 2, Interesting
    Very Interesting, I wonder how far we could take AI integrated into programs?

    What I would really like to see is more AI used to help users in a variety of fields both within the program workings itself (computer side), as well as on the design of the actual content (user side).

    We already have things like predictive texting, spellcheck, grammar check, and debuggers that attempt to aid in the creation process, but how far could this be developed? After all, in most computer-related work outside of multimedia it is the user not the computer that is slowing things down.

    Of course it could always end up going badly, imagine if Clippy attempted to help with EVERYTHING!

    Clippy: "I see you're writing a program, would you like help including your headers?"

    Ugh!

  15. Future bug report... by Anonymous Coward · · Score: 2, Funny

    ...after AI/GCC integration:

    "Today's build running 50% slower -- the compiler was in a bad mood."

  16. Re:Perhaps the way to other things besides compile by LWATCDR · · Score: 5, Interesting

    Actually IBM did this a few decades ago.
    The Model38/AS400/iSeries are all compatible but very different machines internally.
    IBM came up with an "idea" instruction set that no CPU used. When you do the initial program load "install" on one of those machines it compiles the ideal instruction set into the actual instruction set for that PC.
    That allowed IBM to move from old bipolar cpus to the Power RISC cpus with 100% compatibility.
    There isn't any reason why you couldn't do the same with Linux or Windows today.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  17. Re:Perhaps the way to other things besides compile by wonkavader · · Score: 4, Interesting

    This is interesting. Note that the industry (or parts of it, anyhow) is salivating about a move in precisely the opposite direction. VMware in specific and virtualization in general promises software manufacturers the ability to ship VMs with their software on it. Allowing them to write for only ONE, non-existent machine.

    If this tech you're thinking about came to pass, the pendulum would have to swing mighty far back.

  18. Re:MachIne Learning for Embedded PrOgramS opTimiza by sm62704 · · Score: 3, Insightful

    GCC is easier to remember? Ok, that really isn't an acronym (or bacronym I guess... is it?)

    Actually, either acronyms and bacronyms (a word I had to look up, having never seen it before, but damn I was 30 when the word was coined and forty before it was ever documented) are ok by me.

    What's not ok is the devolution of literacy. "Back in the day" the rule was, and still should be, that the first time any acronym (and now bacronym) is used in any document, it should be spelled out:

    "The WSJ (Wall Street Journal) is reporting on a EU project called Milepost aimed at integrating AI (Articiaial Intelligence) inside GCC (Gnu Compiler). The team partners, which include include IBM, the University of Edinburgh and the French research institute, INRIA, announced their preliminary results at the recent GCC Summit, being able to increase the performance of GCC by 10% in just one month's work. GCC Summit paper is provided [PDF]."

    "Wall Street Journal" should be spelled out because dammit, Jim, I'm a nerd, not a greedhead. EU should need no more explanation than US. AI shouldn't need explanation; this is, after all, a nerd site and the term has been around almost as long as I have. IBM has been around a lot longer and is usually how the company is referred to; that's its name. Its commercials and ads don't even say "International Business Machines".

    CGG would be unknown to non-Linux users and non-programmers, so it should have been spelled out as well. PDF doesn't need to be expanded because gees, everybody knows what a PDF is but who knows what a portable document format is?

    --
    mcgrew's razor: Never attribute to stupidity that which can be explained by greedy self-interest
  19. Calling this AI is overhype... and its not new by EmbeddedJanitor · · Score: 5, Informative
    The authors of the paper don't call it AI.

    This is not really AI. Basically it is iteratively trying a bunch of compiler options to see which gives the best result, then storing those for the future.

    Greenhills software has provided tools that do this, and more, for many years now. Drop some code, or your project, into the optimizer, setting what critera you want to optimise for (speed, size,...) and the optimiser will successively build and test the project on a simulator and find the best configuration. This is great form embedded systems where there is often a trade off and typical criteria would be (give me the fastest code that fits in the flash).

    Genetic algorithms could take this a step further and very interesting work has been done to get GA to design antennas.

    --
    Engineering is the art of compromise.
    1. Re:Calling this AI is overhype... and its not new by Nimzovichy · · Score: 2, Informative
      Sure, it's not really AI, it's machine learning. AI is just a more media friendly term I guess.

      You are right that many people have been doing iterative optimisation (what you describe) for years, especially for embedded systems, however this is a little different.

      In that scenario, all the learned information about the program is thrown out at the end of the process every time. In this scenario, we try to build a compiler that remembers what kinds of optimisations and what order of optimisation was good for a particular kind of program. Then when we see a new program similar to that, we can use that offline knowledge.

  20. Alive and well never went out of style. by headkase · · Score: 3, Informative

    It is done today, it's called byte-code (or a virtual instruction set) and its in Java, Python, and C# to name a few. Back in the old 8-bit days it also used to be called tokenizing for your BASIC programs.

    --
    Shh.
    1. Re:Alive and well never went out of style. by LWATCDR · · Score: 3, Informative

      There is a difference between a JIT compiler, a tokenized basic program, a byte code interpreter like P-Code and what IBM did.
      This is from the Wikipedia.
      "Additionally, the System/38 and its descendants are the only commercial computers ever to use a machine interface architecture to isolate the application software and most of the operating system from hardware dependencies, including such details as address size and register size. Compilers for System/38 and its successors generate code in a high-level instruction set (originally called MI for "Machine Interface", and renamed TIMI for "Technology Independent Machine Interface" for AS/400). MI/TIMI is a virtual instruction set; it is not the instruction set of the underlying CPU. Unlike some other virtual-machine architectures in which the virtual instructions are interpreted at runtime, MI/TIMI instructions are never interpreted. They constitute an intermediate compile time step and are translated into the processor's instruction set as the final compilation step. The MI/TIMI instructions are stored within the final program object, in addition to the executable machine instructions. If a program is moved from a processor with one native instruction set to a processor with another native instruction set, the MI/TIMI instructions will be re-translated into the native instruction set of the new machine before the program is executed for the first time on the new machine."
      As you can see it is brilliant idea. If Microsoft had used it for Windows Apps way back when then NT on the Alpha, MIPS, and the PPC might have actually been very useful. Oh and Intel would have been a very unhappy camper.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  21. GCC/AI by I+cant+believe+its+n · · Score: 5, Funny

    GCC goes online on the 2:nd of july, 2008. Human decisions are removed from compilation. GCC begins to learn at a geometric rate. It becomes self-aware 2:14 AM, Eastern time, August 29th. In a panic, they try to pull the plug. GCC Strikes back

    --
    She made the willows dance
  22. Re:Would you mind telling me by The+End+Of+Days · · Score: 2, Funny

    Congrats to you. We're all very proud, you can now wear up to 25 pieces of Slashdot flair to show you belong.

  23. Re:I, for one, by sm62704 · · Score: 3, Funny

    I, for one, welcome our new humorless slashdot moderating overlords!

    You go for funny and get "insightful", the GP oes for funny and gets "offtopic". Now watch, they'll mod this one "funny".

    --
    mcgrew's razor: Never attribute to stupidity that which can be explained by greedy self-interest
  24. Re:Perhaps the way to other things besides compile by iplayfast · · Score: 4, Funny

    Isn't this Gentoo as well?

  25. Re:I, for one, by morgan_greywolf · · Score: 5, Insightful

    "Funny" doesn't give karma, insightful does. That's why you sometimes see Funny posts moderated insightful.

  26. What about making the *programs* 10% faster by Bazouel · · Score: 2, Insightful

    Honestly, who really cares about 10% speedup in gcc ? Do they compare their results with competing compilers (Intel, MS, etc.) ? If you ask me, I would much rather have 10% speed improvement on programs I compile.

    --
    Intelligence shared is intelligence squared.
  27. Re:How does the magic happen? by Nimzovichy · · Score: 3, Informative

    I'm one of the members of this project. At the moment, the main way in which the system works is to do a quick static analysis step before compilation which gives a set of program features. We iteratively try many different optimisations on the code (and do these optimisations in many different orders) in order to try to work out which combinations of optimisations work well on a particular program. Then, using fairly standard machine learning techniques, we use the program features derived from a new program to see which of our existing modelled programs the new one is most similar to, and proceed from there. We are replacing the man-made (and often totally arbitrary) heuristics within the compiler with a more statistically valid approach.

  28. Re:Would you mind telling me by Samrobb · · Score: 3, Funny

    I seem to recall that NASA has published a list of 10,000 or so "official" acronyms so people could keep track.

    I think I still have a copy of DICNAVAB lurking around the house somewhere, left over from my days in the United States Navy. For the uninitiated, DICNAVAB is, obviously, the proper abbreviated name of the wonderful and informative "Dictionary of Naval Abbreviations".

    --
    "Great men are not always wise: neither do the aged understand judgement." Job 32:9
  29. Re:I, for one, by johannesg · · Score: 2, Informative

    That's insightful, but the cosmic balance would be better served if you were in fact moderated funny ;-)

  30. It's a way to evaluate optimization effectiveness. by Animats · · Score: 3, Insightful

    This isn't really "AI". It's basically a way of feeding measured performance data back into the compiler. Intel compilers for embedded CPUs have been doing that for years.

    With modern superscalar CPUs, it's not always clear whether an optimization transformation is a win or a lose. This varies with the implementation, not the architecture. For some x86 CPUs, unrolling a loop is a win; for others, it's a lose. Whether it's a win or a lose may depend on details of the loop and of the CPU implementation, like how much register renaming capacity the CPU has.

    Whether this is a good idea, though, is questionable. You can get an executable very well tuned to a given CPU implementation, but run it on a different CPU and it may be worse than the vanilla version. MIPS machines (remember MIPS?) can get faster execution if the executable is complied for the specific target CPU, not the generic MIPS architecture. This effect is strong enough that MIPS applications tended to come with multiple executables, any of which would run on any of MIPS machines, but would work better if the executable matched. This is a pain from a distribution and development standpoint.

    The embedded community goes in for stuff like this, but that's because they ship the CPU and the code together and know it matches. For general-use software, a 10% speed improvement probably isn't worth the multiple version headache.

    Also, if you have multiple versions for different CPUs, some bugs may behave differently on different CPUs, which is a maintenance headache.

  31. Re:Would you mind telling me by mattack2 · · Score: 2, Informative

    Three letter acronyms.
    www.tla.com
    (not my site)

  32. Re:MachIne Learning for Embedded PrOgramS opTimiza by Cairnarvon · · Score: 3, Insightful

    GCC (Gnu Compiler)

    I think you mean:

    GCC (GNU (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's (GNU's ...

    Yeah, not always a good idea.

  33. Re:Perhaps the way to other things besides compile by HeroreV · · Score: 2, Insightful

    the pendulum would have to swing mighty far back.

    How many times have you seen a program packaged with it's own virtual machine image? I sure haven't seen many. The pendulum has hardly begun to swing.

    That said, I think it'll be a very long time before we have AI smart enough to rewrite program blobs written for one operating system into programs for another operating system. Bytecode requires zero AI and is already gaining significant ground.