Skip to main content
QUICK REVIEW

[论文解读] cltorch: a Hardware-Agnostic Backend for the Torch Deep Neural Network Library, Based on OpenCL

Hugh Perkins|arXiv (Cornell University)|Jun 15, 2016
Advanced Neural Network Applications参考文献 27被引用 11
一句话总结

cltorch 为 Torch 深度学习库提供了一个基于 OpenCL 的、硬件无关的后端,使用户能够在来自 AMD、NVIDIA 和 Intel 的多种 GPU 上训练深度神经网络。通过利用可移植的 OpenCL 内核,并采用隐式 GEMM 和 GEMM 适配等技术优化卷积层,该框架在 AlexNet、VGG 和 GoogleNet 等模型上实现了具有竞争力的性能。

ABSTRACT

This paper presents cltorch, a hardware-agnostic backend for the Torch neural network framework. cltorch enables training of deep neural networks on GPUs from diverse hardware vendors, including AMD, NVIDIA, and Intel. cltorch contains sufficient implementation to run models such as AlexNet, VGG, Overfeat, and GoogleNet. It is written using the OpenCL language, a portable compute language, governed by the Khronos Group. cltorch is the top-ranked hardware-agnostic machine learning framework on Chintala's convnet-benchmarks page. This paper presents the technical challenges encountered whilst creating the cltorch backend for Torch, and looks in detail at the challenges related to obtaining a fast hardware-agnostic implementation. The convolutional layers are identified as the key area of focus for accelerating hardware-agnostic frameworks. Possible approaches to accelerating the convolutional implementation are identified including: implementation of the convolutions using the implicitgemm or winograd algorithm, using a GEMM implementation adapted to the geometries associated with the convolutional algorithm, or using a pluggable hardware-specific convolutional implementation.

研究动机与目标

  • 通过提供一个硬件无关的后端,使 Torch 能够在非 NVIDIA GPU 上运行。
  • 克服基于 CUDA 的框架与非 CUDA 替代方案在 GPU 工作负载上的性能差距。
  • 解决在异构 GPU 架构上实现高速推理与训练的挑战。
  • 通过支持可移植的计算框架,促进深度学习硬件领域的厂商竞争。
  • 为未来基于 OpenCL 或类似标准的可移植深度学习框架提供基础。

提出的方法

  • 使用 OpenCL(由 Khronos Group 管理的可移植并行计算语言)实现 Torch 的后端。
  • 使用 OpenCL 内核实现核心深度学习操作,包括卷积层,确保在 AMD、NVIDIA 和 Intel GPU 上的可移植性。
  • 通过隐式 GEMM 和基于 Winograd 的卷积等算法技术优化卷积层。
  • 将现有的 GEMM 实现适配卷积层的几何模式,以提升性能。
  • 探索可插拔的、硬件特定的卷积实现,支持在运行时动态加载以实现最大优化。
  • 提出一种运行时链接模型,即通用框架通过 Khronos 标准化 API 层调用硬件优化的卷积函数。

实验结果

研究问题

  • RQ1如何在不牺牲性能的前提下,使深度学习框架在多种 GPU 厂商之间实现可移植性?
  • RQ2在硬件无关的深度学习后端中,特别是在卷积层中,关键性能瓶颈是什么?
  • RQ3基于 OpenCL 的实现能否在多厂商硬件上实现与基于 CUDA 的框架相媲美的训练速度?
  • RQ4哪些算法和实现策略可以加速可移植深度学习后端中的卷积运算?
  • RQ5新兴标准如 HCC 在多厂商之间能否显著缩小 CUDA 与非 CUDA 代码库之间的差距?

主要发现

  • cltorch 成功实现了使用 OpenCL 在 AMD、NVIDIA 和 Intel GPU 上训练 AlexNet、VGG、Overfeat 和 GoogleNet 等复杂模型。
  • 该框架在 Chintala 的 convnet-benchmarks 页面上被评为硬件无关机器学习框架中的第一名,表明其相对于其他方案具有出色的性能表现。
  • 卷积层被识别为可移植深度学习后端中的主要性能瓶颈,需要专门的优化策略。
  • 隐式 GEMM、Winograd 算法以及针对卷积几何结构定制的 GEMM 适配技术,在 OpenCL 上显著提升了性能。
  • 可插拔的、硬件特定的卷积实现为实现接近原生性能提供了可行路径,同时保持了可移植性。
  • 新兴标准如 HCC 可能缩小 CUDA 与非 CUDA 代码库之间的开发差距,但其在多厂商中的长期采用仍不确定。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。