Instantly share code, notes, and snippets.

What would you like to do?
Submission for Google Summer of Code

Google Summer of Code 2018 : Alternative Smart Executors

Here is my submission for my project Alternative Smart executors. The objective was to study the applications of machine learning on loop level-parallelism. In previous work [0] a classification method have proven to be successful at predicting the best policies for HPX for-each loops. My Google Summer of Code project goal was based on this paper and the work I did is divided into two sections:

-Improving the implementation of machine learning in hpxML

-Comparing Regressions algorithms to classifications algorithms to see which one would be better at predicting the best chunk size for a hpx for loop.

Improving the implementation of machine learning in hpxML

  1. Loop Convert

The loop convert ClangTool has two distinct purposes, extract and print features of hpx for_each loops and convert execution policy of a loop to a function which uses machine-learning to predict a given parameter (Prefetching distance or chunk size). These two task are different and require different instructions. In the old version of LoopConvert, the user would get the desired behavior by commenting and un-commenting sections of the code, which requires recompilation every time you want a certain behavior. The improvement was to add a flags -P and -C which can be used to get the desired behavior. Link to commit

I also worked on a wiki page that would describe how to compile the Clangtool on the Rostam clusters and how to use it with the flags.

Link to wiki

  1. Data generation

Another improvement to hpxML was to build a repository that would allows for automatic data generation. This repository was built from scratch with the goal of allowing anyone to generate data using their own hpx for_each() loops. Currently, the implementation is not as user friendly as it could be but it works nonetheless.

here is a link to the wiki

  1. Cross Validation and Multinomial_logistic_regression_model;

The multinomial logistic regression class has been modified to make cross validation easier. Cross-validation is a universal technique used in machine-learning to evaluate models. Before, the model was evaluate on the training data, which doesn't represent how well it can adapt to new scenarios. The class was also modified in certain ways to be more similar to functions in python scikit-learn's library.

Commits to the class

  1. First commit
  2. Second commit
  3. Third commit (add bias to model)

here is a link to the wiki page of the new regression class

New Cross validation cpp file

Research on machine learning algorithms

The other part of the project was doing research on machine learning applied to loop-level parallelism on hpx. My main hypothesis was that using regressions algorithms would minimize the execution time of hpx for-loops compared to classification algorithms. This document contains all the major results of my research. Note that not all results are machine-learning related. Some results are simply analysis of how the best choice of chunk size varies with new algorithms and new input sizes.

The following repository has been create to store any code and picture that is related to the research.


[0] Khatami, Z., Troska, L., Kaiser, H., Ramanujam, J., & Serio, A. (2017, November). HPX Smart Executors. In Proceedings of the Third International Workshop on Extreme Scale Programming Models and Middleware (p. 3). ACM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment