Pyls: Enabling Python Hardware Synthesis with Dynamic Polymorphism via LCRS Encoding

View at publisher
Authors: Bolei Tong, Yongyan Fang, Chaorui Wang, Qingan Li, Jingling Xue, Mengting Yuan
Cited by: 0
References: 31

Abstract

Python dominates AI development and is the most widely used dynamic programming language, but synthesizing its polymorphic functions into hardware remains challenging. Existing HLS solutions support only static subsets of Python, forcing CPU offload with costly communication overhead. We present Pyls, the first framework that synthesizes dynamically polymorphic Python into monolithic hardware via Left-Child Right-Sibling (LCRS) encoding. Key to our approach is representing all Python objects as LCRS trees, enabling uniform hardware handling of dynamic types. Pyls automatically converts objects to fixed-width formats, generates XLS IR designs, and implements a tree memory architecture for efficient runtime type resolution. On FPGA platforms, Pyls demonstrates speedups of 5.19× and 3.98× over two ASIC CPUs, 303.29× over a soft-core processor, and 282.66× over a heterogeneous SoC design.

Fields of Study & Subjects

Embedded Systems Design Techniques VLSI and FPGA Design Techniques Embedded Systems and FPGA Applications

Publication details

Journal / source
Proceedings of the CGO/Proceedings of the ... CGO
Pages
123–135
Publication date
31 January 2026
Language
EN