Reproducing MILEPOST project

Grigori Fursin edited this page Jun 5, 2018 · 3 revisions

[ Home ]

Here we describe how to install MILEPOST GCC and cTuning CC via CK to be able to extract semantic program features and enable research on self-tuning compilers. However, note that MILEPOST GCC is now quite outdated, and we now use another approach where we first find unexpected behavior and optimizations, cluster benchmarks, and only then find related program, data set and hardware features. See:

Table of Contents

Obtaining the workflow with all dependencies

 $ ck pull all --kernel
 $ ck pull repo:reproduce-milepost-project

You may need to install the following dependencies for Linux to compile MILEPOST GCC via CK:

 $ apt-get install g++-multilib libc6-dev-i386

Then you can try to install all tools via:

 $ ck install package:compiler-ctuning-cc-2.5-plugins-src-linux

Note, that above command should normally install all dependencies needed for MILEPOST GCC (including GMP, MPFR, MPC, etc) as well as cTuning CC and GCC plugins. You can follow questions and normally just press Enter (answering Yes to all questions).

Checking feature extraction

You can find a demo entry with several scripts demonstrating how to extract semantic program features:

 $ ck find demo:ctuning-cc

This directory you have a demo script as well as susan corners program written in C. When you run this script, it should normally extract features of this program into tmp directory.

Then you can similarly extract features for your C, C++ and Fortran applications ...

Script shows you how to automatically extract semantic MILEPOST program features from programs in CK format (via CK universal autotuning workflow).

Using already extracted features from CK workloads

We extracted and saved semantic MILEPOST features in CK format for all shared workloads (such as from the ctuning-programs repo). You can find them via:

 $ ck list program.static.features

For example, you can use features per function for susan program via CMD:

 $ ck load program.static.features:cbench-automotive-susan

You can load above features using CK:

 import ck.kernel as ck
 if r['return']>0: return r

Implementing optimization prediction service in CK

cTuning CC is still connected to the deprecated Collective Mind JSON service ( We plan to implement it in CK (see ck-autotuning ticket

Questions and comments

You are welcome to get in touch with the CK community if you have questions or comments!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.