Modern computing workloads commonly involve matrix-matrix multiplication (mmul) as a core computing pattern. Coarse-Grained Reconfigurable Arrays (CGRAs) can flexibly and efficiently support it, since they combine operation-level reconfigurability and high energy efficiency. However, mapping computational kernels that include mmul with state-of-the-art compilation strategies often leads to suboptimal results, since its multi-dimensional structure hampers the uncovering of its inherent parallelism and, ultimately, runtime performance. Here, we take a different position: we introduce a specialized mmul CGRA kernel schedule, parametrizable across different CGRA sizes. Then, we describe a novel compilation methodology that adapts program representations to effectively leverage it, employing polyhedral transformations to analyze complex computational patterns and expose hidden mmul operations through loop reordering and splitting. The identified patterns are then substituted with optimized assembly, while the remaining program sections are compiled independently. CGRA configurations are then generated, encompassing pre-compiled and compiled parts. Our strategy maximizes resource utilization and ultimately run-time performance, even when mmul is not directly apparent in the source code. The experimental results show speedups up to 9.1x across different benchmarks that contain hidden mmuls and CGRA instances of various sizes.


翻译:现代计算任务通常将矩阵乘法(mmul)作为核心计算模式。粗粒度可重构阵列(CGRA)因其兼具操作级可重构性与高能效特性,能够灵活高效地支持此类运算。然而,采用最先进的编译策略映射包含mmul的计算内核往往效果欠佳——其多维结构阻碍了内在并行性的挖掘,最终影响运行时性能。本文提出全新视角:首先引入一种可针对不同CGRA规模参数化的专用mmul内核调度方案,继而描述一种创新的编译方法论,通过多面体变换分析复杂计算模式,借助循环重排序与分裂揭示隐藏的mmul运算,从而调整程序表示以有效利用该调度。识别出的模式将被替换为优化后的汇编代码,其余程序段独立编译。最终生成的CGRA配置包含预编译与编译部分。实验表明,即便源代码中未显式出现mmul,本策略仍能最大化资源利用率与运行时性能,在包含隐式mmul且规模各异的CGRA实例基准测试中,最高实现9.1倍加速比。

0
下载
关闭预览

相关内容

TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
【ACL2024】DoRA:通过动态秩分布增强参数高效微调
专知会员服务
21+阅读 · 2024年5月28日
《分布式多智能体强化学习的编码》加州大学等
专知会员服务
55+阅读 · 2022年11月2日
【综述】多智能体强化学习算法理论研究
深度强化学习实验室
16+阅读 · 2020年9月9日
多智能体强化学习(MARL)近年研究概览
PaperWeekly
38+阅读 · 2020年3月15日
基于RASA的task-orient对话系统解析(一)
AINLP
16+阅读 · 2019年8月27日
干货|掌握机器学习数学基础之优化[1](重点知识)
机器学习研究会
10+阅读 · 2017年11月19日
国家自然科学基金
8+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
VIP会员
最新内容
认知战与交战性质的改变:神经战略视角
专知会员服务
5+阅读 · 5月8日
相关基金
国家自然科学基金
8+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员