[GSoC][Offload]LLVM Compiler Remarks Visualization Tool for Offload Proposal (original) (raw)
February 11, 2025, 8:39pm 1
Description
LLVM offers different information via remarks, profiling, or runtime debug annotations (e.g., LIBOMPTARGET_INFO=-1). However, as projects increase, dissecting this information becomes difficult for users. For example, it is difficult to collect all this data, visualize it, and learn from it when building large projects.
Currently, some of this information—for example, compilation remarks—can be exported in JSON format. We want to create a tool to visualize, aggregate, and summarize the information. To aid accelerator development, we will start with the offload project as the primary candidate.
Similar tools, such as opt-viewer, can be used as references and starting point.
Expected outcomes
The expected outcome is a tool (e.g., in the form of a compiler wrapper such as ccache) that will allow the dump of all the compiler-generated information in JSON format and organize it in a project structure.
The tool should generate an HTML-based report to help visualize the remarks. We envision a small client-server application using Python to spawn a local server as the visualization’s front end. The server will expose the different reports and perform early analysis and aggregation.
Additionally, the tool should be designed so that, in the future, the analysis of the remarks can provide generalized guidelines for the developer (e.g., show the most common remark, use LLM models to explain actions, etc.). The client (HTML viewer) will display the aggregated data, in-line remarks, profile information, etc. We do not expect the project to have all the features at the end of the GSoC but to serve as a placeholder for growth in the future.
In particular, the outcomes of this project should be:
- Together with the mentors, help the design of the compiler wrapper, data storage layer, and client/server infrastructure. This includes the server API. The outcome of this task is a design document (similar to an RFC)
- Create a compiler wrapper that will dump different information in JSON format into the data storage layer (e.g., folders)
- Create a simple server layer that exposes the backend API to the front end. Python is the right way to do this, but we welcome other suggestions that align with the LLVM project. We would like to avoid relying on external projects (e.g., Flask) to avoid adding more dependencies to the LLVM project.
- Create a simple client-side visualization tool that can be extended in the future to show more reports.
Mentors
Required/desired skills
- Basic understanding of the LLVM Compiler to be able to generate compiler remarks, profiling data, and other information from the compiler.
- Proficiency in Python and C++.
- Full-stack web development
Size of the project.
Large
Difficulty
Easy
miguelcsx February 11, 2025, 11:52pm 2
Hi all,
I’m very interested in the LLVM remarks visualization project. I have experience with Python, C++, and full-stack development that I believe would be valuable for this work.
Looking forward to potentially contributing to this effort.
I am very interested to contribute to this project
xys-syx March 20, 2025, 6:50pm 4
Hi, I am interested in this project, I have experience with compiler and formal verification.
I hope I have the opportunity to participate in this project.
leyli16 March 25, 2025, 12:07am 5
I’m a grad student at the University of Pennsylvania and interested in contributing to the LLVM Compiler Remarks Visualization Tool project for GSoC.
Tools, visualization, and back-end/front-end design - these are all areas of work that I really enjoy. I’m particularly interested in ways to make compiler comments more understandable and useful, especially in terms of offloading and performance optimization.
So far, I’ve been experimenting with clang -fsave-optimization-record
and have built a small demo that:
- Parses
.opt.yaml
files using Python - Visualizes the output in a lightweight HTML + JS frontend
- Serves the UI using a simple local Python server
I’d be curious to hear your thoughts on which types of remarks are most valuable to prioritize—especially for accelerator/offload workflows. I’m also exploring opt-viewer
as a reference and would be happy to discuss how this tool might complement or extend its functionality.
You can find my demo here: GitHub - leyli16/llvm-remarks-viewer-demo: A demo tool to visualize LLVM optimization remarks
Looking forward to your feedback and learning more!