Outline
Investigating hypergraph-partitioning-based sparse matrix partitioning methods
Bora U¸ car
ro:ma, Lyon, France
22 October 2009
Jointly with ¨ Umit V. C ¸ataly¨ urek (VMWIP)
1/37 Hypergraph partitioning
Investigating hypergraph-partitioning-based sparse matrix - - PowerPoint PPT Presentation
Outline Investigating hypergraph-partitioning-based sparse matrix partitioning methods Bora U car ro:ma, Lyon, France 22 October 2009 Jointly with Umit V. C ataly urek (VMWIP) 1/37 Hypergraph partitioning Outline Outline
Outline
ro:ma, Lyon, France
1/37 Hypergraph partitioning
Outline
1
2
3
4
2/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
3/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
P
v∈V w(v)
K
4/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
1
3
4
2
2
5/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
6/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
3 1 2 2 2 4 4 4 3 3 1 3 1 1
8
5
4
2 x 3 x 4
1 3
1 2 3 2 2 4 4
1
2
6 = a65x5 + a66x6 + a68x8.)
3
6 to P4.)
7/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
8/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
1 1 2 3 2 2 4 4
9/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
1 1 2 3 2 2 4 4
10/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
i i k k h h
j
j
i k k h h
ji
jh jk
i
j j
11/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
3 1 2 2 2 4 4 4 3 3 1 3 1 1
8
5
4
2 x 3 x 4
1 3
1 2 3 2 2 4 4
1
2
6 = a65x5 + a66x6 + a68x8.)
3
6 to P4.)
12/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
Partitioning Scheme Hypergraph Model Parallel Algorithm Parallel y←Ax computation Row-parallel Column-parallel Row-Column-parallel 1D RW 1D CW 2D FG 2D JL 2D CH 2D via Orthogonal Partitioning 2D Nonzero Based 2D ML2D 2D ORB Column-Net Row-Net Column-Row-Net
Multi-Constraint
13/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
nnz = 47
r1
r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16
3 4 6 8 11 12 14 16 1 2 5 7 9 10 13 15 3 4 6 8 11 12 14 16 1 2 5 7 9 10 13 15
nnz = 47 vol = 3 imbal = [−2.1%, 2.1%]
14/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
r1
r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c2 c5 c12
4 8 12 16 3 6 11 14 1 2 5 13 7 9 10 15 4 8 12 16 3 6 11 14 1 2 5 13 7 9 10 15
nnz = 47 vol = 8 imbal = [−6.4%, 2.1%] 15/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
16/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
sym(A) > 0.95 Partitioning Recipe Square? Yes FGS/FGU JLS/JLU Yes No Yes CWU Yes RWU Yes FGU No No Pathological?
No FGS/FGU Yes FGU Yes JLUT Yes JLU No No No
No M < 0.35N N < 0.35M (M = N?) M ≥ Z mode(dr, dc) = 0 M/ √ K < max(dr, dc) max(dr, dc) ≥ (1 − ε)2Z/ √ K avg(dr) > med(dr) Q3(dr)-med(dr) < max(dr)−Q3(dr)
2
Q3(dc)-med(dc) < max(dc)−Q3(dc)
2
med(dr) ≤med(dc) 17/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
τ = Communication volume relative to the best Fraction of test cases
RW CW FG JL CH PR
1 1.5 2 2.5 3 3.5 4 4.5 5 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
τ = Partitioning time relative to the best Fraction of test cases
RW CW FG JL CH PR
18/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
19/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
20/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
21/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
22/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
23/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
!"!!# $"!!# %"!!# &"!!# '"!!# ("!!# )"!!# *"!!# +"!!# ,"!!# $-%# $-'# $-)# $-+# %-$# '-$# )-$# +-$# %-%# %-&# &-%# &-&#
!"#$%&'()*+,"-%&+."&/$)+ 01%&'23+01)2%#'"+
(a) RW
!"!!# $"!!# %"!!# &"!!# '"!!# ("!!# )"!!# *"!!# +"!!# ,"!!# $-%# $-'# $-)# $-+# %-$# '-$# )-$# +-$# %-%# %-&# &-%# &-&#
!"#$%&'()*+,"-%&+."&/$)+ 01%&'23+01)2%#'"+
(b) CW
!"!!# !"$!# %"!!# %"$!# &"!!# &"$!# '"!!# '"$!# ("!!# ("$!# $"!!# %)&# %)(# %)*# %)+# &)%# ()%# *)%# +)%# &)&# &)'# ')&# ')'#
!"#$%&'()*+,"-%&+."&/$)+ 01%&'23+01)2%#'"+
(c) JL
!"!!# $"!!# %"!!# &"!!# '"!!# ("!!# )"!!# *"!!# $+%# $+'# $+)# $+,# %+$# '+$# )+$# ,+$# %+%# %+&# &+%# &+&#
!"#$%&'()*+,"-%&+."&/$)+ 01%&'23+01)2%#'"+
(d) CH
!"!!# !"$!# %"!!# %"$!# &"!!# &"$!# '"!!# '"$!# %(&# %()# %(*# %(+# &(%# )(%# *(%# +(%# &(&# &('# '(&# '('#
!"#$%&'()*+,"-%&+."&/$)+ 01%&'23+01)2%#'"+
(e) FG
!"!!# !"$!# %"!!# %"$!# &"!!# &"$!# '"!!# '"$!# ("!!# ("$!# $"!!# %)&# %)(# %)*# %)+# &)%# ()%# *)%# +)%# &)&# &)'# ')&# ')'#
!"#$%&'()*+,"-%&+."&/$)+ 01%&'23+01)2%#'"+
(f) All
24/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
25/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
26/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
27/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
10 20 30 40 50 60 10 20 30 40 50 60 nz = 288
i,j
i−1,j + x(k) i+1,j + x(k) i,j−1 + x(k) i,j+1 − 4x(k) i,j
28/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
29/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
5 10 15 2 4 6 8 10 12 14 16
vol = 64 boundary−1 = 56 boundary−2 = 4 imbal = [0.0%, 0.0%]
5 10 15 2 4 6 8 10 12 14 16
vol = 63 boundary−1 = 55 boundary−2 = 4 imbal = [0.0%, 0.0%]
30/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
8 ; M1/2 = M 2 ; M3/8 = M1/2 − M1/8
2 4 6 8 10 12 14 16 2 4 6 8 10 12 14 16
vol = 58 boundary1 = 50 boundary2 = 4 31/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
2 4 6 8 10 12 14 16 2 4 6 8 10 12 14 16
vol = 58 boundary1 = 50 boundary2 = 4 5 10 15 20 25 2 4 6 8 10 12 14 16
vol = 102 boundary−1 = 86 boundary−2 = 8
32/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
5 10 15 20 25 2 4 6 8 10 12 14 16
vol = 102 boundary−1 = 86 boundary−2 = 8 5 10 15 20 25 30 5 10 15 20 25
vol = 250 boundary−1 = 202 boundary−2 = 24
33/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
5 10 15 20 25 30 5 10 15 20 25
vol = 250 boundary−1 = 202 boundary−2 = 24 5 10 15 20 25 30 5 10 15 20 25 30
vol = 354 boundary1 = 282 boundary2 = 36
34/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
35/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
36/37 Hypergraph partitioning
Hypergraphs Parallel SpMxV Scalability analysis of partitioning methods Concluding remarks
2 + 2.
37/37 Hypergraph partitioning