Giter VIP home page Giter VIP logo

solertis / ck-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlcommons/ck

0.0 2.0 0.0 1.7 MB

Collective Knowledge is a cross-platform customizable Python framework to share artifacts as reusable components with JSON API; assemble experimental workflows (such as multi-objective DNN optimization); automate package installation; crowdsource and reproduce experiments; unify predictive analytics; enable interactive articles. Demo:

Home Page: http://cKnowledge.org/repo

License: Other

Shell 0.24% Batchfile 0.10% Python 97.11% PHP 2.49% HTML 0.07%

ck-1's Introduction

logo License

Linux/MacOS: Build Status Windows: Windows Build status Coverage: Coverage Status

News

Introduction

Collective Knowledge is our "swiss knife" for open, collaborative and reproducible experimentation. CK is a small, portable and customizable research platform to

  • share artifacts as reusable and indexable Python components with unified JSON API and meta information (programs, benchmarks, data sets, tools, predictive models, etc) - see Artifact Evaluation website;
  • automate detection or installation of all software dependencies on Linux, Windows, MacOS, Android while enabling co-existence of different versions (compilers, benchmarks, libraries, tools) for a given experimental workflow across diverse Linux, Windows and Android based platforms via CK cross-platform customizable package and environment manager;
  • quickly prototype experimental workflows from shared components (such as customizable and multi-objective autotuning for DSL, OpenCL, CUDA, MPI, OpenMP and compiler flags) across diverse hardware and software (CK repo);
  • crowdsource experiments across diverse hardware and workloads provided by volunteers and validate ideas or report unexpected behavior and bugs (CK repo);
  • reuse and collaborative improve JSON description of all existing platforms from IoT to supercomputers (CK repo);
  • abstract access to continuously evolving software and hardware stack (CK repo);
  • automate, reproduce and crowdsource empirical experiments using CK JSON-based web services (live repo);
  • unify access to predictive analytics (scikit-learn, R, DNN, etc) via unified JSON API and CK web services (CK repo);
  • enable reproducible and interactive articles (CK repo).

Project homepage:

Notable use cases:

CK concepts by Michel Steuwer:

License

  • Permissive 3-clause BSD license. (See LICENSE.txt for more details).

Minimal installation

The minimal installation requires:

  • Python 2.7 or 3.3+ (limitation is mainly due to unitests)
  • Python PIP (if you would like to install CK via PIP)
  • Git command line client.

On Ubuntu, you can install these dependencies via

$ apt-get install -y python python-pip git

On Windows, you can download and install these tools from the following sites:

You can now install stable CK version via PIP simply as following (you may need to prefix it with "sudo" on Linux):

$ pip install ck

Alternatively, you can install development CK version in your local user space via GIT as following:

 $ git clone https://github.com/ctuning/ck.git ck

and then add CK to PATH on Linux as following:

 $ export PATH=$PWD/ck/bin:$PATH

or on Windows as following:

 $ set PATH={CURRENT PATH}\ck\bin;%PATH%

Collaborative AI optimization (DNN engines and models)

See cKnowledge.org/ai, unified CK AI API demo, Caffe/TensorFlow optimization statistics from various devices for more details.

Portable and customizable benchmarking

You can now test CK by pulling and executing one of many shared workflows.

For example, you can try the following community project to unify benchmarking across ever changing hardware and software - just check that you have at least one compiler installed for your target platform as described here:

 $ ck pull repo:ck-autotuning
 $ ck pull repo:ctuning-programs

You can see shared programs in the CK format (JSON meta information describing how to compile and run shared program with all dependencies and data sets):

 $ ck list program

You can now compile a given program simply as following:

 $ ck compile program:cbench-automotive-susan --speed

Note, that CK will detect all available versions of required compilers (GCC, LLVM, ICC ...) and libraries on your system using CK customizable cross-platform package and environment manager with JSON API and meta. If some software dependencies are missing, CK will automatically install required packages as described in this article about portable CK workflows.

Now you can run your program simply as following:

 $ ck run program:cbench-automotive-susan

CK will ask you which command line to use and will automatically detect or install all required data sets.

If you have Android NDK/SDK installed on your host machine and Android device connected via ADB, you can simply compile and run the same problem on this device as following:

 $ ck compile program:cbench-automotive-susan --speed --target_os=android21-arm-v7a
 $ ck run program:cbench-automotive-susan --target_os=android21-arm-v7a

You can also participate in machine learning based compiler optimization using this CK repository and online demo.

Artifact evaluation

Collective Knowledge can help you convert your ad-hoc experimental scripts to portable, customizable and reusable with automatic cross-platform software installation and web-based experimental dashboards for Artifact Evaluation at the leading conferences and journals as briefly described here. Feel free to ask for help from the CK community here!

See example of a CGO'17 distinguished artifact from the University of Cambridge implemented using CK:

Note that you can install above repositories and dependencies to a new CK space without mixing up your current installations (similar to virtual environment) as following (substitute "export" with "set" on Windows):

 $ export CK_REPOS={path to a new CK space with all repos and dependencies}
 $ ck setup kernel --var.install_to_env=yes
 $ ck pull repo --url={URL of the artifact repository}

When CK kernels variable "install_to_env" is set to "yes", CK will be installing required packages inside CK space. In such case, when you stop evaluating artifacts, you can easily remove the whole CK space together with all installed packages.

Portable experiment crowdsourcing workflow

You can check our shared workflow to crowdsource experiments across diverse software and hardware provided by volunteers aka SETI@HOME for computer systems' research:

 $ ck pull repo:ck-crowdtuning
 $ ck crowdsource experiment

For example, you can execute shared workflow for collaborative program optimization with all related artifacts, and start participating in multi-objective crowdtuning simply as following:

 $ ck crowdtune program

You can also crowd-tune GCC on Windows as following:

 $ ck crowdtune program --gcc --target_os=mingw-64

If you have GCC or LLVM compilers installed, you can start continuously crowd-tune their optimization heuristics in a quiet mode (for example overnight) via

$ ck crowdtune program --llvm --quiet
$ ck crowdtune program --gcc --quiet

This experimental workflow will be optimizing different shared workloads for multiple objectives (execution time, code size, energy, compilation time, etc) using all exposed design and optimization knobs, while sending best performing optimizations to the public CK-based server:

CK server will, in turn, perform on-line learning to classify optimization versus workloads which can be useful for compiler/hardware designers and performance engineers (described in more detail in http://arxiv.org/abs/1506.06256 ).

You can even participate in collaborative experiments using your Android mobile phone by installing the following application from the Google Play Store:

If you want to try something more complex, you can check our cross-platform DNN unification, customized installation and benchmarking via CK with JSON API and web services:

You can find already shared artifacts and repositories here:

Please check out CK getting started guides and CK wiki for further details:

You can also reuse and customize artifacts with CK-based experimental workflows shared at the leading computer systems' conferences:

Trying CK using Docker image

If you would like to try CK without installing it, you can run the following Docker image:

 $ docker run -it ctuning/ck

However, the idea of CK is to be able to rebuild user experimental workflows natively to take advantage of the latest software environment.

Also note that we added Docker automation to CK (to help evaluate artifacts at the conferences, share interactive and reproducible articles or crowdsource experiments for example).

Please check 'ck-docker' repository at GitHub:

 $ ck show repo:ck-docker

You can download and view one of our CK-based interactive and reproducible articles as following:

 $ ck pull repo:ck-docker
 $ ck run docker:ck-interactive-article --browser (--sudo)

Testing CK

You can test CK functionality via

 $ ck run test

Our related initiatives

Plans

Motivation

Authors

Questions/comments/discussions?

Publications

@inproceedings{ck-date16,
    title = {{Collective Knowledge}: towards {R\&D} sustainability},
    author = {Fursin, Grigori and Lokhmotov, Anton and Plowman, Ed},
    booktitle = {Proceedings of the Conference on Design, Automation and Test in Europe (DATE'16)},
    year = {2016},
    month = {March},
    url = {https://www.researchgate.net/publication/304010295_Collective_Knowledge_Towards_RD_Sustainability}
}

The concepts have been described in the following publications:

If you found CK useful, feel free to reference any of the above publications. You can download all above references in one BibTex file here.

Testimonials and awards

Acknowledgments

CK development is coordinated by the cTuning foundation (non-profit research organization). We thank the EU TETRACOM 609491 Coordination Action for initial funding and dividiti for continuing support. We would also like to thank Microsoft Research program for one-year grant to host the CK public repository in the Azure cloud. We are also extremely grateful to all volunteers for their valuable feedback and contributions.

ck-1's People

Contributors

ctuning-admin avatar dsavenko avatar gfursin avatar psyhtest avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.