From cTuning.org

(Difference between revisions)
Jump to: navigation, search
Line 74: Line 74:
  ''A_NOTES=''<BR>
  ''A_NOTES=''<BR>
 +
== cDatabase web-service to predict "good" optimizations (execution time/code size, etc) using machine learning ==
 +
 +
* '''Web-service name:''' predict_opt
 +
 +
* '''_POST variables:'''
 +
 +
''PLATFORM_ID='' [http://ctuning.org/wiki/index.php/Special:CDatabase?request=view_architectures architecture ID]<BR>
 +
''ENVIRONMENT_ID='' [http://ctuning.org/wiki/index.php/Special:CDatabase?request=view_environments environment ID]<BR>
 +
''ST_PROG_FEAT='' static feature vector in a form ft1=x, ft2=y, ... [[CTools:MilepostGCC:StaticFeatures|(Description)]]<BR><BR>
 +
''PREDICTION_MODE='' <BR><BR>
 +
 +
'''Return:'''
 +
''OPT_FLAGS='' Optimization flags from most similar program based on static program features and nearest neighbor classifier.
 +
We are working to suggest passes at function level, fine-grain optimizations at loop/instruction level, parallelization.<BR>
   
   
-
'''Example:'''
+
== cDatabase web-service example ==
* Scripts to call web-service PHP script: [ [http://ctuning.org/software/cdatabase/web-services/example/send_data_to_cod__example.sh bash] ] [ [http://ctuning.org/software/cdatabase/web-services/example/send_data_to_cod__example.bat bat] ]
* Scripts to call web-service PHP script: [ [http://ctuning.org/software/cdatabase/web-services/example/send_data_to_cod__example.sh bash] ] [ [http://ctuning.org/software/cdatabase/web-services/example/send_data_to_cod__example.bat bat] ]

Revision as of 07:30, 4 June 2009

cTuning.org > CDatabase 

cDatabase can be accessed through cTuning web client, CCC Framework or through cDatabase web-services.

The URL for cDatabase web-services is: ctuning.org/wiki/index.php/Special:CDatabase?request=

All _POST requests should contain the following:

USERNAME= cTuning username

PASSWORD= cTuning password

DATABASE_NAME= cTuning database (ccc_opt_cases - main database; ccc_opt_cases_text - test database)

You can download a sample PHP script to send a request to the COD web-services here.

cDatabase web-service to add optimization cases

  • Web-service name: add_opt_case
  • _POST variables:
PLATFORM_ID= architecture ID
ENVIRONMENT_ID= environment ID
PROGRAM_ID= program ID
COMPILER_ID= compiler ID

DATASET_CMD= CMD line for the dataset or some description

RUN_TIME= total execution time (seconds or relative)
RUN_TIME_USER= user execution time (seconds or relative)
OUTPUT_CORRECT= output was correct (for compiler testing for example)
OPT_FLAGS= compiler optimization flag such as -O3
OPT_FLAGS_PLATFORM= architecture optimization flags such as -msse
BIN_SIZE= code size in bytes
COMPILE_TIME= compilation time in seconds
OBJ_MD5CRC= object/binary file MD5 CRC to compare if binaries are really different for different compiler flags
OPT_PASSES= list of optimization passes obtained through ICI. Format: func1={pass1,pass2,..}(func2={pass2,pass1...})
STATIC_FEATURES= list of program static features. Format: func1={after_pass;feature1,feature2} (func2=...)
RUN_PG= profiling info (execution time).
RUN_HC= profiling info (hardware counters).
RUN_POWER= power (should be standardized)
RUN_ENERGY= energy (should be standardized)
ARCH_CFG= architecture configuration (should be standardized)
ARCH_SIZE= architecture size (should be standardized)
OPT_FINE= fine-grain optimizations (should be standardized)
PAR_DYNAMIC= list of run-time dependencies (should be standardized)
OPT_PAR_STATIC= info about static parallelization (should be standardized)
NOTES= user notes about optimization case

The same info for the associated reference run (to be able to calculate optimization benefits such as execution time or code size improvement, etc)

A_RUN_TIME=
A_RUN_TIME_USER=
A_OUTPUT_CORRECT=
A_OPT_FLAGS=
A_OPT_FLAGS_PLATFORM=
A_BIN_SIZE=
A_COMPILE_TIME=
A_OBJ_MD5CRC=
A_OPT_PASSES=
A_STATIC_FEATURES=
A_RUN_PG=
A_RUN_HC=
A_RUN_POWER=
A_RUN_ENERGY=
A_ARCH_CFG=
A_ARCH_SIZE=
A_OPT_FINE=
A_PAR_DYNAMIC=
A_OPT_PAR_STATIC=
A_NOTES=

cDatabase web-service to predict "good" optimizations (execution time/code size, etc) using machine learning

  • Web-service name: predict_opt
  • _POST variables:
PLATFORM_ID= architecture ID
ENVIRONMENT_ID= environment ID
ST_PROG_FEAT= static feature vector in a form ft1=x, ft2=y, ... (Description)

PREDICTION_MODE=

Return:

OPT_FLAGS= Optimization flags from most similar program based on static program features and nearest neighbor classifier. 

We are working to suggest passes at function level, fine-grain optimizations at loop/instruction level, parallelization.

cDatabase web-service example

  • Scripts to call web-service PHP script: [ bash ] [ bat ]
  • _POST variable for this example: txt
  • Info about optimization case: txt

cDatabase is an on-going evolving project and we plan to add more web-services and APIs - please be patient and tolerant ;). You are welcome to help us extend cDatabase and plugins, and provide feedback and suggestions!

Locations of visitors to this page