Sugan2002 / PCA-Demonstrate-Matrix-transposition-on-shared-memory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exp No: 06

Date: 6-11-2023

Demonstrate-Matrix-transposition-on-shared-memory

Aim:

To compare the performance of Rectangular Shared Memory Kernels with a grid (1,1) and a block (16,16) for Matrix Transposition.

Procedure:

Step 1: Define constants for block dimensions, padding, and shared memory configurations.

Step 2: Implement a function to print data.

Step 3: Implement multiple kernel functions for performing matrix transposition using shared memory.

Step 4: Set up CUDA device, configure grid and block dimensions, allocate device memory, perform matrix transposition using each kernel function, copy results to host, optionally print the data, and free the allocated memory.

Step 5: Reset the CUDA device.

Step 6: Terminate the program.

Output:

image

Result:

Thus,the program to compare the performance of Rectangular Shared Memory Kernels with a grid (1,1) and a block (16,16) for Matrix Transposition has been successfully executed.

About