AI kernel compilation for edge devices depends on the compiler's ability to exploit parallelism and hide memory latency in the presence of hierarchical memory and explicit data movement. This paper reports a benchmark methodology and corresponding results for three compiler-controlled mechanisms in an MLIR-based compilation pipeline: vectorization (Vec), multi-threading (MT) across hardware contexts, and double buffering (DB) using ping--pong scratchpad buffers to overlap DMA transfers with compute. Using Triton/Inductor-generated kernels, we present an ablation ladder that separates the contribution of Vec, MT, and DB, and we quantify how MT speedup scales with problem size using GELU as a representative activation kernel. The results show that vectorization provides the primary gain for bandwidth-sensitive kernels, MT delivers substantial improvements once scheduling overhead is amortized, and DB provides additional benefit when transfers and compute can be overlapped (i.e., outside the extremes of purely memory-bound or purely compute-bound behavior).


翻译:面向边缘设备的AI内核编译依赖于编译器在存在分层内存和显式数据移动的情况下利用并行性和隐藏内存延迟的能力。本文报告了一种基准测试方法及相应结果,该方法针对基于MLIR的编译流水线中的三种编译器控制机制:向量化(Vec)、跨硬件上下文的多线程(MT)以及使用乒乓暂存缓冲区通过双缓冲(DB)实现DMA传输与计算的重叠。利用Triton/Inductor生成的内核,我们提出了一种消融阶梯来分离Vec、MT和DB的贡献,并以GELU作为代表性激活函数内核,量化了MT加速比如何随问题规模扩展。结果表明:向量化为带宽敏感型内核提供了主要增益;一旦调度开销被分摊,多线程能带来显著改进;当传输与计算能够重叠时(即在纯粹内存受限或纯粹计算受限的极端情况之外),双缓冲可提供额外收益。

0
下载
关闭预览

相关内容

编译器(Compiler),是一种计算机程序,它会将用某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)。
《面向边缘AI应用的高性能高能效架构探索》156页
专知会员服务
36+阅读 · 2025年4月12日
《人机交互中机器学习的透明通信》论文
专知会员服务
33+阅读 · 2023年3月12日
【阿里巴巴】 AI编译器,AI Compiler @ Alibaba,21页ppt
专知会员服务
45+阅读 · 2019年12月22日
深度学习中Attention Mechanism详细介绍:原理、分类及应用
深度学习与NLP
10+阅读 · 2019年2月18日
AI综述专栏 | 深度神经网络加速与压缩
人工智能前沿讲习班
32+阅读 · 2018年10月31日
清华大学:刘洋——基于深度学习的机器翻译
人工智能学家
12+阅读 · 2017年11月13日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
最新内容
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
3+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
4+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
14+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
8+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
战略前沿人工智能的再思考(中文)
专知会员服务
8+阅读 · 5月29日
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
6+阅读 · 5月29日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员