Skip to content

A basic set of programs that perform a variety of parallelised linear algebra operations using CUDA.

Notifications You must be signed in to change notification settings

LDRyan0/CUDA-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

CUDA-Examples

A basic set of CUDA examples for educational purposes.

  • vecAdd.cu: [N]+[N] vector addition
  • matAdd.cu: [MxN]+[MxN] matrix addition
  • matHad.cu: [MxN]⊙[MxN] Hadamard (element-wise) product
  • matMul.cu: [MxN][NxP] matrix multiplication (naive)
  • transpose.cu: Tiled matrix transpose (with avoidance of memory bank conflicts)
  • coalesced.cu: Coalesced memory access
  • stats.cu: displays some GPU device information from cudaGetDeviceProperties()

Build

Makefile automatically detects all .cu files and compiles with nvcc.

git clone https://github.com/LDRyan0/CUDA-Examples.git
cd CUDA-Examples/src/
make
  • make debug to compile with -DDEBUG (used for checking of cudaError_t return types)
  • make release adds -O3 and --use_fast_math

About

A basic set of programs that perform a variety of parallelised linear algebra operations using CUDA.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published