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

Charith Mendis, Alex Renda, Saman Amarasinghe, Michael Carbin
8/21/2018
191 citations
cs.DCcs.LGstat.ML

Official code: ithemal/Ithemal (155 stars, Python, MIT, last commit 2021-11-30).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

ithemal/IthemalOfficial100%
MIT

Instruction THroughput Estimator using MAchine Learning (ITHEMAL)

15537Python, COct 4, 20185 years agoMIT

Similar Papers

Cite this paper

@article{mendis2018ithemal,
  title  = {Ithemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks},
  author = {Charith Mendis and Alex Renda and Saman Amarasinghe and Michael Carbin},
  year   = {2018},
  eprint = {1808.07412},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1808.07412}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1808.07412.svg)](https://codeofpaper.com/paper/1808.07412)

Discussion