Skip to content

mlberkeley/CUDA-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CUDA_intro

Setup

Add the following lines to your ~/.profile to add nvcc to the path:

export PATH="/usr/local/cuda-11.6/bin:$PATH"
export PATH="~/.local/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.6/lib64:$LD_LIBRARY_PATH"

Create a virtual env and install numba:

python -m venv venv
source venv/bin/activate
pip install numba cuda-python numpy

vec_add

Implement a vector add function in CUDA C++

Build: make build

Run: make run

numba

Implement a vector add function in Python using Numba

Run: make run

About

Example of how to use cuda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published