CompilerGym favicon

CompilerGym

Free
CompilerGym screenshot
Click to visit website
Feature this AI

About

CompilerGym is a library of easy to use and performant reinforcement learning environments for compiler tasks. It allows ML researchers to interact with important compiler optimization problems in a language and vocabulary with which they are comfortable, and provides a toolkit for systems developers to expose new compiler tasks for ML research. The goal is to act as a catalyst for making compilers faster using ML. CompilerGym aims to lower the barrier to entry to compiler AI research by building a playground that allows anyone to experiment with program optimizations without writing C++. Key goals include building the 'ImageNet for compilers' with high-quality, open-source environments and real-world datasets, improving fairness and reproducibility through a common experimental framework, enabling granular control over compiler decisions, and facilitating the deployment of research findings to production infrastructure.

Platform
Web
Task
compiler optimizing

Features

reinforcement learning environments for compiler tasks

open-source and community-driven

facilitates deployment of research findings to production

enables granular control over compiler optimization decisions

provides datasets for compiler research

c++ api for compiler service development

python api for interacting with environments

support for llvm, gcc, loop_tool, and mlir environments

FAQs

What can I do with this?

CompilerGym lets you control compiler decisions for program optimization. Currently, it supports LLVM, GCC, and CUDA loop nests, aiming to steer compilers towards optimal compiled programs based on reward signals.

Do I have to use reinforcement learning?

No. CompilerGym provides a useful abstraction for sequential decision making, but you can use any technique like search, genetic algorithms, supervised/unsupervised ML, or deep reinforcement learning.

Why does my environment’s step() function return “done”?

An episode is 'done' if a terminal state is reached (no more decisions, or artificial limit) or if an unrecoverable error occurs (e.g., compiler crash, timeout, out-of-memory). Error details are in `info` dict.

Where does CompilerGym store files?

CompilerGym caches files in `~/.local/cache/compiler_gym`, stores site data in `~/.local/share/compiler_gym`, uses `/dev/shm/compiler_gym_${USER}` for in-memory cache, and logs in `~/logs/compiler_gym`.

Do I need to call env.close()?

Yes, to tidy up subprocesses and temporary files. Use the `with`-statement pattern (`with gym.make("llvm-v0") as env:`) or `try`/`finally` blocks for automatic closure.

How do I debug crashes or errors?

Produce a minimal reproducible example. Enable verbose logging by adding `import logging; logging.basicConfig(level=logging.DEBUG)` at the script start, and set `COMPILER_GYM_DEBUG` to '4' for more verbosity.

I found a bug. How do I report it?

File an issue using the GitHub issue tracker. See the Contributing guide for more details.

What features are going to be added in the future?

See the roadmap for future features, including increasingly granular control over optimization decisions and generalization to other systems domains.

I want to modify one of the environments, where do I start?

Many modifications can be done with wrappers. For invasive changes, fork the project, build from source, and modify the compiler service implementation in `compiler_gym/envs/$COMPILER/service`.

I want to add a new compiler environment, where do I start?

Implement the CompilationSession interface to provide a new compilation service, then register it with the CompilerGym frontend. Examples are in the `examples directory`.

I updated with “git pull” and now it doesn’t work

First, re-run `make init` and `make distclean`. If the problem persists, file an issue. The `development` branch is bleeding edge; consider using `stable` for more stability.

Pricing Plans

Free
Free Plan

Access to reinforcement learning environments

Support for LLVM, GCC, loop_tool, and MLIR environments

Python and C++ API references

Open-source development and community support

Job Opportunities

There are currently no job postings for this AI tool.

Explore AI Career Opportunities

Social Media

Ratings & Reviews

No ratings available yet. Be the first to rate this tool!

Alternatives

CompilerAI favicon
CompilerAI

CompilerAI is a research-based startup focusing on formal methods and compilers, specializing in program superoptimization and related technologies.

View Details

Featured Tools

GirlfriendGPT favicon
GirlfriendGPT

NSFW AI chat platform with customizable characters, AI image generation, and voice chat. Explore roleplay and intimate interactions with AI companions.

View Details
PDF Translator favicon
PDF Translator

PDF Translator is an AI-powered tool for instant document translations. Upload PDFs, select from 100+ languages, and get format-preserving translations for free.

View Details
Wan 2.2 Animate favicon
Wan 2.2 Animate

Wan 2.2 Animate is a free online AI tool that transforms any character with advanced AI-powered animations, precise facial expressions, and dynamic body movements without registration.

View Details
StoryShort favicon
StoryShort

StoryShort is an AI creation tool that helps you create viral faceless videos on auto-pilot, generating engaging content in minutes.

View Details
AIhumanize favicon
AIhumanize

AIhumanize is an advanced AI humanizer tool that transforms AI-written text into natural, authentic writing, helping you bypass all major AI detectors.

View Details
LoveGen AI favicon
LoveGen AI

LoveGen AI is an all-in-one platform integrating major image and video AI models, enabling creation from text, visual enhancement, and video generation.

View Details
Capacity favicon
Capacity

Capacity is an AI tool that helps you turn any idea into a working web app, including fullstack applications and cloned websites, without writing code.

View Details
Nano Banana Pro favicon
Nano Banana Pro

Nano Banana Pro is a reasoning-first 4K AI image editor designed for creative teams to generate lossless 4K visuals, transparent PNGs, and high-quality exports.

View Details
ImageTranslator favicon
ImageTranslator

ImageTranslator is an AI-powered online tool that translates text in images instantly, supporting over 100 languages while preserving original layout.

View Details
Seedance 2 favicon
Seedance 2

Seedance 2 is a groundbreaking AI video generation technology that delivers 1080p cinematic quality with advanced motion synthesis and multi-shot storytelling.

View Details
KissGen AI favicon
KissGen AI

KissGen AI is the best AI kissing video generator, transforming memories into lifelike kissing videos with realistic animations and custom styles.

View Details
Gempix2 AI favicon
Gempix2 AI

Gempix2 AI is a free online AI photo and image editor, powered by NanoBanana 2 technology, offering advanced tools for professional-quality visual transformations.

View Details
AI Animate Image favicon
AI Animate Image

AI Animate Image revolutionizes how you create animated content from static images. Our advanced AI image animator turns photos into animation with stunning realism.

View Details
Wan 2.2 favicon
Wan 2.2

Wan 2.2 is an open-source AI video generation tool using MoE architecture, transforming text or images into professional 720P cinematic videos.

View Details
Soora2 favicon
Soora2

Soora2 is a global Sora 2 AI video generation platform offering text-to-video, image-to-video, and AI editing tools without watermarks.

View Details