From cTuning.org
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 using machine learning
This service is used to predict compiler optimizations based on program similarities (static program features and nearest neighbor classifier).
Currently we predict compiler flags and plan to add support for prediction of optimization passes at function level, fine-grain optimizations at loop/instruction level and parallelization.
- 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= 1 - predict optimization flags to improve both execution time and code size
2 - predict optimization flags to improve execution time only
3 - predict optimization flags to improve code size only
Return:
OPT_FLAGS= Optimization flags from most similar program based on static program features and nearest neighbor classifier.
cDatabase web-service example
- _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!