Sparse Computations and Multi-BSP
Sparse Computations and Multi-BSP
Albert-Jan Yzelman October 11, 2016 Parallel Computing & Big Data Huawei Technologies France
Albert-Jan Yzelman
Sparse Computations and Multi-BSP Albert-Jan Yzelman October 11, - - PowerPoint PPT Presentation
Sparse Computations and Multi-BSP Sparse Computations and Multi-BSP Albert-Jan Yzelman October 11, 2016 Parallel Computing & Big Data Huawei Technologies France Albert-Jan Yzelman Sparse Computations and Multi-BSP BSP BSP machine = {
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
s
s
s
s
s
s g + L} + . . .
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
s
s
s
s
s
s g + L} + . . .
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
http://www.computingreviews.com/hottopic/hottopic_essay.cfm?htname=BSP Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1: for j | ∃aij = 0 ∈ As and πx(j) = s do 2:
3: sync {execute fan-out}
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1: for j | ∃aij = 0 ∈ As and πx(j) = s do 2:
3: sync {execute fan-out} 4: ys = Asxs {local multiplication stage}
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1: for j | ∃aij = 0 ∈ As and πx(j) = s do 2:
3: sync {execute fan-out} 4: ys = Asxs {local multiplication stage} 5: for i | ∃aij ∈ As and πy(i) = s do 6:
7: sync {execute fan-in}
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1: for j | ∃aij = 0 ∈ As and πx(j) = s do 2:
3: sync {execute fan-out} 4: ys = Asxs {local multiplication stage} 5: for i | ∃aij ∈ As and πy(i) = s do 6:
7: sync {execute fan-in} 8: for all (i, α) received do 9:
Rob H. Bisseling, “Parallel Scientific Computation”, Oxford Press, 2004. Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1 πy(i) ∈ {s | ∃aij ∈ A, πA(i, j) = s} and 2 πx(j) ∈ {s | ∃aij ∈ A, πA(i, j) = s}; Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1 πy(i) ∈ {s | ∃aij ∈ A, πA(i, j) = s} and 2 πx(j) ∈ {s | ∃aij ∈ A, πA(i, j) = s};
j
j
i (λrow i
i
j
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1 2 3 4 1 2 4 3
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
2nz(A) p
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
2nz(A) p
2nz(A) p
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
2nz(A) p
2nz(A) p
2nz(A) p
s
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
2nz(A) p
2nz(A) p
2nz(A) p
s
2nz(A) p
s
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
2nz(A) p
2nz(A) p
2nz(A) p
s
2nz(A) p
s
i
i
i
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
2nz(A) p
2nz(A) p
2nz(A) p
s
2nz(A) p
s
i
i
i
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1: do 2:
3:
4:
5: while(up)
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1: do 2:
3:
4:
5:
6:
7:
8:
9:
10:
11: while(up)
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1: do 2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12: while(up)
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
l=0 pl?
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
l=0 pl?
Very similar to previous work!
multiplication by using sparse matrix partitioning”, SISC, 2009.
matrix–vector multiplication”, Parallel Computing, 2011.
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
l=0 pl?
Very similar to previous work!
multiplication by using sparse matrix partitioning”, SISC, 2009.
matrix–vector multiplication”, Parallel Computing, 2011.
A = A0 ∪ . . . ∪ Ak0, Ai = Ai,0 ∪ . . . ∪ Ai,k1, etc. solves assignment issue.
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
l=0 pl?
Very similar to previous work!
multiplication by using sparse matrix partitioning”, SISC, 2009.
matrix–vector multiplication”, Parallel Computing, 2011.
A = A0 ∪ . . . ∪ Ak0, Ai = Ai,0 ∪ . . . ∪ Ai,k1, etc. solves assignment issue.
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1 coarsen 2 recurse or randomly partition 3 do k steps of HKLFM
calculate gains taking g0, . . . , gL−1 into account
4 refine Albert-Jan Yzelman
Sparse Computations and Multi-BSP
1 coarsen 2 recurse or randomly partition 3 do k steps of HKLFM
calculate gains taking g0, . . . , gL−1 into account
4 refine
aij ∈ ˜ As1,s2, aij / ∈ ˜ As1: gain is g1 − g0 or 2(g1 − g0). aij / ∈ ˜ As1,s2: gain is 0, g1 − g0, or 2(g1 − g0).
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
parts must fit into local memory.
implies different partitioning techniques.
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
parts must fit into local memory.
implies different partitioning techniques.
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
all numbers are in ms.
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
do we need to program for explicit hierarchies? (No!) is recursive SPMD general enough? Generic API, portability interoperability: call from MPI, BSP, Spark, ...
requires explicit Multi-BSP programming
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Albert-Jan Yzelman
Sparse Computations and Multi-BSP
Ref.: Yzelman, A. N. (2015). Generalised vectorisation for sparse matrix: vector multiplication. In Proceedings of the 5th Workshop on Irregular Applications: Architectures and Algorithms. ACM. Albert-Jan Yzelman