{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lec7 - CS575 Parallel Processing Lecture seven Dense Matrix...

This preview shows pages 1–6. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS575 lecture 7 2 Mapping n x n matrix to p PEs Striped: allocate rows (or columns) on PEs Block striped: consecutive rows to one PE, e.g.: PE# 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 Row 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Cyclic striped: interleaving rows onto Pes PE# 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 Row 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Hybrid PE# 0 0 1 1 2 2 3 3 0 0 1 1 2 2 3 3 Row 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Finest granularity One row (or column) per PE, (p = n)
CS575 lecture 7 3 Mapping n x n matrix to p PEs (cont.) Checkerboard Map n/sqrt(p) x n/sqrt(p) blocks onto Pes Maps well on a 2D mesh Finest granularity 1 element per PE, (p = n*n) Many matrix algorithms allow block formulation Matrix add Matrix multiply

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS575 lecture 7 4 Matrix Transpose for i = 0 to n-1 for j = i+1 to to n-1 swap(A, i, j) Striped: (almost) all-to-all personal communication Checkerboard (p = n*n) Upper triangle element travels down to diagonal then left Lower triangle element travels up to diagonal then right Checkerboard (p < n*n) Do above communication but with blocks: 2*sqrt(p) * (n*n)/p traffic Transpose blocks at destination: O(n*n/p) swaps
CS575 lecture 7 5 Recursive Transpose for hypercube View the matrix as 2 x 2 block matrix View hypercube as four sub-cubes of p/4 processors Exchange upper-right and lower-left blocks On a hypercube this goes via one intermediate node Recursively transpose the blocks First (log p)/2 transposes require communication n=16, p=16: first two transposes involve communication In each transpose, pairs of PEs exchange their blocks, via one

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern