Skip to content

sachingodishela/cuda-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cuda-algorithms

CI

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.

Setup Instructions

You can use any of the 2 methods to setup the repository on your linux machine:

1. Standard Method

  1. Install latest Nvidia drivers. To make sure it's installed, run this command:
nvidia-smi
  1. Install CUDA Toolkit. (Recommended version 11.8). To make sure its install, run this command:
nvcc --version
  1. Install VS Code (Recommended code editor).
  2. For VS Code intellisense, add cuda toolkit's include path in CPLUS_INCLUE_PATH variable in your /etc/profile file.
  3. Checkout this repository and open in your code editor:
git clone [email protected]:sachingodishela/cuda-algorithms.git
cd cuda-algorithms
code .

2. Using Dev Container

  1. Install Docker, do not skip the post-installation steps. To test your installation, run this without sudo:
 docker run hello-world
  1. Install latest Nvidia drivers. To make sure it's installed, run this command:
nvidia-smi
  1. 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
  1. Install VS Code and install teh Dev Container extension.
  2. Checkout this repository and open in Visual Studio Code:
git clone [email protected]:sachingodishela/cuda-algorithms.git
cd cuda-algorithms
code .
  1. When you get a prompt to open the workspace in dev container, click yes.

Run/Debug Instructions

If using VS Code:

  1. Open any .cu file and press Ctrl + Shift + B to run the opened file.
  2. Open any .cu file and press F5 to debug the opened file.

Contribution

Just raise a PR and I'll take a look. Keep these in mind while developing:

  1. Your algorithm must be auto-scalable to use as many GPUs as avaiable.
  2. Don't forget to update the root level README with Changelog.
  3. Add a folder level README if you're adding a new algorithm folder to the repo.

Changelog

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published