From cTuning.org

Jump to: navigation, search
Navigation: cTuning.org > CTools > CCC

Continuous Collective Compilation Plugins:

Main SVN plugin directories:

Iterative feedback-directed compilation plugins

Plugin name: Parameters: Dependencies: Status: Source:
ccc-run-glob-flags-rnd-uniform - Generate a random combination of compiler flags (50% probability of selecting individual optimization). <Number of runs> <Sequence length> <Compiler name> <Baseline opt> <Rnd seed> <Dataset> Stable Distribution and SVN
ccc-run-glob-flags-rnd-fixed - Generate a combination of compiler flags of a specified length randomly when performing iterative compilation. <Number of runs> <Sequence length> <Compiler name> <Baseline opt> <Rnd seed> <Dataset> Stable Distribution and SVN
ccc-run-glob-flags-one-by-one - Select all optimizations from the compiler optimization list one by one. <Ignore first option> <Compiler name> <Baseline opt> <Dataset> Stable Distribution and SVN
ccc-run-glob-flags-one-off-rnd - Remove flags from the combination of "compiler flags" one by one randomly at each iterative step and put them back if execution time drops. We need this script to find influential flags. "Compiler flags" <Compiler name> <Baseline opt> <Rnd seed> <Time diff tolerance> <Dataset> Stable Distribution and SVN

Collective data analysis plugins

Plugin name: Parameters: Dependencies: Status: Source:
get-all-compilers - Report all compiler IDs from COD. Stable V2.5 and SVN
get-all-environments - Report all environment IDs from COD. Stable V2.5 and SVN
get-all-platforms - Report all platform IDs from COD. Stable V2.5 and SVN
get-all-programs - Report all program IDs from COD. Stable V2.5 and SVN
get-compiler-id - Get compiler ID referenced by the compiler name entered during CCC compiler configuration. <compiler name entered during CCC compiler configuration> Stable V2.5 and SVN
get-dataset-id - Get dataset ID referenced by the program ID and dataset number (from cBench). <program ID> <dataset number> Stable V2.5and SVN
get-global-speedups - Main script to analyze speedups. You can edit it to obtain necessary statistics for your own optimization scenario:
#!/bin/bash

# Copyright (C) 2004-2010 by Grigori Fursin
#
# http://fursin.net/research
# 
# UNIDAPT Group
# http://unidapt.org

STAT_FILE=Stats/_stats__global_speedups
STAT_FILE1=${STAT_FILE}._SUMMARY.txt

# Set database variables
if [ -f "ccc--select-db.sh" ] ; then
 . ./ccc--select-db.sh
fi

# Delete previous statistic (some files are appended)
rm -rf ${STAT_FILE}.*

#export PLAT_ID=110787249241129258
#110787249241129258  AMD Opteron 2218
#708176059411291686  Intel Xeon EM64T

#export CMPLR_ID=329504539516446542
#329504539516446542  gcc 4.4.0

#export ENV_ID=198828472341129319
#198828472341129319  Debian Sid Linux v1.1

#retrieve opt cases only when execution time > TIME_THRESHOLD
#export TIME_THRESHOLD=0.3

#retrieve opt cases only with specific notes
#export NOTES=

#retrieve opt cases only when profile info is !=""
#export PG_USE=1

#retrieve opt cases only when execution output is correct (or not if =0)
#export OUTPUT_CORRECT=1

#Sort optimization case by speedup (0 - ex. time, 1 - code size, 2 - comp time)
#export SORT=012

#Produce optimization space frontier
#export DIM=01 (2D frontier)
#export DIM=02 (2D frontier)
#export DIM=12 (2D frontier)
#export DIM=012 (3D frontier)
#export DIM=012

#Cut cases when building optimization space frontier (select cases when speedup 0,1 or 2 is more than some threshold)
#export CUT=0,0,1.2
#export CUT=1,1,1
#export CUT=0,0,0

#export PROG_ID=4324827713289550
#export DS_NUM=1
#export DS_ID=

#check user or total execution time
#export RUN_TIME=RUN_TIME_USER
#export RUN_TIME=RUN_TIME

export CCC_FILE_TMP=tmp

export CCC_STATS=${STAT_FILE}
php $CCC_PLUGINS/plugins/get_global_speedups.php

The following graphs have been created using this script:

Example of complex optimization search spaces for susan_c from Collective Benchmark and MILEPOST GCC 4.4.0 after randomly selecting about 80 optimization flags:

fig_opt_case_susan_c_1.gif fig_opt_case_susan_c_2.gif

We can automatically improve execution time of the program by nearly 2 times over the highest GCC optimization level after using CCC framework (we obtain similar results on LLVM, Open64, Intel and IBM compilers). We can also use CCC framework to perform multi-objective optimizations (selecting optimization cases on the optimization space frontier shown by red circles and blue dots) such as:

  • optimize both execution time and code size (important for optimizing libraries and embedded/mobile computing systems)
  • optimize just execution time (important for desktop computers and HPC servers/supercomputers)
  • optimize both execution time and compilation time (important for cloud computing services and real-time systems)

You can also use MILEPOST GCC to correlate program features and behavior to predict good optimizations for unseen programs based on prior learning.

Stable V2.5 and SVN
get-global-speedups-by-list - The same as get-global-speedups but produce speedup statistics

for a number of programs listed in the file list-progs.dat.

Stable V2.5 and SVN
plot-bar-graph - Plots bar graphs. Stable V2.5 and SVN
plot-density-graph - Uses R language script to plot speedup density graphs. Stable V2.5 and SVN
get-all-best-flags-time-size-paretto - Report optimization cases that improve both execution time and code size based on Paretto distribution. Deprecated - please use new version get-global-speedups to obtain statistics on optimization space frontiers and balance execution time, code size and compilation time.

Machine-learning prediction plugins

Plugin name: Parameters: Dependencies: Status: Source:
ccc-ml-accumulate-features - this plugin accumulates static program features per function for a given program into single feature vector using MILEPOST GCC. MILEPOST GCC on SVN
ccc-ml-predict-best-flag - this plugin queries ML server to obtained combination of flags or passes on a global or function level to improve execution time or code size. MILEPOST GCC Deprecated - you should use MILEPOST GCC directly instead to predict good optimizations to balance execution time, code

size and compilation time depending on user optimization scenarios.

on SVN
Locations of visitors to this page

Tweet