Lab 3: Local CUDA setup

Only follow this instruction if you have a Linux system and a NVIDIA GPU. Please complete this before the lab!

This page will guide you through the setup of the CUDA toolkit and the compilation of a simple CUDA program.

CUDA Toolkit download

The CUDA toolkit 12.5 requires about 5GB of your system storage you can install it from the NVIDIA website CUDA Downloads. Choose the instruction that fits your system, and follow the instructions. An example for Fedora 39 is shown below.

Example CUDA toolkit installation on Fedora

Downloading the template locally

  1. Open a terminal where you want your template to be and run curl https://cese.ewi.tudelft.nl/computer-engineering/docs/CESE4130_Lab3.zip --output CESE4130_Lab3.zip to download the template.

  2. Unzip the template running unzip CESE4130_Lab3.zip -d CESE4130_Lab3

Running device-query locally

  1. cd /device-query and run make to compile the program.

  2. Run the program with ./device-query to check if everything is working properly.