GithubHelp home page GithubHelp logo

meclotfi / matrix.vector_mult Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22 KB

A script that Compile and run a program (Mat-Vect mult .cpp) that realize generalized matrix vector multiplication (gemv routine in Blas Library) << alpha * M[l,w].V[w] + beta * Y[w] >> ( M a matrix of size (l,w) and V,Y vectors of size respectively w , l )

C++ 56.19% Shell 43.81%

matrix.vector_mult's Introduction

matrix.vector_mult

A script that Compile and run a program (Mat-Vect mult .cpp) that realize generalized matrix vector multiplication (gemv routine in Blas Library) << alpha * M[l,w].V[w] + beta * Y[w] >> ( M a matrix of size (l,w) and V,Y vectors of size respectively w , l )
In both Halide and pure C then compare the results to check they are matching.

How to Use the Script?

  1. It is neccessary to install Halide and change the paths to Halide.h headers and libHalide.iso (in the script file directly or by passing them as parameters -ph and -ps ) in order for this script to run correctly .

  2. The Script is written in bash script language so in order to run it you should use bash interpreter which is included by default in Unix systems(Linux and MacOS) , The command to run the script is : #bash ./comp.sh

The comman come with several options that you can specify in order to change key parameters ,this options are presented below: Options:

  • -l,--lenght : Allow to change the lenght of the matrix M which also set the size of the output vector to be the same (default 16)

  • -w,--width : Allow to change the lenght of the matrix M which also set the size of the vector Y to be the same (default 24)

  • -a,--alpha : Allow to change the value of the scalar alpha used in computing the output alpha * M[l,w]V[w] + beta * Y[w] (default 1)

  • -b,--beta : Allow to change the value of the scalar beta used in computing the output alpha * M[l,w]V[w] + beta * Y[w] (default 0)

  • -ph,--path_to_iso : Allow to change the path to Halide.h headers,Noting that it is neccessary to install Halide and change this path in order to run this script

  • -ps,--path_to_h : Allow to change the path to libHalide.iso,Noting that it is neccessary to install Halide and change this path in order to run this script

  • -e,--accepted_error : Allow to change the error acceted during the comparing of the output of the two implementations(C and Halide)(default 0.00001)

  • --help : display the help and exit

matrix.vector_mult's People

Contributors

meclotfi avatar

Watchers

 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.