GithubHelp home page GithubHelp logo

codeaudit / ann-benchmark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avulanov/ann-benchmark

0.0 2.0 0.0 196 KB

Benchmarks of artificial neural network library for Spark MLlib

License: Apache License 2.0

Scala 100.00%

ann-benchmark's Introduction

ann-benchmark

Benchmarks of artificial neural network implementation for Spark MLlib https://github.com/avulanov/spark/tree/ann-interface-gemm.

Introduction

The goal is to benchmark the library, compare it with the other tools and test scalability with the number of nodes in the cluster.

The intention is to test a big model. Data is small so the time needed to read the data can be ignored.

Prerequisites

GCC 4.8.2

RedHat 6.x has an older GCC compiler that has libgfortran library that is incompatible with netlib-java wrappers. Check GCC version: gcc -v. New GCC should be ALWAYS in your path:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/new/gcc/lib64

OpenBLAS

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/openblas
  • Create symlink to OpenBLAS within its folder
ln -s libopenblas.so libblas.so.3
  • To use OpenBLAS, add it to your library path. Make sure there is no other folder with libblas.so.3 in your path.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/openblas

CUDA and NVBLAS (for GPU)

  • Download and install the latest CUDA and GPU driver (usually comes with CUDA)
  • NB! you need the reference CBLAS library to run NVBLAS through Spark
  • NVBLAS needs configuration file to run
export NVBLAS_CONFIG_FILE=/your/cuda/lib64/nvblas.conf
  • To use NVBLAS, add CBLAS and CUDA to your library path. Also, preload NVBLAS symbols (it is better to do this right before launching Spark otherwise all your shell commands will go through NVBLAS causing errors). Make sure there is no other folder with libblas.so.3 in your path.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/cblas:/your/cuda/lib64
export LD_PRELOAD=/your/cuda/lib64/libnvblas.so

Benchmark

Spark

Caffe

  • Download Caffe
  • Configure Makefile.config to point to the same OpenBLAS lib (and CUDA) as for Spark
  • Change Solver to Double precision tools/caffe.cpp:
void CopyLayers(caffe::Solver<double>* solver, const std::string& model_list) {
  shared_ptr<caffe::Solver<double> >
    solver(caffe::GetSolver<double>(solver_param));
  • Compile Caffe
  • Set environment variable:
export $CAFFE=/your/caffe/
  • Download mnist dataset and convert it to lmdb:
$CAFFE/data/mnist/get_mnist.sh
$CAFFE/examples/mnist/create_mnist.sh
  • Run the benchmark with the model provided:
$CAFFE/build/tools/caffe train --solver=mnist-lmdb-5h.solver

Benchmark

  • Hardware/Software setup:
    • Intel(R) Xeon(R) CPU E31240 @ 3.30GHz, 16GB RAM
    • RedHat 6.4, OpenBLAS
    • Total 6 machines
    • Spark: one master, 5 workers

Preliminary results (s):

Nodes ANN-total ANN-compute Caffe Caffe60K
5 29 21 62 56
4 27 24 62 56
3 35.2 33 62 56
2 47 44 62 56
1 86 84 62 56

The lastest results are in the spreadsheet: https://docs.google.com/spreadsheets/d/13U1fwF5-h90X-VeF01dOT-IlJtwYa1AsRtCBjAkSqKI/edit?usp=sharing

ann-benchmark's People

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.