Coder Social home page Coder Social logo

openmlsys-cuda's Introduction

openmlsys-cuda

Examples for beginners to write your own high-performance AI operators. We introduced optimizations tricks like using shared memory and pipeline rearrangement to maximize the throughput. We also provided an example for using CUTLASS to implement an FC + ReLU fused operator.

Dependencies

  • Eigen: CPU linear algebra template library
  • OpenMP: Enable multi-threads acceleration on CPU
  • CUDA toolkit: Compile GPU kernels and analyse GPU executions
  • Gflags: Commandline flags library released by Google
  • CUTLASS: GPU GEMM template library

Installation Hints

  • Eigen: Use package manager, e.g. apt install libeigen3-dev, or download from the official website and build from source.
  • OpenMP: Most time the compilers have already integrated with OpenMP. If your compiler does not support OpenMP, try apt install libgomp-dev or apt install libomp-dev for GCC or Clang separately.
  • CUDA toolkit: It's recommended to install following the official instructions.
  • Gflags: Use package manager, e.g. apt install libgflags-dev, or download from the official website and build from source.
  • CUTLASS: We have registered it to our git module, so you do not have to install by yourself.

Compilation

Once you have installed the dependencies, you can use the following instruction to compile the project:

git clone [email protected]:openmlsys/openmlsys-cuda.git
cd openmlsys-cuda
git submodule init && git submodule sync
mkdir build && cd build
cmake ..
make -j4

Examples

  • first_attempt: The naive implementation
  • gemm: Collection of implementations using different optimization tricks
  • fc_relu: Example for fusing FC and ReLU by using CUTLASS

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.