Skip to content

The repo contains program for matrix multiplication using CUDA

Notifications You must be signed in to change notification settings

shriroopjoshi/matrix_mult

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Matrix multiplication using CUDA

This is a CUDA program to multiply two matrices Pa x b and Qb x c to calculate Ra x c. The values for a, b and c are specified by user and their default value is 1024. The program also accepts the number of blocks and threads per blocks from user.

I have used MS Windows as my development environment. If you are using Linux, please check steps to build.

System requirements

MS Windows environment:

  1. MS Visual Studio
  2. NVCC and Nsight

Linux:

  1. NVCC

How to build

MS Windows environment:

  1. Import the kernel.cu file in MS Visual Studio
  2. Set the value of WINDOWS to 1. It has been #defined on first line of kernel.cu
  3. Build the project

Linux:

  1. Open kernel.cu and unset the value of WINDOWS to 0. It has been #defined on first line of kernel.cu
  2. Make the project
    
        $ cd matrix_mult
        $ make
    

How to run

MS Windows environment:

  1. Execute the project in MS Visual Studio using Nsight

Linux:

  1. Execute kernel binary file
    
        $ cd matrix_mult
        $ ./kernel
    

Note: It accepts the values of a, b and c using command-line arguments if all three values are provided. Otherwise, the program uses default value.

About

The repo contains program for matrix multiplication using CUDA

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published