Laboratory Practice I (410246)
Laboratory Practice I (410246)
Laboratory Practice I (410246)
Laboratory Practice I
[410246]
Ms. R. S. Shishupal
Assistant Professor
Dept. of Computer Engineering,
Sinhgad Institute of Technology, Lonavala
rss.sit@sinhgad.edu
Cell. +91 9011909490
• Step 1:
!nvcc --version
• Step 2:
!apt-get --purge remove cuda nvidia* libnvidia-*
!dpkg -l | grep cuda- | awk '{print $2}' | xargs -n1 dpkg
--purge
!apt-get remove cuda-*
!apt autoremove
!apt-get update
• Step 5:
!pip install
git+git://github.com/andreinechaev/nvcc4jupyter.git
• Step 6:
• %load_ext nvcc_plugin
Device = GPU
Host = CPU
Kernel =
function that
runs on the
device
• CUDA kernels:
• CUDA defines an extension to the C language used to
invoke a kernel.
• A kernel is just a name for a function that executes on
the GPU.
Example:
WIDTH = 64;
float* Md
int size = WIDTH * WIDTH * sizeof(float);
cudaMalloc((void**)&Md, size);
cudaFree(Md);