Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c53791c
commit a91558f
Showing
17 changed files
with
4,879 additions
and
648 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
\begin{abstract} | ||
Accurate automatic optimization heuristics are necessary for dealing with the | ||
complexity and diversity of modern hardware and software. Machine learning is a | ||
proven technique for learning such heuristics, but its success is bound by the | ||
quality of the features used. These features must be hand crafted by developers | ||
through a combination of expert domain knowledge and trial and error. This makes | ||
the quality of the final model directly dependent on the skill and available | ||
time of the system architect. | ||
Accurate automatic optimization heuristics are necessary for dealing with the complexity and diversity of modern hardware and software. Machine learning is a proven technique for learning such heuristics, but its success is bound by the quality of the features used. These features must be hand crafted by developers through a combination of expert domain knowledge and trial and error. This makes the quality of the final model directly dependent on the skill and available time of the system architect. | ||
|
||
Our work introduces a better way for building heuristics. We develop a deep | ||
neural network that learns heuristics over raw code, entirely without using code | ||
features. The neural network simultaneously constructs appropriate | ||
representations of the code and learns how best to optimize, removing the need | ||
for manual feature creation. Further, we show that our neural nets can transfer | ||
learning from one optimization problem to another, improving the accuracy of new | ||
models, without the help of human experts. | ||
Our work introduces a better way for building heuristics. We develop a deep neural network that learns heuristics over raw code, entirely without using code features. The neural network simultaneously constructs appropriate representations of the code and learns how best to optimize, removing the need for manual feature creation. Further, we show that our neural nets can transfer learning from one optimization problem to another, improving the accuracy of new models, without the help of human experts. | ||
|
||
We compare the effectiveness of our automatically generated heuristics against | ||
ones with features hand-picked by experts. We examine two challenging tasks: | ||
predicting optimal mapping for heterogeneous parallelism and GPU thread | ||
coarsening factors. In 89\% of the cases, the quality of our fully automatic | ||
heuristics matches or surpasses that of state-of-the-art predictive models using | ||
hand-crafted features, providing on average 14\% and 12\% more performance with | ||
no human effort expended on designing features. | ||
We compare the effectiveness of our automatically generated heuristics against ones with features hand-picked by experts. We examine two challenging tasks: predicting optimal mapping for heterogeneous parallelism and GPU thread coarsening factors. In 89\% of the cases, the quality of our fully automatic heuristics matches or surpasses that of state-of-the-art predictive models using hand-crafted features, providing on average 14\% and 12\% more performance with no human effort expended on designing features. | ||
\end{abstract} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
\section*{Acknowledgments} | ||
|
||
This work was supported by the UK Engineering and Physical Sciences Research | ||
Council under grants EP/L01503X/1 (CDT in Pervasive Parallelism), EP/M01567X/1 | ||
(SANDeRs), EP/M015793/1 (DIVIDEND), and EP/P003915/1 (SUMMER). The code and data | ||
for this paper are available at: \url{https://chriscummins.cc/pact17}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,9 @@ | ||
\section{Conclusions} \label{sec:conclusion} | ||
|
||
Applying machine learning to compile-time and runtime optimizations requires | ||
generating features first. This is a time consuming process, it needs | ||
supervision by an expert, and even then we cannot be sure that the selected | ||
features are optimal. In this paper we present a novel tool for building | ||
optimization heuristics, DeepTune, which forgoes feature extraction entirely, | ||
relying on powerful language modeling techniques to automatically build complex | ||
and effective representations of programs directly from raw source code. The | ||
result translates into a huge reduction in development effort, improved | ||
heuristic performance, and more simple model designs. | ||
Applying machine learning to compiler and runtime optimizations requires generating features first. This is a time consuming process, it needs supervision by an expert, and even then we cannot be sure that the selected features are optimal. In this paper we present a novel tool for building optimization heuristics, DeepTune, which forgoes feature extraction entirely, relying on powerful language modeling techniques to automatically build effective representations of programs directly from raw source code. The result translates into a huge reduction in development effort, improved heuristic performance, and more simple model designs. | ||
|
||
Our approach is fully automated. Using DeepTune, compiler developers no longer | ||
need to spend months using statistical methods and profile counters to select | ||
program features via trial and error. It is worth mentioning that we do not | ||
tailor our model design or parameters for the optimization task at hand, yet we | ||
achieve performance on par with and in most cases \emph{exceeding} state-of-the- | ||
art predictive models. | ||
Our approach is fully automated. Using DeepTune, developers no longer need to spend months using statistical methods and profile counters to select program features via trial and error. It is worth mentioning that we do not tailor our model design or parameters for the optimization task at hand, yet we achieve performance on par with and in most cases \emph{exceeding} state-of-the-art predictive models. | ||
|
||
We used DeepTune to automatically construct heuristics for two challenging | ||
optimization problems: selecting the optimal execution device for OpenCL | ||
kernels, and selecting OpenCL thread coarsening factors. In both cases, we | ||
outperform state-of-the-art predictive models, achieving performance | ||
improvements of 14\% and 12\%, respectively. We have also shown that the | ||
DeepTune architecture allows us to exploit information learned from another | ||
optimization problem to give the learning a boost. Doing so provides up to a | ||
16\% performance improvement when training using a handful of training programs. | ||
We suspect that this approach will be useful for other optimization tasks for | ||
which training programs are a scarce resource. | ||
We used DeepTune to automatically construct heuristics for two challenging compiler and runtime optimization problems, find that, in both cases, we outperform state-of-the-art predictive models by 14\% and 12\%. We have also shown that the DeepTune architecture allows us to exploit information learned from another optimization problem to give the learning a boost. Doing so provides up to a 16\% performance improvement when training using a handful of programs. We suspect this approach will be useful in other domains for which training data are a scarce resource. | ||
|
||
In future work, we will extend our heuristic construction approach by | ||
automatically learning dynamic features over raw data; apply unsupervised | ||
learning techniques~\cite{Le2012} over unlabeled source code to further improve | ||
learned representations of programs; and deploy trained DeepTune heuristic | ||
models to low power embedded systems using optimization and compression of | ||
neural networks~\cite{Han2015}. | ||
In future work, we will extend our heuristic construction approach by automatically learning dynamic features over raw data; apply unsupervised learning techniques~\cite{Le2012} over unlabeled source code to further improve learned representations of programs; and deploy trained DeepTune heuristic models to low power embedded systems using quantization and compression of neural networks~\cite{Han2015}. |
Oops, something went wrong.