falcon a graph manipulation language for heterogeneous
play

Falcon: A Graph Manipulation Language for Heterogeneous Systems - PowerPoint PPT Presentation

Falcon: A Graph Manipulation Language for Heterogeneous Systems Unnikrishnan C, IISc, Bangalore Rupesh Nasre, IIT, Madras Y N Srikant, IISc, Bangalore January 20 , 2016 Introduction Experimental Results Introduction Conclusion


  1. Falcon: A Graph Manipulation Language for Heterogeneous Systems Unnikrishnan C, IISc, Bangalore Rupesh Nasre, IIT, Madras Y N Srikant, IISc, Bangalore January 20 , 2016

  2. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides 1 Falcon is a Domain Specific Language (DSL) for writing Graph algorithms. Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 1 / 12

  3. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides 1 Falcon is a Domain Specific Language (DSL) for writing Graph algorithms. 2 Falcon i) extends C programming language. ii) provides additional data types for Graph processing. iii) constructs for writing explicitly parallel graph algorithms. Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 1 / 12

  4. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides 1 Falcon is a Domain Specific Language (DSL) for writing Graph algorithms. 2 Falcon i) extends C programming language. ii) provides additional data types for Graph processing. iii) constructs for writing explicitly parallel graph algorithms. 3 Support for heterogeneous backends(CPU and GPU). Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 1 / 12

  5. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides 1 Falcon is a Domain Specific Language (DSL) for writing Graph algorithms. 2 Falcon i) extends C programming language. ii) provides additional data types for Graph processing. iii) constructs for writing explicitly parallel graph algorithms. 3 Support for heterogeneous backends(CPU and GPU). 4 Supports parallel execution of different algorithms on multiple devices. Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 1 / 12

  6. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides 1 Falcon is a Domain Specific Language (DSL) for writing Graph algorithms. 2 Falcon i) extends C programming language. ii) provides additional data types for Graph processing. iii) constructs for writing explicitly parallel graph algorithms. 3 Support for heterogeneous backends(CPU and GPU). 4 Supports parallel execution of different algorithms on multiple devices. 5 Supports partitioning of Graph objects and execution of a single algorithm using multiple devices. Used when graph object does not fit in a single device. 6 Supports mutation of Graph object. 7 Allows viewing Graph in different way(say collection of triangles). Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 1 / 12

  7. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides Language constructs for parallelization and Synchronization in Falcon single (t1) { stmt block1 } else { stmt The thread that gets a lock on item t1 executes stmt block1 and other block2 } threads execute stmt block2. single (coll) { stmt block1 } else { stmt The thread that gets a lock on all elements in the collection executes block2 } stmt block1 and others execute stmt block2. Table 1. single statement(Synchronization) in Falcon Data Type Iterator Description points iterate over all points in graph Graph Graph edges iterate over all edges in graph Graph pptyname iterate over all elements in new ppty. nbrs iterate over all neighboring points Point Point outnbrs iterate over dst point of outgoing edges (Directed Graph ) nbrs iterate over neighbor edges Edge item iterate over all items in Set Set item iterate over all items in Collection Collection Table 2. Iterators for foreach (parallelization) statement in Falcon parallel sections- for Multiple parallel regions on different devices. Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 2 / 12

  8. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides After Last session of HiPEAC, you want to reach home through shortest path??!! A SIMPLE EXAMPLE int < GPU > changed = 0; // Variable on GPU 1 DEL relaxgraph (Point < GPU > p, Graph < GPU > graph) { 2 foreach (t In p.outnbrs) 3 4 0 0 4 0 0 4 0 0 MIN(t.dist, p.dist + graph.getweight(p, t), changed); 4 PRG 100 } 5 main (int argc, char *argv[]) { 6 75 Graph hgraph; // graph on CPU CDG 0 0 0 7 0 0 0 6 6 6 hgraph.addPointProperty(dist, int); 8 hgraph.getType() < GPU > graph; // graph on GPU 9 hgraph.read(argv[1]) // read graph on CPU 10 FRA graph = hgraph; // copy graph to GPU 11 foreach (t In graph.points)t.dist=MAX INT;//INFinity 12 graph.points[0].dist = 0; // source has dist 0 13 PRG CDG FRA DEL while( 1 ) { 14 15 changed = 0; foreach (t In graph.points) relaxgraph(t,graph); 16 if (changed == 0) break; //reached fix point 17 0 INF INF INF } 18 for (int i = 0; i < graph.npoints; ++i) 19 printf(”i=%d dist=%d \ n”, i, graph.points[i].dist); 20 } 0 100 75 INF 21 0 100 75 500 Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 3 / 12

  9. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides After Last session of HiPEAC, you want to reach home through shortest path??!! A SIMPLE EXAMPLE int < GPU > changed = 0; // Variable on GPU 1 DEL relaxgraph (Point < GPU > p, Graph < GPU > graph) { 2 foreach (t In p.outnbrs) 3 4 0 0 4 0 0 4 0 0 MIN(t.dist, p.dist + graph.getweight(p, t), changed); 4 PRG 100 } 5 main (int argc, char *argv[]) { 6 75 Graph hgraph; // graph on CPU CDG 0 0 0 7 0 0 0 6 6 6 hgraph.addPointProperty(dist, int); 8 hgraph.getType() < GPU > graph; // graph on GPU 9 hgraph.read(argv[1]) // read graph on CPU 10 FRA graph = hgraph; // copy graph to GPU 11 foreach (t In graph.points)t.dist=MAX INT;//INFinity 12 graph.points[0].dist = 0; // source has dist 0 13 PRG CDG FRA DEL while( 1 ) { 14 15 changed = 0; foreach (t In graph.points) relaxgraph(t,graph); 16 if (changed == 0) break; //reached fix point 17 0 INF INF INF } 18 for (int i = 0; i < graph.npoints; ++i) 19 printf(”i=%d dist=%d \ n”, i, graph.points[i].dist); 20 } 0 100 75 INF 21 0 100 75 500 Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 3 / 12

  10. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides After Last session of HiPEAC, you want to reach home through shortest path??!! A SIMPLE EXAMPLE int < GPU > changed = 0; // Variable on GPU 1 DEL relaxgraph (Point < GPU > p, Graph < GPU > graph) { 2 foreach (t In p.outnbrs) 3 4 0 0 4 0 0 4 0 0 MIN(t.dist, p.dist + graph.getweight(p, t), changed); 4 PRG 100 } 5 main (int argc, char *argv[]) { 6 75 Graph hgraph; // graph on CPU CDG 0 0 0 7 0 0 0 6 6 6 hgraph.addPointProperty(dist, int); 8 hgraph.getType() < GPU > graph; // graph on GPU 9 hgraph.read(argv[1]) // read graph on CPU 10 FRA graph = hgraph; // copy graph to GPU 11 foreach (t In graph.points)t.dist=MAX INT;//INFinity 12 graph.points[0].dist = 0; // source has dist 0 13 PRG CDG FRA DEL while( 1 ) { 14 15 changed = 0; foreach (t In graph.points) relaxgraph(t,graph); 16 if (changed == 0) break; //reached fix point 17 0 INF INF INF } 18 for (int i = 0; i < graph.npoints; ++i) 19 printf(”i=%d dist=%d \ n”, i, graph.points[i].dist); 20 } 0 100 75 INF 21 0 100 75 500 Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 3 / 12

  11. Introduction Experimental Results Introduction Conclusion Language-Data Types and Constructs backup slides After Last session of HiPEAC, you want to reach home through shortest path??!! A SIMPLE EXAMPLE int < GPU > changed = 0; // Variable on GPU 1 DEL relaxgraph (Point < GPU > p, Graph < GPU > graph) { 2 foreach (t In p.outnbrs) 3 4 0 0 4 0 0 4 0 0 MIN(t.dist, p.dist + graph.getweight(p, t), changed); 4 PRG 100 } 5 main (int argc, char *argv[]) { 6 75 Graph hgraph; // graph on CPU CDG 0 0 0 7 0 0 0 6 6 6 hgraph.addPointProperty(dist, int); 8 hgraph.getType() < GPU > graph; // graph on GPU 9 hgraph.read(argv[1]) // read graph on CPU 10 FRA graph = hgraph; // copy graph to GPU 11 foreach (t In graph.points)t.dist=MAX INT;//INFinity 12 graph.points[0].dist = 0; // source has dist 0 13 PRG CDG FRA DEL while( 1 ) { 14 15 changed = 0; foreach (t In graph.points) relaxgraph(t,graph); 16 if (changed == 0) break; //reached fix point 17 0 INF INF INF } 18 for (int i = 0; i < graph.npoints; ++i) 19 printf(”i=%d dist=%d \ n”, i, graph.points[i].dist); 20 } 0 100 75 INF 21 0 100 75 500 Unnikrishnan C, Rupesh Nasre, Y N Srikant Falcon: A Graph Manipulation Language for Heterogeneous Systems 3 / 12

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend