autofdo  by google

AutoFDO builds tools using clang

created 11 years ago
562 stars

Top 58.1% on sourcepulse

GitHubView on GitHub
Project Summary

AutoFDO is a toolchain extension that automatically optimizes C/C++ programs by leveraging hardware performance counters and profile-guided optimization (PGO). It targets developers and researchers seeking to improve application performance without manual code changes, by generating optimized binaries based on runtime profiling data.

How It Works

AutoFDO instruments binaries to collect hardware performance counter data (like cache misses, branch mispredictions) during execution. This data is then used to generate a profile that guides the compiler (Clang/GCC) to make optimization decisions, such as function layout and inlining, to improve instruction cache locality and reduce branch mispredictions.

Quick Start & Requirements

  • Install: sudo apt install libunwind-dev libgflags-dev libssl-dev libelf-dev protobuf-compiler cmake zstd clang g++
  • Build: Clone repo, checkout tag v0.20.1, mkdir build && cd build, cmake -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Release ../, make -j 4.
  • Prerequisites: Ubuntu 20.04, clang-10 (or g++-9), cmake, zstd, protobuf-compiler, libunwind-dev, libgflags-dev, libssl-dev, libelf-dev.

Highlighted Details

  • Leverages hardware performance counters for profile generation.
  • Supports profile-guided optimization (PGO) for Clang and GCC.
  • Focuses on function layout and inlining for performance gains.

Maintenance & Community

  • Developed by Google.
  • No explicit community links (Discord, Slack) or roadmap provided in the README.

Licensing & Compatibility

  • License: Apache License 2.0.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The build process requires specific compiler versions (clang-10 or g++-9) and is demonstrated on Ubuntu 20.04, suggesting potential compatibility issues on other distributions or newer Ubuntu versions.

Health Check
Last commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
1
Star History
9 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Tim J. Baek Tim J. Baek(Founder of Open WebUI), and
5 more.

gemma.cpp by google

0.1%
7k
C++ inference engine for Google's Gemma models
created 1 year ago
updated 1 day ago
Feedback? Help us improve.