CODO: An Automated Compiler for Comprehensive Dataflow Optimization
Weichuang Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yiquan Wang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xinzhou Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chi Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yu Feng School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xiaofeng Hou School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chao Li School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Jieru Zhao 1 School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Minyi Guo Guizhou Provincial Laboratory of Big Data College of Computer Science and Technology, Guizhou University School of Computer Science, SJTU [email protected] · 2026
Read CODO: An Automated Compiler for Comprehensive Dataflow Optimization by Weichuang Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yiquan Wang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xinzhou Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chi Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yu Feng School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xiaofeng Hou School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chao Li School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Jieru Zhao 1 School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Minyi Guo Guizhou Provincial Laboratory of Big Data College of Computer Science and Technology, Guizhou University School of Computer Science, SJTU [email protected] (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-12618.txt.
Introduction
Weichuang Zhang and eight colleagues build CODO, a compiler for FPGA dataflow design. Gate arrays suit streaming, pipelined work. Hand design of fast flows stays hard even with high-level synthesis. CODO finds and removes flow faults at coarse and fine grains. It tunes data movement on and off chip for speed. Auto scheduling balances speed against cost. Kernel latency speedups run 1.45 to 4.52 times over leading tools. On-board tests confirm gains on CNN and GPT-2 models.
Catalog record
| CREATOR | Weichuang Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yiquan Wang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xinzhou Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chi Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yu Feng School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xiaofeng Hou School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chao Li School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Jieru Zhao 1 School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Minyi Guo Guizhou Provincial Laboratory of Big Data College of Computer Science and Technology, Guizhou University School of Computer Science, SJTU [email protected] |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 73363 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.12618
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
CODO: An Automated Compiler for Comprehensive Dataflow Optimization Weichuang Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yiquan Wang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xinzhou Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chi Zhang School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Yu Feng School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Xiaofeng Hou School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Chao Li School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Jieru Zhao 1 School of Computer Science Shanghai Jiao Tong University Shanghai, China [email protected] Minyi Guo Guizhou Provincial Laboratory of Big Data College of Computer Science and Technology, Guizhou University School of Computer Science, SJTU [email protected] Abstract FPGAs are well-suited for dataflow architectures that process data in a streaming or pipelined manner, thus satisfying the high computational and communication demands of emerging applications. However, manually implementing an efficient dataflow architecture for large-scale applications is still challenging, even for specialists who use high-level synthesis (HLS) to simplify FPGA programming. To address this, we introduce CODO, an automated compiler that generates feasible and efficient dataflow accelerators on FPGAs. CODO features a systematic method for detecting and eliminating both coarse-grained and fine-grained dataflow violations. Building on this, CODO performs both on- and off-chip data movement optimizations to maximize transfer efficiency. To guarantee a higher design quality, CODO performs automatic scheduling to generate high-performance dataflow accelerators, ensuring a balanced performance-resource trade-off. Synthesis results show that CODO delivers 1.45 × 1.45\times to 4.52 × 4.52\times latency speedups on typical computation kernels and 3.7 × 3.7\times to 33.8 × 33.8\times speedups on DNN models compared to SOTA frameworks. In on-board evaluations, CODO achieves 7.3 × 7.3\times average speedup on CNN models and 2.07 × 2.07\times average speedup on the GPT-2 model over SOTA frameworks. The compiler is open-sourced at https://github.com/sjtu-zhao-lab/codo-artifact . I Introduction Dataflow architectures are suitable for workloads that require massive data movement and operations due to their low latency [ 1 , 18 , 11 ] . Fundamentally, these architectures leverage task-level pipelining to allow distinct functions and loops to overlap in their execution, rather than running sequentially. Furthermore, they exploit efficient on-chip communication between tasks [ 44 , 42 ] , significantly reducing the overhead of frequent external memory accesses [ 6 , 28 ] . FPGAs, with their reconfigurable logic and customizable data paths, are well-suited for implementing dataflow accelerators that process data in a streaming or pipelined manner [ 47 , 21 , 24 , 3 ] . Note that while the term dataflow is also used to describe dynamic scheduling-based dataflow circuits [ 19 ] or dataflow mapping strategies like input/output stationary [ 8 ] , these concepts are conceptually orthogonal to the dataflow architecture discussed in this paper. However, the high efficiency of dataflow accelerators comes at the expense of a complex design process using hardware description languages (HDLs). To simplify FPGA development, developers utilize high-level synthesis (HLS) to translate C/C++ code into HDL implementations automatically [ 9 ] . Nevertheless, a notable gap still persists between HLS programming and efficient dataflow implementations. Commercial HLS tools, such as AMD Vitis HLS [ 41 ] , provide basic dataflow scheduling primitives, i.e., the dataflow pragma [ 39 ] , to enable pipelined execution between loops or functions. However, this optimization works only if the coding styles satisfy stringent requirements [ 39 ] , which many handcrafted algorithms fail to meet. This mismatch hinders effective optimization or even leads to synthesis failures. Consequently, developers must perform extensive code refactoring and optimization manually to convert algorithms into dataflow-feasible formats and produce dataflow accelerators. Prior Research. To reduce developing efforts, prior methods enhance programming efficiency using domain-specific languages (DSLs) [ 22 , 40 , 46 ] , or directly parse C++ inputs or PyTorch models into intermediate representations (IRs) [ 43 , 16 , 49 ] . They primarily focus on kernel computation optimization, with limited consideration for dataflow optimization. Recently, several compilers have been proposed for dataflow optimization across multiple kernels or tasks [ 44 , 7 , 5 , 42 ] , enabling automatic generation of dataflow accelerators. However, these approaches fail to fully resolve potential issues (Fig. 2 ) in the dataflow, limiting their ability to further optimize code and exploit parallelism. As a result, the generated designs may suffer from suboptimal performance or even encounter deadlocks when deployed on FPGA boards. Key Idea. The performance of dataflow accelerators is influenced by multiple factors. Fundamentally, the input code must satisfy strict constraints to enable correct streaming execution ( correctness ). On top of that, achieving high-throughput communication necessitates effective optimization of communication buffers and careful alignment of computation patterns between adjacent tasks to enhance data transfer efficiency ( communication ). Finally, balancing task latencies through techniques such as loop tiling, unrolling, and pipelining is essential for improving overall performance ( parallelism ). The core problem is that these factors are deeply codependent, yet prior work typically handles them in a decoupled manner. This leads to conflicts where optimizing one aspect in isolation negatively impacts the others. For instance, aggressive code transformations to meet dataflow constraints may result in inefficient computation and memory access patterns that create a communication bottleneck. Conversely, communication or parallelism optimizations may violate dataflow constraints and produce invalid designs. Moreover, the growing scale and structural complexity of modern DNNs further exacerbate the problem, making it increasingly difficult to construct deep, high-throughput pipelines for large models. To overcome these issues, we build a compiler that jointly co-optimizes correctness, communication, and parallelism. Through advanced code analysis, versatile optimization techniques, and automated scheduling, the compiler performs coordinated transformations that harmoniously benefit all three aspects rather than creating conflicts, automatically generating high-performance accelerators for large-scale models. Challenges. Achieving the goal is challenging. Firstly, the input algorithm may violate dataflow constraints, resulting in dataflow violations that must be eliminated. At the coarse-grained level, existing HLS tools impose a strict single-producer-consumer constraint to enable dataflow optimization [ 39 ] . At the fine-grained level, producers and consumers must maintain consistent data access order and count to ensure correct and efficient streaming execution. Although recent works attempt to address these violations [ 44 , 7 , 5 , 42 ] , their methods are difficult to fully eliminate all violations in large-scale models. Consequently, unresolved violations result in discontinuous dataflow regions , breaking end-to-end streaming (Fig. 2 , Issue 1). Secondly, data is transferred through communication buffers, typically implemented as ping-pong buffers or FIFOs (First-In-First-Out), as shown in Fig. 1 . To achieve high throughput, intermediate results must be produced and consumed just-in-time to prevent pipeline stalls. This requires careful selection of buffer types. Moreover, this idealized communication is often disrupted by other optimizations, such as violation elimination, which may unintentionally alter computation schedules and compromise communication efficiency. Without holistic coordination and advanced code analysis, such issues are easily overlooked [ 5 ] , resulting in delayed buffer writes and performance degradation (Fig. 2 , Issue 2). Thirdly, improving dataflow performance requires balancing tasks through techniques such as loop tiling, unrolling, and pipelining. This becomes