Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 563 Bytes

README.md

File metadata and controls

34 lines (21 loc) · 563 Bytes

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