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

© 2019 by the author(s). 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...

Full description

Bibliographic Details
Main Authors: Mendis, C, Renda, A, Amarasinghe, S, Carbin, M
Other Authors: Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory
Format: Article
Language:English
Published: 2021
Online Access:https://hdl.handle.net/1721.1/137422
_version_ 1826204712603484160
author Mendis, C
Renda, A
Amarasinghe, S
Carbin, M
author2 Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory
author_facet Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory
Mendis, C
Renda, A
Amarasinghe, S
Carbin, M
author_sort Mendis, C
collection MIT
description © 2019 by the author(s). 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.
first_indexed 2024-09-23T12:59:51Z
format Article
id mit-1721.1/137422
institution Massachusetts Institute of Technology
language English
last_indexed 2024-09-23T12:59:51Z
publishDate 2021
record_format dspace
spelling mit-1721.1/1374222023-02-14T19:04:16Z IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks Mendis, C Renda, A Amarasinghe, S Carbin, M Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory © 2019 by the author(s). 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. 2021-11-05T11:35:22Z 2021-11-05T11:35:22Z 2019-06 2020-11-23T20:16:17Z Article http://purl.org/eprint/type/ConferencePaper https://hdl.handle.net/1721.1/137422 Mendis, C, Renda, A, Amarasinghe, S and Carbin, M. 2019. "IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks." 36th International Conference on Machine Learning, ICML 2019, 2019-June. en http://proceedings.mlr.press/v97/mendis19a/mendis19a.pdf 36th International Conference on Machine Learning, ICML 2019 Creative Commons Attribution-Noncommercial-Share Alike http://creativecommons.org/licenses/by-nc-sa/4.0/ application/pdf arXiv
spellingShingle Mendis, C
Renda, A
Amarasinghe, S
Carbin, M
IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
title IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
title_full IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
title_fullStr IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
title_full_unstemmed IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
title_short IThemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networks
title_sort ithemal accurate portable and fast basic block throughput estimation using deep neural networks
url https://hdl.handle.net/1721.1/137422
work_keys_str_mv AT mendisc ithemalaccurateportableandfastbasicblockthroughputestimationusingdeepneuralnetworks
AT rendaa ithemalaccurateportableandfastbasicblockthroughputestimationusingdeepneuralnetworks
AT amarasinghes ithemalaccurateportableandfastbasicblockthroughputestimationusingdeepneuralnetworks
AT carbinm ithemalaccurateportableandfastbasicblockthroughputestimationusingdeepneuralnetworks