GPU utilized parallel algorithms for numerical methods and scientific computing. Each root level folder in this repository contains an algorithm and few examples using that algorithm.
You can use any of the 2 methods to setup the repository on your linux machine:
- Install latest Nvidia drivers. To make sure it's installed, run this command:
nvidia-smi
- Install CUDA Toolkit. (Recommended version 11.8). To make sure its install, run this command:
nvcc --version
- Install VS Code (Recommended code editor).
- For VS Code intellisense, add cuda toolkit's include path in
CPLUS_INCLUE_PATH
variable in your/etc/profile
file. - Checkout this repository and open in your code editor:
git clone [email protected]:sachingodishela/cuda-algorithms.git
cd cuda-algorithms
code .
- Install Docker, do not skip the post-installation steps. To test your installation, run this without sudo:
docker run hello-world
- Install latest Nvidia drivers. To make sure it's installed, run this command:
nvidia-smi
- Install and configure the Nvidia Container Toolkit. Don't skip the Rootless mode while configuring. To test your configuration, run this without sudo:
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
- Install VS Code and install teh Dev Container extension.
- Checkout this repository and open in Visual Studio Code:
git clone [email protected]:sachingodishela/cuda-algorithms.git
cd cuda-algorithms
code .
- When you get a prompt to open the workspace in dev container, click yes.
If using VS Code:
- Open any
.cu
file and pressCtrl + Shift + B
to run the opened file. - Open any
.cu
file and pressF5
to debug the opened file.
Just raise a PR and I'll take a look. Keep these in mind while developing:
- Your algorithm must be auto-scalable to use as many GPUs as avaiable.
- Don't forget to update the root level README with Changelog.
- Add a folder level README if you're adding a new algorithm folder to the repo.
Date | Time | Author | Change |
---|---|---|---|
13-July-2024 | 18:25 | @sachingodishela | Vector Addition with CPU/GPU execution times comparision. |
12-July-2024 | 20:09 | @sachingodishela | Dev Container Support & Run hello-cuda in CI. |
11-July-2024 | 18:27 | @sachingodishela | Update README with setup and build instructions. |
11-July-2024 | 18:08 | @sachingodishela | Added vscode configs for building, running and debugging the files in linux environment. Added first program "hello-cuda" which prints avaiable GPUs and their properties. |
11-July-2024 | 16:37 | @sachingodishela | Created this repository. |