Ithemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks

Ithemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
复制标题

DOI:
--
复制
发表时间:
2018-08
期刊:
ArXiv
影响因子:
--
通讯作者:
Charith Mendis;Saman P. Amarasinghe;Michael Carbin
Charith Mendis;Saman P. Amarasinghe;Michael Carbin
中科院分区:
其他
文献类型:
--
作者:
Charith Mendis;Saman P. Amarasinghe;Michael Carbin

文献摘要

相似文献

预测处理器在稳定状态下执行汇编指令块所需的时钟周期数(吞吐量)对编译器设计人员和性能工程师都很重要。在具有复杂处理器微架构的现代x86-64复杂指令集计算机(CISC)机器中,构建这样做的分析模型特别复杂,因为它是繁琐的,容易出错的,并且必须针对每一代处理器从头开始执行。在本文中,我们提出了Ithemal,第一个工具,学习预测的吞吐量的一组指令。Ithemal使用一种基于分层LSTM的方法,根据基本块中指令的操作码和操作数来预测吞吐量。我们表明,Ithemal比目前在编译器后端和静态机器代码分析器中使用的最先进的手写工具更准确。特别是,我们的模型的误差不到最先进的分析模型(LLVM的llvm-mca和英特尔的IACA)的一半。Ithemal还能够像上述工具一样快速地预测这些吞吐量值,并且可以轻松地在各种处理器微架构中移植,只需最少的开发人员工作。
Predicting the number of clock cycles a processor takes to execute a block of assembly instructions in steady state (the throughput) is important for both compiler designers and performance engineers. Building an analytical model to do so is especially complicated in modern x86-64 Complex Instruction Set Computer (CISC) machines with sophisticated processor microarchitectures in that it is tedious, error prone, and must be performed from scratch for each processor generation. In this paper we present Ithemal, the first tool which learns to predict the throughput of a set of instructions. Ithemal uses a hierarchical LSTM--based approach to predict throughput based on the opcodes and operands of instructions in a basic block. We show that Ithemal is more accurate than state-of-the-art hand-written tools currently used in compiler backends and static machine code analyzers. In particular, our model has less than half the error of state-of-the-art analytical models (LLVM's llvm-mca and Intel's IACA). Ithemal is also able to predict these throughput values just as fast as the aforementioned tools, and is easily ported across a variety of processor microarchitectures with minimal developer effort.