A High-Quality and Fast Maximal Independent Set

Published  . 0 views
↓ Download
A High-Quality and Fast Maximal Independent Set
1 / 1
A High-Quality and Fast Maximal Independent Set - slide 1 of 62 A High-Quality and Fast Maximal Independent Set - slide 2 of 62 A High-Quality and Fast Maximal Independent Set - slide 3 of 62 A High-Quality and Fast Maximal Independent Set - slide 4 of 62 A High-Quality and Fast Maximal Independent Set - slide 5 of 62 A High-Quality and Fast Maximal Independent Set - slide 6 of 62 A High-Quality and Fast Maximal Independent Set - slide 7 of 62 A High-Quality and Fast Maximal Independent Set - slide 8 of 62 A High-Quality and Fast Maximal Independent Set - slide 9 of 62 A High-Quality and Fast Maximal Independent Set - slide 10 of 62 A High-Quality and Fast Maximal Independent Set - slide 11 of 62 A High-Quality and Fast Maximal Independent Set - slide 12 of 62 A High-Quality and Fast Maximal Independent Set - slide 13 of 62 A High-Quality and Fast Maximal Independent Set - slide 14 of 62 A High-Quality and Fast Maximal Independent Set - slide 15 of 62 A High-Quality and Fast Maximal Independent Set - slide 16 of 62 A High-Quality and Fast Maximal Independent Set - slide 17 of 62 A High-Quality and Fast Maximal Independent Set - slide 18 of 62 A High-Quality and Fast Maximal Independent Set - slide 19 of 62 A High-Quality and Fast Maximal Independent Set - slide 20 of 62 A High-Quality and Fast Maximal Independent Set - slide 21 of 62 A High-Quality and Fast Maximal Independent Set - slide 22 of 62 A High-Quality and Fast Maximal Independent Set - slide 23 of 62 A High-Quality and Fast Maximal Independent Set - slide 24 of 62 A High-Quality and Fast Maximal Independent Set - slide 25 of 62 A High-Quality and Fast Maximal Independent Set - slide 26 of 62 A High-Quality and Fast Maximal Independent Set - slide 27 of 62 A High-Quality and Fast Maximal Independent Set - slide 28 of 62 A High-Quality and Fast Maximal Independent Set - slide 29 of 62 A High-Quality and Fast Maximal Independent Set - slide 30 of 62 A High-Quality and Fast Maximal Independent Set - slide 31 of 62 A High-Quality and Fast Maximal Independent Set - slide 32 of 62 A High-Quality and Fast Maximal Independent Set - slide 33 of 62 A High-Quality and Fast Maximal Independent Set - slide 34 of 62 A High-Quality and Fast Maximal Independent Set - slide 35 of 62 A High-Quality and Fast Maximal Independent Set - slide 36 of 62 A High-Quality and Fast Maximal Independent Set - slide 37 of 62 A High-Quality and Fast Maximal Independent Set - slide 38 of 62 A High-Quality and Fast Maximal Independent Set - slide 39 of 62 A High-Quality and Fast Maximal Independent Set - slide 40 of 62 A High-Quality and Fast Maximal Independent Set - slide 41 of 62 A High-Quality and Fast Maximal Independent Set - slide 42 of 62 A High-Quality and Fast Maximal Independent Set - slide 43 of 62 A High-Quality and Fast Maximal Independent Set - slide 44 of 62 A High-Quality and Fast Maximal Independent Set - slide 45 of 62 A High-Quality and Fast Maximal Independent Set - slide 46 of 62 A High-Quality and Fast Maximal Independent Set - slide 47 of 62 A High-Quality and Fast Maximal Independent Set - slide 48 of 62 A High-Quality and Fast Maximal Independent Set - slide 49 of 62 A High-Quality and Fast Maximal Independent Set - slide 50 of 62 A High-Quality and Fast Maximal Independent Set - slide 51 of 62 A High-Quality and Fast Maximal Independent Set - slide 52 of 62 A High-Quality and Fast Maximal Independent Set - slide 53 of 62 A High-Quality and Fast Maximal Independent Set - slide 54 of 62 A High-Quality and Fast Maximal Independent Set - slide 55 of 62 A High-Quality and Fast Maximal Independent Set - slide 56 of 62 A High-Quality and Fast Maximal Independent Set - slide 57 of 62 A High-Quality and Fast Maximal Independent Set - slide 58 of 62 A High-Quality and Fast Maximal Independent Set - slide 59 of 62 A High-Quality and Fast Maximal Independent Set - slide 60 of 62 A High-Quality and Fast Maximal Independent Set - slide 61 of 62 A High-Quality and Fast Maximal Independent Set - slide 62 of 62
Description: A High-Quality and Fast Maximal Independent Set Algorithm for GPUs Martin Burtscher and Sindhu Devale Department of Computer Science Overview Introduction Serial and parallel algorithms Our parallel algorithm Optimizations Results Summary A

Related Topics

Download Presentation

"A High-Quality and Fast Maximal Independent Set" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. A High-Quality and Fast Maximal Independent Set Algorithm for GPUs Martin Burtscher and Sindhu Devale
Department of Computer Science<br>
slide2. Overview Introduction
Serial and parallel algorithms
Our parallel algorithm
Optimizations
Results
Summary A High-Quality and Fast MIS Algorithm 2<br>
slide3. Maximal Independent Set Maximal independent set (MIS)
Subset of vertices of undirected graph
Vertices in subset are independent (not adjacent)
Subset is maximal (all other vertices are adjacent)
Not unique

Largest possible MIS
Maximum independent set
NP-hard to compute A High-Quality and Fast MIS Algorithm 3<br>
slide4. Importance of MIS Building block of many parallel graph algorithms
Graph coloring
Maximal matching
2-satisfiability
Maximal set packing
Odd set cover problem
etc. A High-Quality and Fast MIS Algorithm 4<br>
slide5. Importance of MIS (cont.) Parallelization of complex computations
Supports arbitrary and dynamically changing conflicts
Build graph (vertices = computations, edges = conflicts)
Compute MIS
Run computations in MIS in parallel (w/o locks or atomics)
Repeat if necessary
E.g., Delaunay mesh refinement

Approach is only useful if MIS can be computed quickly in parallel and benefits from large sets A High-Quality and Fast MIS Algorithm 5<br>
slide6. Highlights ECL-MIS algorithm for massively-parallel devices
Fastest MIS runtimes on modern GPUs
Randomized permutation selection function
Largest set sizes among many MIS algorithms
New optimizations
Enhance performance and reduce memory footprint A High-Quality and Fast MIS Algorithm 6<br>
slide7. Serial Algorithm A High-Quality and Fast MIS Algorithm 7<br>
slide8. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
Start with empty set

Set = {} A High-Quality and Fast MIS Algorithm 8 d g b c e f a i h<br>
slide9. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
a has no neighbor in set
Add vertex a

Set = {a} A High-Quality and Fast MIS Algorithm 9 d g b c e f a i h<br>
slide10. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
b has neighbor in set
Discard vertex b

Set = {a} A High-Quality and Fast MIS Algorithm 10 d g b c e f a i h<br>
slide11. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
c has neighbor in set
Discard vertex c

Set = {a} A High-Quality and Fast MIS Algorithm 11 d g b c e f a i h<br>
slide12. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
d has neighbor in set
Discard vertex d

Set = {a} A High-Quality and Fast MIS Algorithm 12 d g b c e f a i h<br>
slide13. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
e has no neighbor in set
Add vertex e

Set = {a, e} A High-Quality and Fast MIS Algorithm 13 d g b c e f a i h<br>
slide14. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
f has neighbor in set
Discard vertex f

Set = {a, e} A High-Quality and Fast MIS Algorithm 14 d g b c e f a i h<br>
slide15. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
g has neighbor in set
Discard vertex g

Set = {a, e} A High-Quality and Fast MIS Algorithm 15 d g b c e f a i h<br>
slide16. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
h has no neighbor in set
Add vertex h

Set = {a, e, h} A High-Quality and Fast MIS Algorithm 16 d g b c e f a i h<br>
slide17. Serial Algorithm Repeating steps
Visit unvisited vertex
Add vertex to set if no graph neighbors in set

Example
i has neighbor in set
Discard vertex i

MIS = {a, e, h} A High-Quality and Fast MIS Algorithm 17 d g b c e f a i h<br>
slide18. Luby’s Random-Priority Parallel MIS Algorithm A High-Quality and Fast MIS Algorithm 18<br>
slide19. Random-Priority Algorithm (Luby) Repeating steps
Assign random priorities
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {} A High-Quality and Fast MIS Algorithm 19 d g b c e f a i h<br>
slide20. Random-Priority Algorithm (Luby) Repeating steps
Assign random priorities
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {} A High-Quality and Fast MIS Algorithm 20 d4 g4 b7 c1 e6 f3 a5 i2 h3<br>
slide21. Random-Priority Algorithm (Luby) Repeating steps
Assign random priorities
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {b, e} A High-Quality and Fast MIS Algorithm 21 d4 g4 b7 c1 e6 f3 a5 i2 h3<br>
slide22. Random-Priority Algorithm (Luby) Repeating steps
Assign random priorities
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {b, e} A High-Quality and Fast MIS Algorithm 22 d g b c e f a i h<br>
slide23. Random-Priority Algorithm (Luby) Repeating steps
Assign random priorities
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {b, e} A High-Quality and Fast MIS Algorithm 23 d g b c9 e f a i6 h5<br>
slide24. Random-Priority Algorithm (Luby) Repeating steps
Assign random priorities
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {b, c, e, i} A High-Quality and Fast MIS Algorithm 24 d g b c9 e f a i6 h5<br>
slide25. Random-Priority Algorithm (Luby) Repeating steps
Assign random priorities
Add vertices with highest local priority to set
Remove their neighbors from graph

MIS = {b, c, e, i} A High-Quality and Fast MIS Algorithm 25 d g b c e f a i h<br>
slide26. Random-Permutation Parallel MIS Algorithm A High-Quality and Fast MIS Algorithm 26<br>
slide27. Random-Permutation Algorithm Initialization
Assign random priorities
Repeating steps
Add vertices with highest local priority to set
Remove neighbors and their edges from graph

Set = {} A High-Quality and Fast MIS Algorithm 27 d g b c e f a i h<br>
slide28. Random-Permutation Algorithm Initialization
Assign random priorities
Repeating steps
Add vertices with highest local priority to set
Remove neighbors and their edges from graph

Set = {} A High-Quality and Fast MIS Algorithm 28 d4 g4 b7 c1 e6 f3 a5 i2 h3<br>
slide29. Random-Permutation Algorithm Initialization
Assign random priorities
Repeating steps
Add vertices with highest local priority to set
Remove neighbors and their edges from graph

Set = {b, e} A High-Quality and Fast MIS Algorithm 29 d4 g4 b7 c1 e6 f3 a5 i2 h3<br>
slide30. Random-Permutation Algorithm Initialization
Assign random priorities
Repeating steps
Add vertices with highest local priority to set
Remove neighbors and their edges from graph

Set = {b, e} A High-Quality and Fast MIS Algorithm 30 d4 g4 b7 c1 e6 f3 a5 i2 h3<br>
slide31. Random-Permutation Algorithm Initialization
Assign random priorities
Repeating steps
Add vertices with highest local priority to set
Remove neighbors and their edges from graph

Set = {b, c, e, h} A High-Quality and Fast MIS Algorithm 31 d4 g4 b7 c1 e6 f3 a5 i2 h3<br>
slide32. Random-Permutation Algorithm Initialization
Assign random priorities
Repeating steps
Add vertices with highest local priority to set
Remove neighbors and their edges from graph

MIS = {b, c, e, h} A High-Quality and Fast MIS Algorithm 32 d4 g4 b7 c1 e6 f3 a5 i2 h3<br>
slide33. Luby’s Random-Selection Parallel MIS Algorithm A High-Quality and Fast MIS Algorithm 33<br>
slide34. Random-Selection Algorithm (Luby) Repeating steps
Mark vertices with probability 0.5/degree
Add marked vertices to set if no marked neighbors
Remove their neighbors from graph

Set = {} A High-Quality and Fast MIS Algorithm 34 d g b c e f a i h<br>
slide35. Random-Selection Algorithm (Luby) Repeating steps
Mark vertices with probability 0.5/degree
Add marked vertices to set if no marked neighbors
Remove their neighbors from graph

Set = {} A High-Quality and Fast MIS Algorithm 35 di go bi co eo fo ao ii hi<br>
slide36. Random-Selection Algorithm (Luby) Repeating steps
Mark vertices with probability 0.5/degree
Add marked vertices to set if no marked neighbors
Remove their neighbors from graph

Set = {b, d} A High-Quality and Fast MIS Algorithm 36 di go bi co eo fo ao ii hi<br>
slide37. Random-Selection Algorithm (Luby) Repeating steps
Mark vertices with probability 0.5/degree(v)
Add marked vertices to set if no marked neighbors
Remove their neighbors from graph

Set = {b, d} A High-Quality and Fast MIS Algorithm 37 d g b c e f a i h<br>
slide38. Random-Selection Algorithm (Luby) Repeating steps
Mark vertices with probability 0.5/degree
Add marked vertices to set if no marked neighbors
Remove their neighbors from graph

Set = {b, d} A High-Quality and Fast MIS Algorithm 38 d g b ci e fi a ii ho<br>
slide39. Random-Selection Algorithm (Luby) Repeating steps
Mark vertices with probability 0.5/degree
Add marked vertices to set if no marked neighbors
Remove their neighbors from graph

Set = {b, c, d, f, i} A High-Quality and Fast MIS Algorithm 39 d g b ci e fi a ii ho<br>
slide40. Random-Selection Algorithm (Luby) Repeating steps
Mark vertices with probability 0.5/degree
Add marked vertices to set if no marked neighbors
Remove their neighbors from graph

MIS = {b, c, d, f, i} A High-Quality and Fast MIS Algorithm 40 d g b c e f a i h<br>
slide41. ECL-MIS Our Permutation-Selection Parallel MIS Algorithm A High-Quality and Fast MIS Algorithm 41<br>
slide42. Our Permutation-Selection Algorithm Initialization
Assign priorities ~ 1/deg
Randomize within level
Repeating steps
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {} A High-Quality and Fast MIS Algorithm 42 d g b c e f a i h<br>
slide43. Our Permutation-Selection Algorithm Initialization
Assign priorities ~ 1/deg
Randomize within level
Repeating steps
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {} A High-Quality and Fast MIS Algorithm 43 d76 g35 b87 c82 e74 f73 a65 i81 h89<br>
slide44. Our Permutation-Selection Algorithm Initialization
Assign priorities ~ 1/deg
Randomize within level
Repeating steps
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {} A High-Quality and Fast MIS Algorithm 44 d76 g35 b87 c82 e74 f73 a65 i81 h89<br>
slide45. Our Permutation-Selection Algorithm Initialization
Assign priorities ~ 1/deg
Randomize within level
Repeating steps
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {b, c, d, h} A High-Quality and Fast MIS Algorithm 45 d76 g35 b87 c82 e74 f73 a65 i81 h89<br>
slide46. Our Permutation-Selection Algorithm Initialization
Assign priorities ~ 1/deg
Randomize within level
Repeating steps
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {b, c, d, h} A High-Quality and Fast MIS Algorithm 46 d76 g35 b87 c82 e74 f73 a65 i81 h89<br>
slide47. Our Permutation-Selection Algorithm Initialization
Assign priorities ~ 1/deg
Randomize within level
Repeating steps
Add vertices with highest local priority to set
Remove their neighbors from graph

Set = {b, c, d, f, h} A High-Quality and Fast MIS Algorithm 47 d76 g35 b87 c82 e74 f73 a65 i81 h89<br>
slide48. Our Permutation-Selection Algorithm Initialization
Assign priorities ~ 1/deg
Randomize within level
Repeating steps
Add vertices with highest local priority to set
Remove their neighbors from graph

MIS = {b, c, d, f, h} A High-Quality and Fast MIS Algorithm 48 d g b c e f a i h<br>
slide49. ECL-MIS Features Single initialization
Requires less work (faster)
Enables asynchronous implementation (faster)
Permutation-selection function
Boosts set size (higher-quality result)
Requires only a few bits (lower memory footprint)
Combined priority and status information
Reduces storage (lower memory footprint)
Minimizes memory accesses (faster) A High-Quality and Fast MIS Algorithm 49<br>
slide50. Permutation-Selection Function Requirements
Has to work for all graphs
Needs to be proportional to 1/degree
Do not know highest degree (but know average)

Our solution
priority(v) = avg_degree / (avg_degree + degree*(v))
Degree* includes random fraction (e.g., 3.xyz)
Scaled to small integer (e.g., a byte) A High-Quality and Fast MIS Algorithm 50<br>
slide51. Permutation-Selection Function A High-Quality and Fast MIS Algorithm 51 Wide range at low degrees Narrow range at high degrees 50% of range is below avg degree Makes ties unlikely Ties are likely but unimportant<br>
slide52. Combining Information Standard implementation (2 arrays)
1st array: vertex state (undecided, in set, out of set)
2nd array: vertex priority (random number)
Our implementation (1 array)
7 MSBs hold combined status and priority
Reserved highest value: in set (= higher than its neighbors)
Reserved lowest value: out of set (= removed from graph)
Remaining values = priority
LSB = decided/undecided (to boost performance) A High-Quality and Fast MIS Algorithm 52 in
prio
prio
.
.
.
prio
prio
out<br>
slide53. Results A High-Quality and Fast MIS Algorithm 53<br>
slide54. Methodology System
GPUs: Titan X and K40, nvcc 8.0
CPUs: 2 Xeon E5-2687W v3 (20 cores, 3.1GHz), gcc 5.3
GPU MIS codes
CUSP, ECL, IrGL, and Pannotia
CPU MIS codes
Ligra, Ligra+, and PBBS (Cilk and OpenMP, incremental and non-deterministic)
PBBS (serial) A High-Quality and Fast MIS Algorithm 54<br>
slide55. Input Graphs 16 graphs
Real-world + synth.
All made undirected

Sizes
66k – 24M vertices
387k – 524M edges
0 – 214k degrees A High-Quality and Fast MIS Algorithm 55<br>
slide56. Titan X Performance (Edges/Second) A High-Quality and Fast MIS Algorithm 56 ECL-MIS is >3.9x faster on each tested graph >12x faster than other codes on average >100x faster than other codes on kron<br>
slide57. K40 Performance (Edges/Second) A High-Quality and Fast MIS Algorithm 57 ECL-MIS is >3.8x faster on each tested graph >9x faster than other codes on average >70x faster than other codes on kron<br>
slide58. Set Size (Deterministic) A High-Quality and Fast MIS Algorithm 58 ECL-MIS yields largest set on all but one graph 10% larger on average<br>
slide59. Set Size with Different Approaches A High-Quality and Fast MIS Algorithm 59 Randomization does not affect ECL-MIS set size Random permutation yields 10% smaller sets Random selection yields 1.7% smaller sets<br>
slide60. Performance Optimizations A High-Quality and Fast MIS Algorithm 60 Using 16-bit values yields a 15% slowdown Using 32-bit values yields a 33% slowdown Not using randomization yields a 6% slowdown Synchronous execution yields an 18% slowdown Using 2 separate arrays yields an 18% slowdown Visiting all neighbors yields a 59% slowdown Combination of optimizations is key Combination of optimizations is key<br>
slide61. Comparison to CPU Codes (Averages) A High-Quality and Fast MIS Algorithm 61 ECL-MIS is fastest on all but one tested graph >2.9x faster than CPU codes on average ECL-MIS yields largest set on 15 of 16 graphs 9% to 11% larger on average<br>
slide62. Summary ECL-MIS maximal independent set algorithm
Fastest GPU implementation (due to optimizations)
Produces largest sets (due to permutation selection)
Atomic-free CUDA implementation
http://cs.txstate.edu/~burtscher/research/ECL-MIS/

Acknowledgments
NSF grant 1406304
Nvidia donations A High-Quality and Fast MIS Algorithm 62<br>