Fast Output-Sensitive Matrix Multiplication
ESA 2015
Riko Jacob1, Morten St¨
- ckel2
1IT University of Copenhagen, 2 University of Copenhagen
March 8 2016
Jacob, St¨
- ckel ITU, DIKU
March 8 2016 1 / 28
Fast Output-Sensitive Matrix Multiplication ESA 2015 Riko Jacob 1 , - - PowerPoint PPT Presentation
Fast Output-Sensitive Matrix Multiplication ESA 2015 Riko Jacob 1 , Morten St ockel 2 1 IT University of Copenhagen, 2 University of Copenhagen March 8 2016 Jacob, St ockel ITU, DIKU March 8 2016 1 / 28 (Fast) Sparse matrix multiplication
1IT University of Copenhagen, 2 University of Copenhagen
Jacob, St¨
March 8 2016 1 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 2 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 3 / 28
(Fast) Sparse matrix multiplication Problem description
a11 a12 ... a1p a21 a22 ... a2p . . . . . . ... . . . an1 an2 ... anp A : n rows p columns
c11 c12 ... c1q c21 c22 ... c2q . . . . . . ... . . . cp1 cp2 ... cpq C : p rows q columns
ac11 ac12 ... ac1q ac21 ac22 ... ac2q . . . . . . ... . . . acn1 acn2 ... acnq AC = A×C : n rows q columns
Jacob, St¨
March 8 2016 4 / 28
(Fast) Sparse matrix multiplication Problem description
a11 a12 ... a1p a21 a22 ... a2p . . . . . . ... . . . an1 an2 ... anp A : n rows p columns c11 c12 ... c1q c21 c22 ... c2q . . . . . . ... . . . cp1 cp2 ... cpq C : p rows q columns ac11 ac12 ... ac1q ac21 ac22 ... ac2q . . . . . . ... . . . acn1 acn2 ... acnq a21 ×c12 a
2 2
× c
2 2
a
2 p
× c
p 2
+ +...+ AC = A×C : n rows q columns
Jacob, St¨
March 8 2016 5 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 6 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 7 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 8 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 9 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 10 / 28
(Fast) Sparse matrix multiplication Problem description
Jacob, St¨
March 8 2016 11 / 28
(Fast) Sparse matrix multiplication Problem description
ω−1 2
Jacob, St¨
March 8 2016 12 / 28
(Fast) Sparse matrix multiplication Problem description
Method word-RAM complexity Notes General dense O (U ω) Lingas ˜ O
Requires boolean matrices. Iwen-Spencer, Le Gall O
Requires O
nonzeros per column. Williams-Yu, Pagh ˜ O
˜ O
√ Z + Z + N
˜ O
This paper ˜ O
I/O complexity Notes General dense ˜ O
˜ O
√ Z/(B √ M)
This paper ˜ O
ω−1 2 /(Mω/2−1B) + Z/B + N/B
This paper ˜ O
March 8 2016 13 / 28
(Fast) Sparse matrix multiplication Problem description
Method word-RAM complexity Notes General dense O (U ω) Lingas ˜ O
Requires boolean matrices. Iwen-Spencer, Le Gall O
Requires O
nonzeros per column. Williams-Yu, Pagh ˜ O
˜ O
√ Z + Z + N
˜ O
This paper ˜ O
I/O complexity Notes General dense ˜ O
˜ O
√ Z/(B √ M)
This paper ˜ O
ω−1 2 /(Mω/2−1B) + Z/B + N/B
This paper ˜ O
Jacob, St¨
March 8 2016 13 / 28
(Fast) Sparse matrix multiplication Problem description
Method word-RAM complexity Notes General dense O (U ω) Lingas ˜ O
Requires boolean matrices. Iwen-Spencer, Le Gall O
Requires O
nonzeros per column. Williams-Yu, Pagh ˜ O
˜ O
√ Z + Z + N
˜ O
This paper ˜ O
I/O complexity Notes General dense ˜ O
˜ O
√ Z/(B √ M)
This paper ˜ O
ω−1 2 /(Mω/2−1B) + Z/B + N/B
This paper ˜ O
Jacob, St¨
March 8 2016 13 / 28
Fast and output-sensitive matrix mult High level
Jacob, St¨
March 8 2016 14 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 15 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 15 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 15 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 15 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 15 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 16 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 17 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 18 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 19 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 20 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 21 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 22 / 28
Fast and output-sensitive matrix mult The row-balanced case
Jacob, St¨
March 8 2016 22 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 23 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 24 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 24 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 24 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 24 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 24 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 25 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 26 / 28
Fast and output-sensitive matrix mult The general case
Jacob, St¨
March 8 2016 27 / 28
1IT University of Copenhagen, 2 University of Copenhagen
Jacob, St¨
March 8 2016 28 / 28