Giter Club home page Giter Club logo

cuda-convtranspose's Introduction

====================================================================================
Implementation of ConvTranspose2d in CUDA
====================================================================================

# Compile
nvcc -o cudaConvTranspose CudaConvTranspose2d.cu

# Run
./cudaConvTranspose [algo] [layer]

algo: 0, 1, 2, 3, 4
- algo 0: cpu naive implementation
- algo 1: cpu group by ofmap
- algo 2: gpu naive implementation
- algo 3: gpu share filter & ofmap, tiled (best)
- algo 4: gpu group by ofmap, share ifmap

layer: 0, 1, 2, 3
- layer 0: (W,C,M) = (4,512,256)
- layer 1: (W,C,M) = (8,256,128)
- layer 2: (W,C,M) = (16,128,64)
- layer 3: (W,C,M) = (32,64,3)

====================================================================================
Comparison with ConvTranspose2d in PyTorch (C++ and Python)
====================================================================================
- Instructions to run C++ implementation on NYU CIMS CUDA Cluster (tested on cuda4):

# load modules
module load cmake-3
module load gcc-7.4
module load cuda-10.2

# download and install Pytorch C++ Library
cd pytorch
wget https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.7.0.zip
unzip libtorch-shared-with-deps-1.7.0.zip

# build
mkdir build && cd build 
cmake -DCMAKE_CXX_COMPILER=g++-7.4 -DCMAKE_C_COMPILER=gcc-7.4 -DCMAKE_PREFIX_PATH=libtorch ..

# compile
cmake --build .

# run 
./pytorch [layer]
(layer = 0, 1, 2, 3 same as above)

====================================================================================
- Instructions to run Python implementation on NYU CIMS CUDA Cluster (tested on cuda4):

python3 pytorch/pytorch.py [layer]
(layer = 0, 1, 2, 3 same as above)

cuda-convtranspose's People

Contributors

hsishengmei avatar wuhoward avatar

Stargazers

Ian Sampson avatar Louis Fortier-Dubois avatar Xuejun avatar tangjicheng avatar  avatar  avatar yuhongjiu avatar  avatar

Watchers

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