ScopLib support for Graphite - Linking Graphite to the huge industrial and research community
Many polyhedral optimization tools and libraries have been developed since the 90's. Our project aims to enable Graphite to take advantage of these tools by making it able to export/import internal polyhedral representation to the scopLib file format, a standard format used for communication between polyhedral tools and libraries.
Advanced compiler optimization projects such as Graphite need a huge amount of work, not only from the side of developers but also from the research and the industrial side ; collaborative work is crucial to the project. Our proposal aims to bridge the gap and enable better collaboration between worldwide researchers, industrial users and Graphite developers ; the final benefit for Graphite is to reach a better optimized, well tested and more reliable code generation. Graphite uses the polyhedral model as a basic model for loop optimization and parallelization. Many tools such as PoCC, Loopo and Pluto rely also on this model to perform advanced loop transformations. Making graphite benefit from the algorithms that are currently implemented in these tools is a big step toward the support of a full polyhedral framework in GCC. The goal of our project is to enable Graphite to Export/Import polyhedral internal loop representation to other polyhedral tools through the scopLib file format, a format designed to enable polyhedral tools and libraries to communicate with each other. GCC and graphite will parse loops, detect scops, and preparer information (structures) needed for polyhedral optimization, these structures are dumped to a scop file (a text file in the scopLib format that specifies all necessary information for loop transformations), polyhedral tools will then read this file, apply polyhedral transformations and dump the result back to a scop file, Graphite will then read this file, and proceed to generate code.
Benefits for Graphite
ScopLib (OpenScop) support will help developers in the mid-term to experiment with different “real world” transformations that come from different tools and that are not yet implemented in Graphite, this is crucial for developers to take strategic decisions about futur releases. With scopLib support, Graphite will be better tested and more parts of graphite will be evaluated with a variety of test cases in order to simulate real world usage. To encourage this aspect, a big part of our work is based on testing and problem-hunting,
- By enabling the communication between Graphite and external tools, new algorithms will be tested easily outside of the complexity of GCC and the best of these algorithms will be merged to GCC. Researchers from all over the world will work side by side with the graphite community to evaluate and provide a valuable feedback about the real efficiency of the generated code,
- Since the scopLib format is human readable, it will help greatly graphite developers in debugging and testing special and rare cases,
- This work is a basic work for futur support of privatization in Graphite,
- The project will complete the circle (Graphite ↔ research community↔ industry) : our project has a long term effect on Graphite and GCC, it will enable more people to get involved in Graphite and thus more papers will appear and more advanced algorithms will be implemented, the results will encourage more support from the industry. All the benefit is for Graphite and for GCC,
Graphite will benefit from a wealth of advanced polyhedral optimization algorithms implemented by researchers from all over the world, it will be able to communicate with any polyhedral tool/library that implements the standard ScopLib format. It's a big step toward a large usability of Graphite code outside GCC in all industrial and academic open source tools.
26 April 2010 - The project is accepted for Google summer of Code 2010, Riyadh Baghdadi will be working on this with Sebastian Pop and Tobias grosser.
- More details about the projet is avaialable here (pdf). This is a light weight version of the original Google Summer of Code proposal.
- If you are a student and you want to participate in Google summer of code, here is the result of my experience with SoC : 5 tips to get your Google Summer of Code proposal accepted.