利用即时内核优化赋能边缘设备上的浏览器内深度学习推理
Empowering In-Browser Deep Learning Inference on Edge Devices with Just-in-Time Kernel Optimizations
AI总结:
本文提出浏览器内推理系统 nnJIT,通过 Tensor-Web 编译协同设计和 Web 专用轻量级内核优化空间实现边缘设备上深度学习内核的即时自动生成,在多种硬件上实现最高 8.2 倍加速。
摘要:
Web 正日益成为将 AI 服务交付到边缘设备的主要平台,这使得浏览器内深度学习(DL)推理变得更加重要。然而,边缘设备的异构性,加上 Web 硬件加速实践尚不成熟,阻碍了当前浏览器内推理在目标设备上充分发挥其性能潜力。为了解决这一问题,本文提出了开创性的浏览器内推理系统 nnJIT,它能够为边缘设备即时(JIT)自动生成优化的计算内核。nnJIT 建立在两项新技术之上,在稳步提升性能的同时显著降低了内核搜索和编译开销:Tensor-Web 编译协同设计通过消除冗余和无效的编译遍,将编译成本降低了约 100 倍;Web 专用轻量级内核优化空间通过聚焦 Web 编程要求和高效的设备资源利用来降低内核调优成本,将优化空间从数百万个缩减到仅数十个。nnJIT 在一系列边缘设备上针对现代模型(例如 BART、T5 和 Llama 2)进行了评估,这些设备包括使用不同浏览器以及来自 ARM、Intel、AMD 和 Nvidia 硬件的笔记本电脑和智能手机。结果表明,与现有基线相比,nnJIT 可以在 30 秒内实现高达 8.2 倍的加速。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。