GithubHelp home page GithubHelp logo

isabella232 / theano Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intel/theano

0.0 0.0 0.0 69.71 MB

This fork of Theano/Theano is dedicated to improve its performance on CPU device, in particular Intel® Xeon® processors and Intel® Xeon Phi™ processors.

Home Page: http://www.deeplearning.net/software/theano

License: Other

Shell 0.29% Makefile 0.01% C++ 2.23% Python 92.92% CSS 0.02% HTML 0.03% C 1.99% Cuda 2.52%

theano's Introduction

Intel Software Optimization for Theano*


This repo is dedicated to improving Theano performance on CPU, especially in Intel® Xeon® and Intel® Xeon Phi™ processors.

Key Features

  • New backend of Intel® MKL (version >= 2017.0 which includes neural network primitives)
  • Advanced graph optimizations
  • CPU friendly OPs
  • Switch to Intel® MKL backend automatically in Intel® Architecture
  • Out-of-box performance improvements for legacy models
  • Transparently supports for Keras (Lasagne, etc.) workloads

Benchmark

  • Hardwares
    • Intel® Xeon® CPU E5-2699 v4 @ 2.20GHz, 128GB RAM
    • Intel® Xeon Phi™ CPU 7250F @ 1.40GHz, 98G RAM
  • Softwares
  • Terminologies
    • FWD, forward for inference
    • FWD+BWD, forward and backward for training
  • Results
FWD:sec/batch Stock Theano/Xeon Intel Theano/Xeon Intel Theano/Xeon Phi
AlexNet 1.045 0.077 0.054
GoogLeNet 2.228 0.280 0.169
VGG 5.089 0.836 0.570
OverFeat 6.105 0.273 0.185

--

FWD+BWD: sec/batch Stock Theano/Xeon Intel Theano/Xeon Intel Theano/Xeon Phi
AlexNet 2.333 0.239 0.186
GoogLeNet 5.866 0.860 0.568
VGG 12.783 2.699 1.902
OverFeat 13.202 0.865 0.636

Performance Tips

  • Add bias after convolution to archieve high performance since this sub-graph can be replaced with MKL Op
  • Use group convolution OP, AbstractConvGroup
  • Use New MKL OP: LRN

Branch Information

  • master, stable and fully tested version based on 0.9dev2 with Intel® MKL backend
  • nomkl-optimized, based on 0.9.0dev1 with generic optimizations
  • others, experimental codes for different applications which may be merged into master and/or deleted soon

Installation

  • Environment Setting

    Set Intel MKL library path into both LD_LIBRARY_PATH and LIBRARY_PATH

  • Quick Commands

    git clone https://github.com/intel/theano.git intel-theano
    cd intel-theano
    python setup.py build
    python setup.py install --user [--mkl]   # Note: using 'mkl' option will check and download MKL if it is not available
    cp intel-theano/theanorc_icc_mkl ~/.theanorc
    
  • Check Intel MKL

```
python theano/theano/sandbox/mkl/tests/test_mkl.py
     WARNING (theano.gof.cmodule): WARNING: your Theano flags `gcc.cxxflags` specify an `-march=X` flags.
     It is better to let Theano/g++ find it automatically, but we don't do it now
     mkl_available: True
     mkl_version: 20170209
     .
     ----------------------------------------------------------------------
     Ran 1 test in 2.213s

     OK
```
  • Run Benchmark
```
python democase/alexnet/benchmark.py
```

Other Optimized Software

  • Self-contained MKL in here
  • Optimized Numpy in here

* Other names and trademarks may be claimed as the property of others.

theano's People

Contributors

nouiz avatar lamblin avatar jaberg avatar abergeron avatar pascanur avatar carriepl avatar breuleux avatar dwf avatar harlouci avatar royxue avatar turian avatar abalkin avatar chienlima avatar sentient07 avatar ballasn avatar gdesjardins avatar aalmah avatar hengjean avatar jlowin avatar slefrancois avatar nicolasbouchard avatar caglar avatar mrocklin avatar daemonmaker avatar larseeri avatar f0k avatar cooijmanstim avatar mpezeshki avatar cangermueller avatar yaoli 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.