Skip to content

ecotner/learning-cuda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Learning CUDA

Learning GPU programming with CUDA

Some resources:

  • Tutorials:
  • CUDA By Example
    • apparently a good book; NOT free
  • Accelerated libraries for common operations
    • linear algebra, FFT, RNG, algebraic equations, sparse matrices, tensor ops, linear solvers, graph algorithms
    • check this out before rolling your own algos!
  • Thrust
    • high-level library of parallel algorithms and data structures

Tips:

  • vscode intellisense w/ CUDA:
    • in vscode, there is an extension called vscode-cudacpp that gets rid of the syntax error highlighting you would get from __global__, kernel<<<a,b>>>, etc. in base C/C++
    • vscode does not autocomplete from the cuda libraries by default, so you need to
      1. add association of .cu or .cuh files with C++ in your settings.json (i.e. do this, but replace "cuda" --> "cpp")
      2. in your C++ language properties c_cpp_properties.json, add /usr/local/cuda/include/** (or wherever your CUDA headers are) to your include path
  • CUDA-X libraries
    • add -lcurand etc. to your nvcc commands to tell linker where to look
  • device specs
    • can find simple list of device specifications on wikipedia
    • a more complete specification can be found on NVIDIA's documentation, but is difficult to find
    • or you can query your device itself by navigating to ~/cuda/samples/1_Utilities/deviceQuery, build using make, and run ./deviceQuery

About

Learning GPU programming with CUDA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published