Skip to main content
QUICK REVIEW

[论文解读] Flex-TPU: A Flexible TPU with Runtime Reconfigurable Dataflow Architecture

Mohammed Elbtity, Peyton Chandarana|arXiv (Cornell University)|Jul 11, 2024
Embedded Systems Design TechniquesComputer Science被引用 3
一句话总结

本文提出 Flex-TPU,一种运行时可重构的 TPU,可针对不同深度神经网络(DNN)层动态切换输入、输出和权重驻留数据流,以最大化性能。通过在每个处理单元(PE)中增加极少的硬件(每个 PE 增加两个多路复用器和一个寄存器),其性能相比传统 TPU 最高提升 2.75 倍,同时仅带来 13.6% 的面积开销和 6.44% 的功耗开销。

ABSTRACT

Tensor processing units (TPUs) are one of the most well-known machine learning (ML) accelerators utilized at large scale in data centers as well as in tiny ML applications. TPUs offer several improvements and advantages over conventional ML accelerators, like graphical processing units (GPUs), being designed specifically to perform the multiply-accumulate (MAC) operations required in the matrix-matrix and matrix-vector multiplies extensively present throughout the execution of deep neural networks (DNNs). Such improvements include maximizing data reuse and minimizing data transfer by leveraging the temporal dataflow paradigms provided by the systolic array architecture. While this design provides a significant performance benefit, the current implementations are restricted to a single dataflow consisting of either input, output, or weight stationary architectures. This can limit the achievable performance of DNN inference and reduce the utilization of compute units. Therefore, the work herein consists of developing a reconfigurable dataflow TPU, called the Flex-TPU, which can dynamically change the dataflow per layer during run-time. Our experiments thoroughly test the viability of the Flex-TPU comparing it to conventional TPU designs across multiple well-known ML workloads. The results show that our Flex-TPU design achieves a significant performance increase of up to 2.75x compared to conventional TPU, with only minor area and power overheads.

研究动机与目标

  • 解决传统 TPU 仅支持单一静态数据流(输入、输出或权重驻留)所带来的性能限制。
  • 克服因 DNN 各层之间计算与内存访问模式差异,而固定数据流映射导致的次优性能。
  • 设计一种支持运行时动态重构数据流的 TPU 架构,以匹配各层特定的工作负载。
  • 在保持高时钟频率和能效的前提下,最小化硬件开销,实现灵活的数据流切换。
  • 在包括 ResNet-18 和其他标准 DNN 在内的多样化机器学习工作负载中,展示其可扩展性与实际性能提升。

提出的方法

  • 在流水线阵列中的每个处理单元(PE)中增强两个多路复用器和一个寄存器,以支持运行时选择输入、输出或权重驻留数据流。
  • 实现控制逻辑,根据工作负载特性与性能分析结果,按层重新配置数据流。
  • 采用动态调度机制,在推理过程中为每个 DNN 层确定最优数据流。
  • 在标准 TPU 设计约束(10 ns 时钟周期,2% 时钟不确定性)下,对 Flex-TPU 进行综合与评估。
  • 通过模拟多种 DNN(如 ResNet-18)和流水线阵列尺寸(8×8 至 256×256),评估其加速比、面积与功耗之间的权衡。
  • 对比 IS、OS、WS 和 Flex-TPU 数据流的执行周期与性能,量化性能增益。

实验结果

研究问题

  • RQ1在 TPU 中对数据流进行运行时重构,是否能显著提升多样化 DNN 层的推理性能?
  • RQ2在基于流水线阵列的 TPU 中,实现动态数据流重构所需的最小硬件开销是多少?
  • RQ3随着流水线阵列尺寸增大(如 128×128 和 256×256),Flex-TPU 的性能如何扩展?
  • RQ4与采用静态数据流的传统 TPU 相比,Flex-TPU 是否能保持相近的时钟频率和能效?
  • RQ5Flex-TPU 是否能在不带来显著面积或功耗成本的前提下,实现在真实世界机器学习工作负载中的显著加速?

主要发现

  • 在部分 DNN 层上,Flex-TPU 相较于传统 TPU 设计最高实现 2.75 倍的性能加速,所有工作负载的平均加速比为 36.7%。
  • 与相同流水线阵列尺寸的传统 TPU 相比,Flex-TPU 的面积开销最大为 13.607%,功耗开销最大为 6.44%。
  • 即使在最小阵列尺寸(8×8)下,关键路径延迟增加也不超过 2.07%,表明对时钟频率影响极小。
  • 在更大规模(128×128 和 256×256)下,Flex-TPU 的平均加速比分别为 1.238× 和 1.349×,优于 OS 数据流基线。
  • 在 ResNet-18 等模型中性能增益最为显著,不同层受益于不同数据流,推理时间最多减少 10.99 ms。
  • 所提出的硬件修改(每个 PE 增加两个多路复用器和一个寄存器)可实现完全的运行时可重构性,且对架构干扰极小。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。