Dynamic behaviors are becoming prevalent in tensor applications, like machine learning, where many widely used models contain data-dependent tensor shapes and control flow. However, the limited expressiveness of prior programming abstractions for spatial dataflow accelerators (SDAs) forces these dynamic behaviors to be implemented statically and/or unoptimized. To address these challenges, we present Streaming Tensor Programs (STeP), a streaming abstraction that enables dynamic tensor workloads to run efficiently on SDAs. STeP introduces flexible routing operators, an explicit memory hierarchy, and symbolic-shape semantics that expose dynamic data rates and tensor dimensions. These capabilities unlock new optimizations, like dynamic tiling, dynamic parallelization, and configuration time-multiplexing, that adapt SDA execution to dynamic behaviors while preserving dataflow efficiency. Using a cycle-approximate simulator on representative LLM layers and a full model with real-world traces, STeP enables: dynamic tiling that breaks the Pareto-optimal frontier from prior work, dynamic parallelization that improves latency by ~2.72x, and configuration time-multiplexing that increases compute utilization by ~2.64x over prior SDA abstractions and their implementations.


翻译:动态行为在张量应用中日益普遍,例如机器学习领域,许多广泛使用的模型包含数据依赖的张量形状和控制流。然而,现有面向空间数据流加速器的编程抽象表达能力有限,迫使这些动态行为以静态方式实现且/或未经优化。为应对这些挑战,我们提出了流式张量程序,这是一种流式抽象,能使动态张量工作负载在空间数据流加速器上高效运行。该框架引入了灵活的路由算子、显式内存层次结构以及符号形状语义,从而暴露动态数据速率和张量维度。这些特性解锁了新的优化技术,如动态分块、动态并行化及配置时分复用,使空间数据流加速器执行能适应动态行为,同时保持数据流效率。通过在典型大语言模型层和具有真实世界轨迹的完整模型上使用周期近似模拟器,该框架实现了:动态分块技术突破了先前工作的帕累托最优边界,动态并行化将延迟降低约2.72倍,配置时分复用较先前的空间数据流加速器抽象及其实现将计算利用率提升约2.64倍。

0
下载
关闭预览

相关内容

【实用书】流数据处理,Streaming Data,219页pdf
专知会员服务
78+阅读 · 2020年4月24日
专知会员服务
13+阅读 · 2019年11月23日
概述自动机器学习(AutoML)
人工智能学家
19+阅读 · 2019年8月11日
面试题:请简要介绍下tensorflow的计算图
七月在线实验室
14+阅读 · 2019年6月10日
深度学习时代的图模型,清华发文综述图网络
GAN生成式对抗网络
13+阅读 · 2018年12月23日
【大数据】StreamSets:一个大数据采集工具
产业智能官
40+阅读 · 2018年12月5日
<好书推荐> -《Pro Deep Learning with TensorFlow》分享
深度学习与NLP
12+阅读 · 2018年9月13日
tensorflow系列笔记:流程,概念和代码解析
北京思腾合力科技有限公司
30+阅读 · 2017年11月11日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员