torchrun --nnodes=1 --nproc-per-node=2 ./flint/runner/sample_runner/sample_linear.pyfrom flint import create_flint_backend
flint = create_flint_backend()
flint_attached_model = torch.compile(
model, backend=aot_autograd(fw_compiler=flint)
)
flint_attached_model(input)Flint creates Chakra Graphs directly froms ource code by plugging into torch.compile as a custom backend. It allows users without access to GPU clusters to freely use simulators/emulators without worrying about profiling post-execution Chakra traces.
Simulators (like astra-sim, etc.) and Emulators help us study distributed ML workloads without needing to provision GPU clusters. But someone needs to tell them what the workload looks like - what operations there are, what are the dependencies, etc. Chakra is a schema used to describe these workloads in a DAG, but one still needs to run a one-time profiling on a real GPU cluster. Flint seeks to overcome that problem.
- Native
torch.compileintegration as a configurable custom backend. - Computation and communication capture at ATen and c10d operators.
- Chakra export with dependency edges, operation metadata, and per-rank output.
- Flexible configuration through TOML files and dot-notation command-line overrides.
- Two integration paths: bring your own model code or use the Torchtitan runner.
Flint acts as a compiler backend to torch.compile (PyTorch developer experience). It leverages PyTorch's Dynamo infrastructure as-is to parse the PyTorch sourcecode and generate an FXGraph. Thus, the input is a torch.fx.GraphModule from the compiler pipeline, and the output is a Chakra.x.et file stored in the filesystem.
The main entry points are:
| API | Purpose |
|---|---|
create_flint_backend |
Creates a backend with Flint configuration loaded for one invocation |
ChakraConverter |
Converts supported FX nodes into Chakra execution-trace nodes |
- Linux with NVIDIA GPUs and a working CUDA environment.
- Python and PyTorch built from source.
- A Flint-compatible, modified PyTorch checkout from the
flintbranch. ccacheis strongly recommended for faster PyTorch rebuilds.- Torchtitan is optional and only needed for the Torchtitan integration.
Flint does not list PyTorch as a package dependency because the required PyTorch build must be compiled from source. For installation, etc. go to USER_GUIDE.md.
flint/
├── config/ # TOML and dataclass-based configuration
├── converter/ # FX-to-Chakra computation and communication conversion
├── inspector/ # FX graph inspection
└── runner/ # Standalone and Torchtitan examples
If Flint contributes to your research, please cite the paper:
@article{flint2026,
title = {Flint: Compiler Enabled Cluster-Free Design Space Exploration for Distributed ML},
journal = {arXiv preprint arXiv:2604.17550},
year = {2026},
url = {https://arxiv.org/abs/2604.17550}
}Read the paper on arXiv.
This project is licensed under the MIT License.