Hello everyone,
I am writing to share an idea for an application for MLIR and I want to get a feedback and guidance if this idea seems feasible. My long-term vision is to create a new compiler infrastructure for the networking and digital signal processing (DSP) domains—akin to what CIRCT is for hardware design—but I plan to start with a narrow, concrete Proof of Concept.
Motivation:
Today, designing and implementing network and DSP systems (e.g., 5G/6G PHY, novel error-correcting codes, smartNIC data planes) involves a fragmented, inefficient workflow:
-
Algorithm designers prototype in high-level, slow environments like Python/NumPy or MATLAB.
-
Performance validation often requires re-implementation in C++ for tools like NS-3, introducing potential for error and slowing iteration.
-
Implementation for hardware requires a completely separate and manual redesign using specialized hardware design languages.
This fragmentation exists because there is no unified, high-level, and performant representation for the algorithms that span simulation and implementation. I think MLIR maybe perfect for this work.
Vision:
The long-term goal is to create a multi-level compiler infrastructure where:
-
High-level dialects allow engineers to describe components and intents (e.g., data plane programs, modulation schemes, control logic).
-
Lowering and optimization passes refine these descriptions, enabling formal verification, performance analysis, and hardware/software co-design.
-
A variety of backends can target simulation, eBPF for kernels, or FPGAs/ASICs via collaboration with projects like CIRCT.
This would enable a continuous design flow from a high-level model to a verified, deployed implementation, all within a single framework.
Approach:
I am thinking of starting this journey by building the computational engine first: a high-performance, JIT-compiled simulator for physical-layer communication systems. This is a high-value starting point because it solves an immediate pain point (slow simulation times) and validates the core technical thesis.
The Specific PoC: A tool that can simulate a standard Bit Error Rate (BER) curve for BPSK modulation in an AWGN channel (I don’t know much about digital communication but I think it is like “Hello, World“ in digital communication, if someone have a better starting point please suggest).
Technical Plan for PoC:
-
Define a
sim_phy/or whateverDialect: Create a dialect with foundational operations (bpsk_modulate,awgn_noise). -
Leverage the JIT: Lower these operations to the LLVM dialect and use the JIT infrastructure for execution. Initially, complex operations (like Gaussian noise generation) will lower to calls to a small runtime library.
-
Demonstrate Value: The success metric is a significant speedup (e.g., 10-100x) for the BER simulation compared to a naive Python/NumPy implementation, proving the performance advantage of the compiled approach (that is what I think)
This PoC is not the end goal, but the first step. It creates the foundation upon which the larger vision can be built.
Call for Feedback & Guidance
I am sharing this early to align my efforts with the community’s best practices and to learn from your expertise. Any advice would be immensely valuable:
-
Architectural Feedback: Does this vision of a “CIRCT for Networking/DSP” seem coherent? Are there fundamental constraints in MLIR I might be overlooking?
-
Technical Approach: For the PoC, is the plan to lower
awgn_noiseto a runtime function a pragmatic start? Are there better patterns for integrating “stateful” operations like a PRNG into a pure MLIR lowering pipeline? -
Prior Art: I am aware of P4MLIR. Are there other ongoing efforts to apply MLIR to networking, simulation, or signal processing that I should be aware of or potentially collaborate with?
-
Code-Review and Mentoring(Maybe): I am a software engineer with less than two years of experience, I am even going to have my FIRST compiler job next week (ML compiler engineer), so it would be great if someone more experienced helps with reviewing the patches (and maybe provide some guidance).
I am enthusiastic about starting this work and contributing back to the community. Thank you for your time and for building the incredible infrastructure that makes ideas like this possible.
Best regards,
Mohamed