MDC

,

UNICA, UNISS – Multi-Dataflow Composer

ID: R22 Licence:
3-clause BSD
Owner:
UNICA
UNISS
Contacts:
francesca.palumbo@unica.it
francesco.ratto@unica.it
claudio.rubattu@uniss.it
Short DescriptionThe Multi-Dataflow Composer (MDC) tool supports runtime adaptivity through the design and deployment of coarse-grained reconfigurable (CGR) hardware accelerators. Its QONNX2MDC frontend, a Python library, enables the generation of adaptive CNN inference engines starting from QONNX models.
MDCQONNX2MDC frontend
Key features– Reconfigurability support: multitasking through dataflow merging and resource sharing
– Multithreading: concurrent threads on the same accelerator through tagged-dataflow execution
– Generation of the coprocessor together with its drivers and APIs
– Integration with the MLIR-based PICEA compiler
– Accelerators derived from arbitrary quantized CNN models in QONNX
– One working point per quantization level, merged by MDC into a single reconfigurable accelerator
– Precision, and consequently power consumption, adaptable at runtime
RequireApplication definition and FPGA-based System-on-Chip (full coprocessor generation available for AMD FPGA devices).Python; AMD Vitis HLS and MDC for the hardware generation.
ProvideReady-to-use reconfigurable HW accelerator.Runtime adaptive inference engines for CNNs.
Input– Dataflow application specification(s), or dataflow networks generated from MLIR by the PICEA compiler
– HDL actor definition(s)
– Communication protocol
– Target architecture
Quantized CNN models in QONNX, for example defined and trained with QKeras at different quantization levels.
Output– RTL description of the CGR accelerator and the RTL co-processor template
– Programming tables
– APIs and software drivers
– Scripts for the Vivado Design Environment
– Network topology (.xdf), to be merged by MDC
– Actor interfaces (.cal)
– Actor definitions (.cpp), implementing the CNN layers for Vitis HLS
– Automation scripts (.tcl) for the Vitis HLS synthesis
User– Software developers without specific expertise in reconfigurable hardware acceleration.
– HW developers that want to explore additional features, such as adaptive AI accelerators.
– Researchers that want to use FPGAs to accelerate computation.
Benefits for the user– MDC generates flexible hardware accelerators, with multitasking and/or multithreading support, with no need for expertise in reconfigurable hardware.
– MDC generates the drivers and high-level APIs to delegate computation to the accelerators, masking the SW-HW communication details, such as DMA and memory transfers, for AMD platforms.
– A customizable Yocto-based Linux distribution simplifies the control of the coprocessors and their integration in edge and continuum systems.
– No manual HDL design: the inference engine is derived automatically from the quantized models.
– Accuracy and power consumption of the inference engine adapted at runtime to the needs of the application.
– Compact accelerators, with a good trade-off between performance, resource utilization and design flexibility.
Downloadgithub.com/mdc-suite/mdcgithub.com/mdc-suite/qonnx2mdc
Position in the MYRTUS DPEStep 3 – Node-Level Optimization and Deployment.
TRL@M03 (for the features related to the MYRTUS extensions)2
TRL@M364-54-5

General description


MDC is an open-source design tool for the generation and management of coarse-grained reconfigurable (CGR) hardware accelerators. Coarse-grained reconfiguration in MDC means adapting an entire custom datapath, in time and in space, to support multi-functional execution: starting from the dataflow specifications of several functionalities, MDC merges them into a single multi-dataflow architecture whose common computational units are shared among the configurations, so that the accelerator can switch among them at run time. This differs from Coarse-Grained Reconfigurable Arrays (CGRAs), which are arrays of processing elements with fixed logic.

Before MYRTUS, the baseline tool supported multitasking through dataflow merging techniques. Input applications are specified in the CAL language or in the ORCC intermediate representation, and high-level synthesis tools can be integrated as external tools to provide the hardware actors, provided that the developer specifies the interface of the modules.

Role in the MYRTUS DPE


MDC is one of the FPGA backends of the Node-Level Optimization and Deployment step of the DPE. It allows users to adopt FPGA-based heterogeneous multi-processor system-on-chip accelerators without the burden of generating bitstreams, APIs and low-level configuration files. The HMPSoCs FPGA-based accelerators of the MYRTUS edge nodes are derived with MDC, including their multithreaded and adaptive versions. Within the DPE, MDC receives dataflow descriptions from the MLIR-based PICEA compiler, while QONNX2MDC provides an entry point for quantized neural networks.

MYRTUS Extension/Contribution


Within MYRTUS, MDC has been extended in three directions:

  • Multithreading. In addition to multitasking, MDC now supports the concurrent execution of multiple dataflow threads within a single accelerator, through tagged-dataflow computation and fine-grained resource sharing. The methodology automates the generation of multithreaded coprocessors and their integration in a processor-coprocessor platform, with dedicated programming APIs and a minimal Yocto-based Linux distribution for coprocessor control and memory management. It has been demonstrated on encryption, video coding and digital signal processing, with an effective trade-off between resource utilization and performance with respect to single-thread solutions and parallel hardware replicas.
  • QONNX2MDC frontend. The newly developed QONNX2MDC frontend, a Python library, lets MDC accept QONNX as input specification for the acceleration of quantized CNNs. The developer models the CNN and its quantization levels with QKeras, trains the models with quantization-aware training and exports them to QONNX. From these models, QONNX2MDC generates all the files needed by MDC and Vitis HLS: the dataflow networks to be merged, the actor interfaces, the C++ implementation of the CNN layers and the synthesis scripts. Each quantization level becomes a different working point between accuracy and energy, and MDC merges them into a reconfigurable inference engine whose precision, and consequently power consumption, can be changed at run time. Evaluated against representative state-of-the-art frameworks (HLS4ML, FINN and Vitis AI), the MDC-based solution uses FPGA resources more efficiently than HLS4ML for comparable inference performance, and with respect to Vitis AI it offers finer precision control and supports quantization-aware training.
  • Integration with MLIR. MDC has been integrated with the PICEA compiler. Multiple-region MLIR programs are translated into dataflow networks and actor descriptions that MDC can merge, or they are merged directly in PICEA, in which case MDC accepts the pre-merged network. A new communication protocol matches the hardware actors generated through HLS, and the coprocessor generator and the Vivado scripts now target the AMD Kria KV260, producing the bitstream, the drivers and the Linux deployment sources.

Technology Benefits and Innovations


MDC combines application-specific hardware specialization with coarse-grained reconfigurability. Several functionalities, or different implementations of the same functionality, are executed on a single datapath and selected through configuration, instead of requiring a dedicated accelerator for each of them. With the MYRTUS extensions, the same principle covers concurrent threads, which share the same processing resources through tagged-dataflow execution instead of relying on spatial replication, partial reconfiguration or context switching, reducing hardware overhead while preserving flexibility.

The same runtime reconfigurability brings adaptivity to AI acceleration at the edge. State-of-the-art tools such as HLS4ML and FINN generate efficient streaming CNN accelerators on FPGA, tailored to a specific model, but without runtime adaptivity; with MDC, multiple neural-network profiles are executed on the same reconfigurable hardware, and the trade-off between accuracy and energy can be changed at run time.

Flexible hardware usually comes at the cost of a high manual effort: designers have to tune the accelerator for each trade-off, which is particularly demanding for AI workloads, and software developers have to understand its internals and manage the communication with it. MDC removes most of this effort. The automated flow, from the dataflow specification or the quantized model down to HLS and RTL, avoids manual HDL design; the generated drivers and high-level APIs spare the developer the low-level handling of DMA and memory transfers; and the customizable Yocto-based Linux distribution simplifies the control of the coprocessors and their integration, as managed resources, in edge and continuum systems. In this way, the full potential of FPGA-based edge processing becomes accessible to developers who are not hardware experts.

Users


MDC and QONNX2MDC are open source and address, in the first place, software developers who need hardware acceleration on AMD FPGA-based devices but have no specific expertise in reconfigurable hardware. With MDC they can develop flexible FPGA accelerators for machine learning or other compute-intensive tasks, offload selected software functions to the FPGA, and integrate and deploy the resulting accelerators in edge or continuum systems, with several functionalities, or several threads, served by the same accelerator. Hardware developers who want to explore additional features, such as CNN inference engines whose precision and power consumption can be adapted at runtime, and researchers who want to use FPGAs to accelerate computation can use the tools in the same way. The extensions, APIs and hardware-level thread management developed in MYRTUS reduce the implementation and deployment effort for adopting this kind of coprocessing units beyond the project.

Application Domains


MDC applies to any computation that can be described as a dataflow, and in particular to edge computing. Within MYRTUS it has been used for encryption, video coding, digital signal processing and image processing, such as edge detection, while QONNX2MDC addresses the acceleration of convolutional neural networks at the edge.

References


  • C. Sau, T. Fanni, C. Rubattu, L. Raffo, F. Palumbo, “The Multi-Dataflow Composer tool: An open-source tool suite for optimized coarse-grain reconfigurable hardware accelerators and platform design”, Microprocessors and Microsystems, vol. 80, 103326, 2021. DOI
  • F. Ratto, C. Rubattu, L. Raffo, F. Palumbo, “System-level Support for Multi-thread Coprocessors with Tagged-dataflow and Coarse-grained Reconfigurability on FPGA-based MPSoCs”, Journal of Systems Architecture, 2026. DOI
  • F. Manca, F. Ratto, F. Palumbo, “ONNX-to-Hardware Design Flow for Adaptive Neural-Network Inference on FPGAs”, in Proc. SAMOS 2024. Zenodo
  • F. Manca, F. Ratto, C. Rubattu, L. Raffo, F. Palumbo, “Adaptive CNN Acceleration on FPGAs: Closing the Gap With State-of-the-Art Solutions”, IEEE Embedded Systems Letters, vol. 18, no. 4, pp. 257-261, 2026.
  • MDC Suite (University of Cagliari, University of Sassari): github.com/mdc-suite/mdc/wiki
  • QONNX2MDC, with a complete example of the design flow: github.com/mdc-suite/qonnx2mdc
  • Driver applications for the Kria KV260: github.com/mdc-suite/AXI-based-driver-applications
  • QKeras: github.com/google/qkeras
Competenze

Postato il

25 Gennaio 2025