Skip to content

dakotahawkins/matrix-cuda

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

matrix-cuda

Matrix multiplication in CUDA, this is a toy program for learning CUDA, some functions are reusable in other project

Test Results

The following tests were carried out on a GTX 660 card

C:\Users\Dakota\Documents\src\matrix-cuda>x64\Release\matrix_cuda.exe
==================================================================================
Enter m, n, and k: 1024 1024 1024

----------------------------------------------------------------------------------
Matrix type: int
Time elapsed on matrix multiplication of 1024x1024 . 1024x1024 on GPU: 17.4332ms.

----------------------------------------------------------------------------------
Matrix type: float
Time elapsed on matrix multiplication of 1024x1024 . 1024x1024 on GPU: 17.5297ms.

----------------------------------------------------------------------------------
Matrix type: double
Time elapsed on matrix multiplication of 1024x1024 . 1024x1024 on GPU: 30.9786ms.

==================================================================================

C:\Users\Dakota\Documents\src\matrix-cuda>x64\Release\matrix_cuda.exe
==================================================================================
Enter m, n, and k: 2048 2048 2048

----------------------------------------------------------------------------------
Matrix type: int
Time elapsed on matrix multiplication of 2048x2048 . 2048x2048 on GPU: 132.073ms.

----------------------------------------------------------------------------------
Matrix type: float
Time elapsed on matrix multiplication of 2048x2048 . 2048x2048 on GPU: 128.334ms.

----------------------------------------------------------------------------------
Matrix type: double
Time elapsed on matrix multiplication of 2048x2048 . 2048x2048 on GPU: 209.006ms.

==================================================================================

C:\Users\Dakota\Documents\src\matrix-cuda>x64\Release\matrix_cuda.exe
==================================================================================
Enter m, n, and k: 4096 4096 4096

----------------------------------------------------------------------------------
Matrix type: int
Time elapsed on matrix multiplication of 4096x4096 . 4096x4096 on GPU: 950.203ms.

----------------------------------------------------------------------------------
Matrix type: float
Time elapsed on matrix multiplication of 4096x4096 . 4096x4096 on GPU: 948.593ms.

----------------------------------------------------------------------------------
Matrix type: double
Time elapsed on matrix multiplication of 4096x4096 . 4096x4096 on GPU: 2630.69ms.

==================================================================================

About

matrix multiplication in CUDA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Cuda 85.0%
  • C++ 15.0%