LoopLynx: A Scalable Dataflow Architecture for Efficient LLM Inference

Authors: Jianing Zheng, Gang Chen (Sun Yat-sen University) | arXiv: 2504.09561v1 (Apr 2025) | Venue: IEEE conference | PDF: LoopLynx_Scalable_Dataflow_LLM_Inference_2025.pdf

一句话总结

FPGA 上的 hybrid spatial-temporal dataflow:把 LLM 操作符实现为大型 dataflow kernel (MDK),state-machine 调度器在时序上复用同一组 MDK —— 解决了”spatial dataflow 在 decode 串行依赖下利用率不足”这一根本问题。

核心问题与解法

“the parallel processing capabilities of such dataflow architectures are largely underutilized in the decoding phase due to the sequential processing pattern.”

架构
Temporal (instruction-driven)灵活、kernel 可复用串行执行、资源利用率低
Spatial (纯 dataflow)流水吞吐、kernel 全活跃decode 串行依赖下,task-level pipeline 不连续
LoopLynx (hybrid)spatial 显式 kernel + temporal 隐式调度设计复杂度高

三个关键技术

  1. Macro Dataflow Kernels (MDK): Fused MP / MHA / LN&Res 通过共享 buffer 互连,由 scheduler 时序复用
  2. Head-wise pipelining: 重新排列多头注意力计算 —— head_i 的 softmax 隐入 head_{i+1} 的 attention 计算中
  3. Transmission latency hiding: 多 FPGA 节点间 ring network 同步开销被 dataflow 计算掩盖(仅最后一个 block 暴露同步成本)

资源占用(Xilinx Alveo U50 单 SLR 节点)

组件DSPLUTFFBRAM
Fused MP52234K56K241
Fused MHA38238K45K16
Fused LN19223K30K240
DMA016K28K97
节点总计1128128K185K595

频率 285 MHz(place & route 通过 FIFO 解耦实现)。

评测

  • 模型:GPT-2 (345M) + W8A8 (smoothquant)
  • 平台:AMD Alveo U50,1-2 SLR / 卡,2-4 节点
  • 2-node: 1.67× A100 latency、2.3× energy
  • 4-node: 2.52× A100、2.7× energy
  • 优势集中在长生成([32:512]、[64:512]、[128:512])
  • prefill 短时 GPU 更强(批处理)

对 Direction 2(Compiler-Aware Decode on Mesh-NoC)的启示

  • “spatial dataflow 在 decode 上利用率不足”是普遍问题,不只 WSE —— FPGA / RDU / WSE 都有
  • 解决思路多样:LoopLynx 用 hybrid + state machine scheduler;WaferLLM 用 replicate + K-tree allreduce;Cerebras vendor 用 pipeline
  • 编译器视角的共同机会:用 MLIR/TVM 在 pass 层面显式建模 “spatial-temporal 切换”和”串行依赖下的 kernel 复用”

与 wiki 已有内容关联

Citations

[1] LoopLynx_Scalable_Dataflow_LLM_Inference_2025.pdf — Zheng, Chen (2025)