Strassen's Matrix Multiplication Presented By: Gaurav Jain Lalchand Course Project On : Under The Guidance Of: Prof. Subodh Kumar.

Slides:



Advertisements
Similar presentations
PRECALCULUS 2 Determinants, Inverse Matrices & Solving.
Advertisements

Aim: How do we solve polynomial equations using factoring?
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Solve Multi-step Equations
Objective - To simplify expressions using the order of operations. Simplify each expression below. 1) 6 + 5(8 - 2) 2) 3) 4)
Calculating the Determinant of a 3 by 3 Matrix NEXT This Concept tutor is a supplement to help you understand the process of calculating a determinant.
Objective: Learn to use a table to find equivalent ratios and rates.
Arizona 2008 School Health Profiles Report Weighted Lead Health Education Teacher Survey Results NA=Not available.
Adding & Subtracting Matrices
A Synergetic Approach to Throughput Computing on IA Chi-Keung (CK) Luk TPI/DPD/SSG Intel Corporation Nov 16, 2010.
Use Distributive Prop and Simplify 1.(4+3)3 2.2(x+3) 3.-2(x+3) 4.3x +2y+4y 5.x+ 3(x+4y) a+3b- 5a Solve for the variable 7. y+7=21 8. m+10=-2 9.
© DEEDS – OS Course WS11/12 Lecture 10 - Multiprocessing Support 1 Administrative Issues  Exam date candidates  CW 7 * Feb 14th (Tue): * Feb 16th.
Raspberry Pi Performance Benchmarking
Rearranging Equations
Chapter 4 Systems of Linear Equations; Matrices
VSCSE Summer School Programming Heterogeneous Parallel Computing Systems Lecture 6: Basic CUDA and MPI.
BWUPEP2011, UIUC, May 29 - June Blue Waters Undergraduate Petascale Education Program May 29 – June Hybrid MPI/CUDA Scaling accelerator.
Efficient Sparse Matrix-Matrix Multiplication on Heterogeneous High Performance Systems AACEC 2010 – Heraklion, Crete, Greece Jakob Siegel 1, Oreste Villa.
Productive Performance Tools for Heterogeneous Parallel Computing Allen D. Malony Department of Computer and Information Science University of Oregon Shigeo.
Strassen's Matrix Multiplication Sibel KIRMIZIGÜL.
Sequence Alignment in DNA Under the Guidance of : Prof. Kolin Paul Presented By: Lalchand Gaurav Jain.
Linear Equations with Different Kinds of Solutions
4.2 Adding and Subtracting Matrices 4.3 Matrix Multiplication
Matrix Equations Step 1: Write the system as a matrix equation. A three-equation system is shown below.
Massively LDPC Decoding on Multicore Architectures Present by : fakewen.
Exercise problems for students taking the Programming Parallel Computers course. Janusz Kowalik Piotr Arlukowicz Tadeusz Puzniakowski Informatics Institute.
Data Partitioning on Heterogeneous Multicore and Multi-GPU Systems Using Functional Performance Models of Data-Parallel Applications Published in: Cluster.
An approach for solving the Helmholtz Equation on heterogeneous platforms An approach for solving the Helmholtz Equation on heterogeneous platforms G.
Scalable Data Clustering with GPUs Andrew D. Pangborn Thesis Defense Rochester Institute of Technology Computer Engineering Department Friday, May 14 th.
By Arun Bhandari Course: HPC Date: 01/28/12. GPU (Graphics Processing Unit) High performance many core processors Only used to accelerate certain parts.
4.5 Solving Systems using Matrix Equations and Inverses.
4.5 Solving Systems using Matrix Equations and Inverses OBJ: To solve systems of linear equations using inverse matrices & use systems of linear equations.
Have we ever seen this phenomenon before? Let’s do some quick multiplication…
Accelerating a Software Radio Astronomy Correlator By Andrew Woods Supervisor: Prof. Inggs & Dr Langman.
Autonomic scheduling of tasks from data parallel patterns to CPU/GPU core mixes Published in: High Performance Computing and Simulation (HPCS), 2013 International.
4.1: Matrix Operations Objectives: Students will be able to: Add, subtract, and multiply a matrix by a scalar Solve Matrix Equations Use matrices to organize.
8.2 Operations With Matrices
Matrix Operations.
2.2 Multiplying Matrices Mr. Anderson Pre Calculus Falconer Central High School Falconer, NY.
Sec 4.1 Matrices.
Algebra Matrix Operations. Definition Matrix-A rectangular arrangement of numbers in rows and columns Dimensions- number of rows then columns Entries-
Bell Ringer 2. Systems of Equations 4 A system of equations is a collection of two or more equations with a same set of unknowns A system of linear equations.
Multiplication and Division Properties. Multiplication Properties Commutative Property Associative Property Identity Property Zero Property Distributive.
3.8B Solving Systems using Matrix Equations and Inverses.
3.5 Perform Basic Matrix Operations Add Matrices Subtract Matrices Solve Matric equations for x and y.
Essential Question: Why, oh why, didn’t I take the blue pill?
Notes Over 4.2 Finding the Product of Two Matrices Find the product. If it is not defined, state the reason. To multiply matrices, the number of columns.
(4-2) Adding and Subtracting Matrices Objectives: To Add and subtract Matrices To solve certain Matrix equations.
Add and subtract matrices. Multiply by a matrix scalar.
Warm-UP A = 7-310B = C =7-4Find:A 22 and C 31 97Find: the dimensions of each -88 Matrix Find: A + B and B – A and C + B.
Solving Equations with Variables on Both Sides. Review O Suppose you want to solve -4m m = -3 What would you do as your first step? Explain.
13.3 Product of a Scalar and a Matrix.  In matrix algebra, a real number is often called a.  To multiply a matrix by a scalar, you multiply each entry.
Matrices.
Solving Linear Equations and Inequalities
MATHEMATICS Matrix Multiplication
Matrix Multiplication
Objective Solve equations in one variable that contain variable terms on both sides.
Richard Anderson Lecture 13 Recurrences and Divide and Conquer
4.1 Matrices – Basic Operations
MATRICES MATRIX OPERATIONS.
1.3 Vector Equations.
Richard Anderson Lecture 12 Recurrences and Divide and Conquer
a + 2 = 6 What does this represent? 2 a
Objective Solve equations in one variable that contain variable terms on both sides.
Multiplication of Matrices
3.6 Multiply Matrices.
What is the dimension of the matrix below?
Unit 2B/3A Solving Equations
Matrix Multiplication Sec. 4.2
Use of Submatrices If the original matrix is n x n, the four submatrices are n/2 x n/2 each; for simplicity we assume powers of two To find the result.
Presentation transcript:

Strassen's Matrix Multiplication Presented By: Gaurav Jain Lalchand Course Project On : Under The Guidance Of: Prof. Subodh Kumar

Basic Matrix Multiplication Suppose we want to multiply two matrices of size N x N: for example A x B = C. C 11 = a 11 b 11 + a 12 b 21 C 12 = a 11 b 12 + a 12 b 22 C 21 = a 21 b 11 + a 22 b 21 C 22 = a 21 b 12 + a 22 b 22 2x2 matrix multiplication can be accomplished in 8 multiplication.(2 log 2 8 =2 3 )

Strassens’s Matrix Multiplication

P 1 = (A 11 + A 22 )(B 11 +B 22 ) P 2 = (A 21 + A 22 ) * B 11 P 3 = A 11 * (B 12 - B 22 ) P 4 = A 22 * (B 21 - B 11 ) P 5 = (A 11 + A 12 ) * B 22 P 6 = (A 21 - A 11 ) * (B 11 + B 12 ) P 7 = (A 12 - A 22 ) * (B 21 + B 22 )

Strassens’s Matrix Multiplication P 1 = (A 11 + A 22 )(B 11 +B 22 ) P 2 = (A 21 + A 22 ) * B 11 P 3 = A 11 * (B 12 - B 22 ) P 4 = A 22 * (B 21 - B 11 ) P 5 = (A 11 + A 12 ) * B 22 P 6 = (A 21 - A 11 ) * (B 11 + B 12 ) P 7 = (A 12 - A 22 ) * (B 21 + B 22 ) C 11 = P 1 + P 4 - P 5 + P 7 C 12 = P 3 + P 5 C 21 = P 2 + P 4 C 22 = P 1 + P 3 - P 2 + P 6

Strassens’s Matrix Multiplication Ref : Accelerating High Performance Applications with CUDA and MPI

Why MPI + CUDA ?.. ➢ Equations naturally suitable for CUDA environment ➢ Incapability of CUDA : No inter GPU communication. ➢ MPI : Data distributing mechanism ➢ CUDA : Main Execution Engine

MPI + CUDA

➢ Divide the input matrix into four equal parts ➢ Send the appropiate part to the corresponding process ➢ Each process compute the corresponding equation  Node Contains GPU  Use kernels on their own GPU to compute result Steps Performed

➢ Divide the input matrix into four equal parts ➢ Send the appropiate part to the corresponding process ➢ Each process compute the corresponding equation ➢ Process will send their result to the head process of equation ➢ All Heads collect data ➢ Head will compute C's equation ➢ All head send their partial result to master node ➢ Master will combine & display the result Steps Performed

P 1 = (A 11 + A 22 )(B 11 +B 22 ) P 5 = (A 11 + A 12 ) * B 22 P 1 = (A 11 + A 22 )(B 11 +B 22 ) P 5 = (A 11 + A 12 ) * B 22 P 2 = (A 21 + A 22 ) * B 11 P 6 = (A 21 - A 11 ) * (B 11 + B 12 ) P 2 = (A 21 + A 22 ) * B 11 P 6 = (A 21 - A 11 ) * (B 11 + B 12 ) P 3 = A 11 * (B 12 - B 22 ) P 7 = (A 12 - A 22 ) * (B 21 + B 22 ) P 3 = A 11 * (B 12 - B 22 ) P 7 = (A 12 - A 22 ) * (B 21 + B 22 ) P 4 = A 22 * (B 21 - B 11 ) Detailed Description – Step 1

P 1, P 5 P 2, P 6 P 3, P 7 P4P4 P4P4 Detailed Description – Step 2

P 1, P 5 P 2, P 6 P3, P7 P4P4 P4P4 Declare Result Detailed Description – Step 3

Experimental Result - 1

Experimental Result - 2

Experimental Result - 3

References : Accelerating High Performance Applications with CUDA and MPI : N. P. Karunadasa & D. N. Ranasinghe Strassen’s Matrix Multiplication on GPUs : Junjie Li, Sanjay Ranka

Thanks