WHITE PAPER 04 Research Concept Group A • Execution Architecture

InferPlane Flow DSL

A Domain-Specific Language for Programmable Inference Execution & Memory Residency

Series: Apolynux Modular Intelligence Version: 1.0 Date: 2026-12-01 Read: 10 min read

01 Abstract

A programmable inference fabric requires a formal, inspectable representation of operations, dependencies, memory tiers, and routing policies. Apolynux proposes InferPlane Flow DSL — a conceptual domain-specific language that elevates memory residency, asynchronous expert streaming, and heterogeneous target policies into first-class declarative artifacts independent of any single hardware vendor.

02 Problem Statement

Today, expressing how a large MoE model should pin its dense trunk, stream cold experts from NVMe, and split prefill/decode across CPUs and accelerators requires scattered C++/CUDA code, shell flags, and runtime-specific YAML hacks. This fragmentation prevents static validation, dependency checking, and portable deployment across diverse enterprise hardware.

03 Background & Foundations

Domain-specific languages such as P4 (for network data planes), Halide (for image processing schedules), and TVM (for tensor code generation) proved that separating algorithm specification from scheduling policy unlocks portability and systematic optimisation. InferPlane Flow DSL explores applying this paradigm at the inference execution-flow and memory-residency level.

04 Existing Architectural Limitations

  • Execution and memory policies are tightly buried inside imperative C++/Python runtime loops.
  • No static verification catches illegal dependency orderings or contradictory residency pin constraints before launch.
  • Porting an optimised serving setup from one hardware vendor to another requires manual re-engineering.

05 Proposed Apolynx Architecture

An eight-stage compiler pipeline lowers declarative Flow DSL programs into validated operation dependency graphs and hardware-checked runtime policy tables.

InferPlane Flow DSL Compiler Pipeline — Eight-stage lowering from declarative inference specification to hardware-validated runtime execution plans.
Figure 04 — InferPlane Flow DSL Compiler Pipeline: Eight-stage lowering from declarative inference specification to hardware-validated runtime execution plans. Full-Resolution SVG

Frontend (Lexer, Parser & AST)

Parses MODEL, MEMORY, and FLOW declarations into a strongly typed abstract syntax tree.

Semantic Validator & DAG Builder

Verifies memory-tier feasibility, eliminates cyclic dependencies, and constructs an explicit operation graph.

Hardware Capability Analyser

Queries target CPU, NPU, GPU, and DMA backend capabilities rather than assuming universal operator support.

Plan & Policy Emitter

Generates executable dispatch plans and versioned flow tables installed into the InferPlane runtime.

06 Technical Design

A Flow DSL program declares three core blocks: EXECUTION_MODE, MEMORY residency directives (DENSE_TRUNK, HOT_EXPERTS, COLD_EXPERTS, KV_CACHE), and named FLOW pipelines (such as PREFILL and EXPERT_STREAMING) containing typed OP stages with explicit or AUTO targets and ASYNC flags. Independent graph nodes execute concurrently while edges strictly enforce data dependencies.

07 Execution Workflow

  • 1. Authoring: Systems engineers declare memory tiers and execution flows in a portable Flow DSL file.
  • 2. Lexical & Syntactic Analysis: Compiler parses the specification into an AST and validates types.
  • 3. Graph Generation: Operations become graph nodes; tensor/KV handoffs become directed dependency edges.
  • 4. Capability Matching: Each AUTO or explicit target is verified against discovered local hardware backends.
  • 5. Policy Installation: Compiled execution plans are installed as versioned tables in the InferPlane Control Plane.

08 Algorithms, Interfaces & Specification

Conceptual InferPlane Flow DSL Syntax (Proposal — Not Yet a Working Compiler)
MODEL QWEN_MODEL {

    EXECUTION_MODE HYBRID;

    MEMORY {
        DENSE_TRUNK RAM;
        HOT_EXPERTS PINNED;
        COLD_EXPERTS NVME;
        KV_CACHE DYNAMIC;
    }

    FLOW PREFILL {
        OP TOKENIZE      TARGET CPU;
        OP EMBEDDING     TARGET AUTO;
        OP ATTENTION     TARGET AUTO;
        OP FEED_FORWARD  TARGET AUTO;
    }

    FLOW EXPERT_STREAMING {
        OP SELECT_EXPERT   TARGET CPU;
        OP CHECK_RESIDENCY TARGET MEMORY_MANAGER;
        OP PREFETCH_EXPERT ASYNC TRUE;
        OP EXECUTE_EXPERT  TARGET AUTO;
    }
}

09 Implementation Considerations

  • The syntax shown is a conceptual proposal; grammar stability must follow real experience from Phase 1–3 runtimes.
  • Capability discovery must safely fall back to CPU execution whenever a target NPU or GPU lacks an operator.
  • Debugging tools must map runtime latency traces back to original DSL FLOW and OP declarations.

10 Performance Evaluation Methodology

Assess compiler correctness via static DAG validation tests, measure compilation overhead, and compare compiled execution plans against hand-tuned C/C++ schedules for parity and portability.

11 Limitations & Scope Boundaries

  • Research Concept stage: no production parser or compiler exists yet; scheduled for Phase 6 after runtime validation.
  • Over-abstraction can hide critical hardware nuances if the capability model is too coarse.

12 Open Research Questions & Challenges

  • What minimal set of DSL primitives captures 95% of real-world MoE, RAG, and heterogeneous scheduling needs?
  • How can deadline-aware, cost-aware, and power-aware constraints be expressed cleanly without turning the DSL into a general-purpose programming language?

13 Future Directions

  • Cost-aware and energy-budget annotations directly inside FLOW blocks.
  • Distributed multi-node residency directives targeting peer RDMA RAM tiers.

14 Primary Technical References

  1. P4_16 Language Specification — Declarative match-action pipeline compilation for heterogeneous targets.
  2. Ragan-Kelley et al. (PLDI 2013) — Halide: Decoupling algorithms from schedules for high-performance computation.
  3. Chen et al. (OSDI 2018) — TVM: An Automated End-to-End Optimizing Compiler for Deep Learning.
Related Technical Glossary Terms

Research Status: Research Concept • Scientific Integrity Disclosure

This research programme explicitly separates established computer science principles, existing open-source technologies, Apolynux architectural proposals, experimental implementations, and independently validated results. Apolynux does not claim to have invented OpenFlow, lock-free algorithms, RDMA, hugepages, or Mixture-of-Experts. Our research contribution is the proposed integration of these disciplines into a unified programmable inference architecture, evaluated strictly through repeatable empirical measurement.

Related White Papers

WP 01 Architecture Design

Apolynux InferPlane

WP 07 Experimental Prototype

Predictive MoE Streaming

WP 05 Architecture Design

Heterogeneous Compute Fabric