Open source, AI-driven compiler learns on the job
Jul 1, 2009 — by Eric Brown — from the LinuxDevices Archive — 2 viewsIBM Research and the European Union have jointly released what they bill as the world's first open source machine learning compiler. The “Milepost GCC” compiler is particularly adept at speeding mobile phone development, and offers an 18 percent performance improvement on embedded-application benchmarks, claims IBM.
Sponsored by IBM Research and the Information Society Technologies (IST) of the European Union (EU), the Milepost project comprises research teams at IBM Research Haifa (Israel), University of Edinburgh and ARC International (UK), and INRIA and CAPS Enterprise (France). The group's Milepost GCC is described as a modular, machine-learning-based compiler that automatically learns the best optimization heuristics based on the behavior of the processor platform.
The compiler can quickly be tuned for targeted architectures, resulting in "dramatically reduced time-to-market for new software designs," says the Milepost consortium. It's claimed that on mobile phone projects, the compiler can reduce the amount of time it takes to optimize software to achieve acceptable performance by a factor of 10. According to IBM Research, benchmarks conducted using IBM System p servers achieved an average 18 percent performance improvement on embedded-application benchmarks.
Battling multi-core complexity
As embedded systems move to programmable heterogeneous processors, such as complex, reconfigurable, multi-core system-on-chips (SoCs), current compilers cannot keep up, says Milepost. As a result, compiler development time is said to be increasing without achieving significant performance improvements.
Milepost GCC framework for automatically tuning programs and improving default optimization heuristics
(Click to enlarge)
ICI architecture — original GCC is on left, and GCC with ICI and plugins is on right
(Click to enlarge)
Milepost GCC includes an event-driven "Interactive Compilation Interface" (ICI) plugin (see diagram above). ICI is said to provide both a high-level compiler-independent and low-level compiler-dependent API to "open up" current compilers into modular, interactive toolsets. The plugin acts as a middleware interface between the compiler and user-definable plugins, enabling the reuse of production-quality compiler infrastructure. This process is said to enable program analysis and instrumentation, fine-grain program optimization, and simple prototyping of new development and research ideas, while avoiding building new compilation tools from scratch.
Collective tuning
The Milepost consortium has launched a Collective Tuning Center website where developers can upload code, and receive input on how to tune their code for faster performance. This community-driven portal is described as enabling collaboration and sharing of optimization knowledge. Specific goals are to automate program optimization, compiler design, and architecture tuning.
Collective Tuning Center services and technologies are said to include:
- Collective Optimization Database — Shares optimization cases from the community, provides web services and plugins to analyze collective data, predicts good program optimizations based on statistical and machine learning techniques, and improves the quality and reproducibility of compiler and architecture research
- Online ML program optimization predictor — Web service that suggests optimizations to improve execution time and code size based on similarities between programs
- Continuous Collective Compilation Framework — Automates and distributes iterative feedback-directed exploration of large optimization spaces by multiple users
- Interactive Compilation Interface — Transforms production compilers into stable interactive research toolsets using an event-driven plugin system, instead of developing new research compilers from scratch
- Collective benchmark with multiple datasets — Enables realistic benchmarking and research on iterative compilation and run-time adaptation
- Universal Adaptation Framework — Enables run-time adaptation and optimization of statically-compiled programs for heterogeneous multi-core architectures
Stated Dr. Bilha Mendelson, manager of Code Optimization Technologies at IBM Research Haifa, "We opened the compiler environment so it can access artificial intelligence and machine learning guidance to automatically determine exactly what specific optimizations should be used and when to apply them to ramp-up performance."
Stated Mike O'Boyle, Professor of Computer Science at the School of Informatics, University of Edinburgh and Project Coordinator for Milepost, "We've developed a more cost-effective development process where you can choose to integrate additional functionality or use less power in your current system."
Availability
The Milepost GCC 4.4 compiler is available now as a free, stable, open source download, here. More information on Milepost GCC may be found at the Milepost site, here. The Collective Tuning Center may be found here.
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.