Fully-fused Multi-Layer Perceptrons on Intel Data Center GPUs
作者: Kai Yuan, Christoph Bauinger, Xiangyi Zhang, Pascal Baehr, Matthias Kirchhart, Darius Dabert, Adrien Tousnakhoff, Pierre Boudier, Michael Paulitsch
分类: cs.AI
发布日期: 2024-03-26
🔗 代码/项目: GITHUB
💡 一句话要点
提出SYCL实现的多层感知器以提升Intel GPU性能
🎯 匹配领域: 支柱三:空间感知与语义 (Perception & Semantics)
关键词: 多层感知器 SYCL实现 Intel GPU 性能优化 图像压缩 神经辐射场 物理信息机器学习
📋 核心要点
- 现有的多层感知器实现往往受到全局内存访问速度的限制,导致性能瓶颈,尤其是在推理和训练阶段。
- 本文提出了一种SYCL实现,通过在每层中融合操作,最大化数据重用,从而减少全局内存访问,提高算术强度。
- 实验结果表明,本文实现的推理性能比Nvidia H100 GPU上的CUDA实现高出2.84倍,训练性能提高1.75倍,显示出显著的性能优势。
📝 摘要(中文)
本文提出了一种针对Intel数据中心GPU Max 1550的多层感知器(MLP)的SYCL实现,并进行了优化。为了提高性能,作者通过在每一层中融合操作,最大化数据重用,减少了慢速全局内存访问。使用简单的屋顶线模型,结果显示这种方法显著提高了算术强度,尤其在推理任务中表现突出。与类似的CUDA实现相比,本文的实现推理性能提升高达2.84倍,训练性能提升1.75倍。此外,论文展示了在图像压缩、神经辐射场和物理信息机器学习等领域的高效性,均超越了Intel Extension for PyTorch和Nvidia H100 GPU的CUDA实现,提升幅度最高可达30倍和19倍。代码可在https://github.com/intel/tiny-dpcpp-nn获取。
🔬 方法详解
问题定义:本文旨在解决现有多层感知器(MLP)实现中全局内存访问速度慢的问题,这一问题导致了性能瓶颈,尤其在推理和训练过程中表现明显。
核心思路:通过在每一层中融合操作,最大化数据重用,减少对慢速全局内存的访问,从而提高算术强度和整体性能。这样的设计能够有效利用GPU的寄存器和共享内存,提升计算效率。
技术框架:整体架构包括数据预处理、层间操作融合、算术计算和结果输出等模块。每一层的操作通过SYCL实现进行优化,确保数据在寄存器和共享内存中的高效重用。
关键创新:最重要的技术创新在于通过操作融合和数据重用策略显著提高了算术强度,这与传统的CUDA实现相比,能够在Intel GPU上实现更高的性能。
关键设计:在实现中,采用了特定的参数设置和网络结构设计,以确保在不同应用场景下的高效性,损失函数和优化策略也经过精心选择,以适应不同的任务需求。
🖼️ 关键图片
📊 实验亮点
实验结果显示,本文的SYCL实现相比于Intel Extension for PyTorch在同一Intel GPU上性能提升高达30倍,而与Nvidia H100 GPU上的CUDA实现相比,推理性能提升至2.84倍,训练性能提升1.75倍,展现出显著的优势。
🎯 应用场景
该研究的潜在应用领域包括图像压缩、神经辐射场和物理信息机器学习等。通过提升多层感知器在Intel GPU上的性能,能够为相关领域的研究和工业应用提供更高效的计算支持,推动技术进步和应用落地。
📄 摘要(原文)
This paper presents a SYCL implementation of Multi-Layer Perceptrons (MLPs), which targets and is optimized for the Intel Data Center GPU Max 1550. To increase the performance, our implementation minimizes the slow global memory accesses by maximizing the data reuse within the general register file and the shared local memory by fusing the operations in each layer of the MLP. We show with a simple roofline model that this results in a significant increase in the arithmetic intensity, leading to improved performance, especially for inference. We compare our approach to a similar CUDA implementation for MLPs and show that our implementation on the Intel Data Center GPU outperforms the CUDA implementation on Nvidia's H100 GPU by a factor up to 2.84 in inference and 1.75 in training. The paper also showcases the efficiency of our SYCL implementation in three significant areas: Image Compression, Neural Radiance Fields, and Physics-Informed Machine Learning. In all cases, our implementation outperforms the off-the-shelf Intel Extension for PyTorch (IPEX) implementation on the same Intel GPU by up to a factor of 30 and the CUDA PyTorch version on Nvidia's H100 GPU by up to a factor 19. The code can be found at https://github.com/intel/tiny-dpcpp-nn.