GithubHelp home page GithubHelp logo

nicklhy / dlinfbench Goto Github PK

View Code? Open in Web Editor NEW
52.0 7.0 11.0 22.44 MB

CNN model inference benchmarks for some popular deep learning frameworks

License: Apache License 2.0

Python 99.55% Shell 0.45%
benchmark-experiments deeplearning cnn mxnet pytorch caffe caffe2 tensorflow

dlinfbench's Introduction

DLInfBench

Introduction

Benchmarks of the CNN inference task over some popular deep learning frameworks.

Currently, we support five deep learning frameworks: Caffe, Caffe2, PyTorch, MXNet, TensorFlow. Some commonly used imagenet models (i.e. alexnet, resnet50, resnet101 and resnet152) are ready to test. For convenience, we provide all the code or network definition files here. There is no need to download pre-trained weights because we will randomly initialize them.

In order to exclude the impacts of different storage devices and different IO implementations over these deep learning frameworks, we generate all data randomly in advance. The time we calculate in the benchmark experiments only include the cpu-memory to gpu-memory data copy time and the GPU forward time.

I may add benchmark code for more networks (i.e. inception-bn, inception-v3) and deep learning frameworks in the future but no specific plans have been made yet. Thus, anyone is welcomed to submit PRs.

Usage

  1. Install Caffe, Caffe2, PyTorch and MXNet in your machine and make sure you can import them in python. Turn on CUDNN support if possible. If you only want to test a part of them, please modify "DLLIB_LIST" in run.sh.
  2. Modify the "GPU" variable in run.sh to the gpu device you want to use. (In order to get accurate results, please select a GPU without any other process running on it.)
  3. Start benchmark experiments by executing sh run.sh.
  4. The results of network's inference speed and gpu memory cost will be saved to cache/results/${DLLIB}_${NETWORK}_${BATCH_SIZE}.txt. Columns in these files represent "framework name", "network", "batch size", "speed(images/s)", "gpu memory(MB)" respectively.
  5. We also plot the benchmark results in pictures as it could make them more straightforward. cache/results/${NETWORK}_speed.png demonstrates the network's inference speed of different batch size in different frameworks. cache/results/${NETWORK}_gpu_memory.png demonstrates the network's gpu memory cost of different batch size in different frameworks.

Known Issues

  1. There is a problem when I try to run alexnet with CUDNN in caffe2(check the code here). Thus, CUDNN is turned off temporally in caffe2's alexnet benchmarks. If you know how to fix this bug, a PR is welcomed.

Results

License

This project is licensed under an Apache-2.0 license.

dlinfbench's People

Contributors

nicklhy avatar shiyemin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dlinfbench's Issues

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.