Exploiting Native Hardware Heterogeneity: Custom GPSIMD Operators for Accelerating Emerging LLM Memory on AWS Trainium
Zifan He, Jason Cong
Abstract
Emerging memory modules of large language models, such as Engram in DeepSeek-V4.1-Flash, mix irregular integer work (a 64-bit n-gram hash and a sparse table lookup) with dense computation (a GEMM and a gate). When deploying on a GPU-FPGA system, we can disaggregate operations to different devices for Engram to speed up by 5.9×. AWS Trainium provides a similar heterogeneity natively: each Trainium NeuronCore pairs dense engines with a customizable GPSIMD Engine, and all engines share the on-chip SBUF. However, the Neuron Kernel Interface (NKI) exposes the GPSIMD cores only through fixed built-in instructions, and the official GPSIMD custom-operator toolchain does not support Trainium 2 or 3 and cannot be used with NKI. In this work, we build a toolchain that compiles C++ custom operators for the GPSIMD cores and injects them into the compiled NEFF from the NKI kernel on Trainium 3, expanding the customizability of GPSIMD with the current software stack. Over a hand-optimized NKI baseline of DeepSeek-V4.1-Flash, two GPSIMD operators speed up the n-gram hashing by 1.79× at decode, the table retrieval by up to 4.95×, and the whole Engram computation by up to 1.14×.
Create a lesson
Related papers
LeanSparse: Memory-Efficient Serving for Native Sparse-Attention LLMs
Shared title terminology · Zaifeng Pan, Chris Wu, Xinwei Qiang et al.
Same Function, Different CPU: Quantifying Hardware Heterogeneity in Commercial FaaS Platforms
Shared title terminology · Jonas Heisterberg, Natalie Carl, Trever Schirmer et al.
StarMPI-SVD: Distributed-Memory Parallel Star-M Tensor SVD
Shared title terminology · Naman Pesricha, Grey Ballard, Srinivas Eswar et al.
Accelerating Mixture of Block Attention via Dynamic Routing, KV-Centric Execution and Runtime Pipelining
Shared title terminology · Yingqi Shi, Junru Lu, Yun Liu et al.
Matching Architecture to Workload: Comparing RISC-V Parallel Accelerators for Energy-Efficient Embedded Computing
Shared title terminology · Luca Colombo, Luigi Ghionda, Amirhossein Kiamarzi et al.
LEDGE: An Efficient Simulator for Distributed LLM Serving on Heterogeneous Edge Devices
Shared title terminology · Zihao Wang, Ye Tian, Tajana Rosing et al.