Coder Social home page Coder Social logo

mkldnn-perf's Introduction

MKL-DNN Performance Test

This repository is used to test the performance of the MKL-DNN.

How to Compile

Clone this repository and edit the Makefile. The variables MKLROOT and MKLDNNROOT are where you installed the MKL and MKL-DNN respectively. Finally, make it!

git clone https://github.com/GD06/mkldnn-perf.git
make

How to Run

The compilation will generate an executable file main. This program takes seven configurations as the input, they are (IN, IC, IH, IW, FH, FW, OC), where the input tensor has the shape (IN, IC, IH, IW) following the NCHW data layout and the filter tensor has the shape (OC, IC, FH, FW) following the OIHW data layout.

For example, running the following command will test the performance for the input tensor with shape (100, 32, 224, 224) and the filter tensor shape (32, 32, 3, 3). We take the stride as 1 and the padding as 0 as default.

./main 100 32 224 224 3 3 32

What is the Output

The program will output one line for each time execution. The information includes the program size (i.e. the seven parameters), the elapsed time and the achieved GFLOPs for the im2col+MKL matrix multiplication and MKL-DNN convolution forward method. The last component of the output is the validation results of comparing the output between im2col+MKL and MKL-DNN to ensure that we implement the function as we expect.

In the file param.h, we define a macro, LOOP_TIMES, which defines the times we will repeat the im2col+MKL and MKL-DNN for recording the performance. The default is 1 which means we will execute these two methods both for only one time. We suggest use larger number can reduce the experimental deviations. However, for the LOOP_TIMES larger than 1, the outputs of these two methods could be different.

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.