English

Empowering In-Browser Deep Learning Inference on Edge Devices with Just-in-Time Kernel Optimizations

Artificial Intelligence 2024-07-09 v2

Abstract

Web is increasingly becoming the primary platform to deliver AI services onto edge devices, making in-browser deep learning (DL) inference more prominent. Nevertheless, the heterogeneity of edge devices, combined with the underdeveloped state of Web hardware acceleration practices, hinders current in-browser inference from achieving its full performance potential on target devices. To address this issue, this paper presents the pioneering inbrowser inference system, nnJIT, which enables just-in-time (JIT) auto-generation of optimized computing kernels for edge devices. nnJIT is built upon two novel techniques that significantly reduce kernel search and compilation overhead while improving performance firmly: Tensor-Web Compiling Co-Design lowers compiling costs by around 100X through eliminating redundant and ineffective compiling passes; Web-Specific Lite Kernel Optimization Space reduces kernel tuning costs by focusing on Web programming requirements and efficient device resource utilization, pruning the optimization space from millions to only dozens. nnJIT is evaluated for modern models, e.g., BART, T5, and Llama 2, on a range of edge devices including laptops and smartphones using different browsers and hardware from ARM, Intel, AMD and Nvidia. The results show that nnJIT can achieve up to 8.2X faster within 30 seconds compared to the existing baselines.

Keywords

Cite

@article{arxiv.2309.08978,
  title  = {Empowering In-Browser Deep Learning Inference on Edge Devices with Just-in-Time Kernel Optimizations},
  author = {Fucheng Jia and Shiqi Jiang and Ting Cao and Wei Cui and Tianrui Xia and Xu Cao and Yuanchun Li and Deyu Zhang and Ju Ren and Yunxin Liu and Lili Qiu and Mao Yang},
  journal= {arXiv preprint arXiv:2309.08978},
  year   = {2024}
}

Comments

Accepted by MobiSys'24

R2 v1 2026-06-28T12:23:35.848Z