Giter VIP home page Giter VIP logo

tensorox's Introduction

Tensorox

Approximating programs with CUDA tensor core instructions.

This repository shows how to use tensor instructions (e.g. wmma::mma_sync) to approximate part of CUDA programs.

Compability and requirement

  • This project requires CUDA install and Nvidia GPU with compute capability at least 7.0 for tensorcore to work. Older architectures will simply result in compilation error.

  • Python 3 with sklearn are required. A few benchmarks may require installing additional libraries, which will be noted at the README file inside the respective subdirectory.

  • Tested environment: Ubuntu 18.04, Python 3, Cuda 10.0, Nvidia Volta GPU

Code Hierachy:

  • The training script using sklearn is provided at : training_scripts/ folder. There are two main scripts: the training script and the testing script (i.e. wmma_test). The training script will read config parameter on where the input are output located as well as the layers configuration. The config file and trained weights are available at a separate folder. The sample test script and test data are also provided. It will test the trained network and print out weights in their arranged order that is ready for deployment to CUDA kernels.

  • The trained weights provided at training_scripts/weights folder

  • The trained weights are also written as predefined constants into the approximated kernels in their respective folder.

  • The approximated kernels and the original versions are available in benchmarks/ folder.

  • Generally, each benchmark will have an original version in 1 folder (e.g. inversek2j/ ), the tensor version (100% approximated) is in the second folder (e.g. inversek2j_approx/ ). The auto tuning version to adjust speed/accuracy tradeoff by mixing both tensor version and float version are available at the third folder for each benchmark (e.g. inversek2j_approx_mixed).

  • Helper functions and tools to rewrite your programs are available at benchmarks/scripts/ folder.

Please read the README file in each subfolder for further instruction on how to run each type of benchmarks because they belong to different benchmark suites.

License:

The code written by me is free for use with any purposes follow MIT license. However, the subdirectories contain benchmarks from various source and have their own license.

tensorox's People

Contributors

minhhn2910 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.