GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a...

25
GRAPH ANALYTICS WITH GPUS Larry Brown Ph.D. June 2015 GEOINT 2015

Transcript of GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a...

Page 1: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

GRAPH ANALYTICS WITH GPUS

Larry Brown Ph.D.

June 2015

GEOINT 2015

Page 2: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

2

1 What is Graph Analytics? 2 Graph Analytics for GEOINT 3 GPUs and Graph Analytics 4 GPU Roadmap for Graph Analytics

AGENDA

…and a video!

Page 3: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

3

What is Graph Analytics?

Page 4: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

4

GRAPH ANALYTICS - INTRODUCTION

Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus is on pairwise relationship between two objects at a time.

Edges and Nodes Edges can be Directed, or Undirected.

Examples of data well-suited to Graphs Road networks Communications network Social networks Web pages & links (directed graph) Financial transaction data

Page 5: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

5

KEY GRAPH ALGORITHMS Search Cutting / Partitioning Shortest Path Connected components Pagerank

Often tell us something non-obvious about the graph.

Who is the most important person on Twitter? What websites are most likely to be visited?

Page 6: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

6

GRAPH ALGORITHMS

Breadth First search

Search Cutting / Partitioning Shortest Path Connected components Pagerank

0

1 1

2

1

1

2

2 2

2

1

3

2

3

2

2 3

2

Depth First search

0

1 2

3

1 1

3

3

Page 7: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

7

GRAPH ALGORITHMS Search Cutting / Partitioning Shortest Path Connected components Pagerank

Find the cut with the fewest number of crossing edges. • Find weak spots in data/communications networks • Community detection in social networks

Page 8: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

8

GRAPH ALGORITHMS Search Cutting / Partitioning Shortest Path Connected components Pagerank

Find the shortest path between two nodes of interest. • Transportation logistics • Social network analysis

Page 9: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

9

GRAPH ALGORITHMS Search Cutting / Partitioning Shortest Path Connected components Pagerank

A strongly connected graph is one where you can get to every node in the graph from any starting node. The Strongly Connected Components (SCC) are the maximal sub-regions of a graph for which each sub-region is strongly connected.

• Social network analysis

Page 10: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

10

GRAPH ALGORITHMS Search Cutting / Partitioning Shortest Path Connected components Pagerank

Used by internet search for ranking web pages. Invented by Google. A measure of popularity. Named after Larry Page (not web page).

Page 11: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

11

Graph Analytics for GEOINT

Page 12: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

12

GEOSPATIAL GRAPH EXAMPLE 1. Acquire imagery data (GIS, SAR , LiDAR…)

2. Create semantic labels for areas.

• Use Machine Learning / Deep Learning

• Building / Trees / Grass / Road / Water

3. Create Graph

• Node = region identified in step 1, with attributes

Area, Aspect ratio… Temporal information (last absent, first seen)

• Edge = distance between regions

4. Perform Analytics

• Search for patterns of interest using graph node template.

• “high schools in Anne Arundel County, MD”

First Application of Geospatial Semantic Graphs to SAR Image Data Sandia National Lab 2013

Page 13: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

13

GPUs and Graph Analytics

Page 14: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

14

COMPUTING WITH GRAPHS What is the nature of graph analytics and traversals?

Just “visiting” a node. Not much actual mathematical computation.

Constantly moving around one node at a time, backtracking etc.

Non-locality is the rule.

Often have to traverse entire graph (Pagerank, Connected components etc) probably multiple times. Cache thrashing.

Graph analytics stresses communication over computation. Memory bandwidth more important than Operations/sec.

Page 15: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

15

GRAPH SIZE What is the typical size of graphs we are interested in?

Facebook has ~ 1 trillion edges in their graph.

Many web and social graphs are in the 10 GB to 100 GB range, in binary format.

There are certainly “interesting” graphs that are smaller, and larger, than that.

Biological networks

Page 16: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

16

WHERE’S MY MEMORY? Intel Sandy Bridge CPU system NVIDIA K40 GPU

4 kB registers 4 MB registers 5 TB/s 40 TB/s

128 GB main memory

20 GB/s

12 GB memory

288 GB/s

512 L1 cache

2 MB L2 cache

8 MB L3 cache

1 MB Shared Mem

1.5 MB L2 cache

1 MB Constant Mem

Page 17: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

17

GPU ACCELERATION FOR GRAPH ANALYTICS

0

1 1 2

1

1

2

2 2

2

1

3

2

3

2

2 3

2

0.967

0.051 0

0.2

0.4

0.6

0.8

1

1.2

Tim

e pe

r it

erat

ion

(s)

PageRank : 19x Speedup

Intel Xeon E5-2690 v2

Lower is

Better

1 GPU vs 60 Nodes 280x vs optimized Spark 1440x vs Spark 3420x vs Hadoop

Page 18: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

18

GRAPH TRAVERSAL PERFORMANCE GTEPS = Giga TEPS

Billions of Traversed Edges Per Second

Page 19: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

19

GPU Roadmap for Graph Analytics

Page 20: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

20

GPU ROADMAP

SGEM

M /

W N

orm

aliz

ed

2012 2014 2008 2010 2016

Tesla CUDA

Fermi FP64

Kepler Dynamic Parallelism

Maxwell DX12

Pascal Unified Memory 3D Memory NVLink

20

16

12

8

6

2

0

4

10

14

18

Page 21: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

21

PASCAL GPU FEATURES NVLINK AND STACKED MEMORY

NVLINK GPU high speed interconnect 80-200 GB/s

3D Stacked Memory 4x Higher Bandwidth (~1 TB/s) 3x Larger Capacity 4x More Energy Efficient per bit

Page 22: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

22

NVLINK HIGH-SPEED GPU INTERCONNECT

NVLink

NVLink

POWER CPU

X86, ARM64, POWER CPU

X86, ARM64, POWER CPU

PASCAL GPU KEPLER GPU

2016 2014

PCIe PCIe

Page 23: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

23

EXAMPLE: 8-GPU SERVER WITH NVLINK

NVLINK 20GB/s PCIe x16 Gen 3

CPU

Pascal GPU

Pascal GPU

Pascal GPU

Pascal GPU

PLX

CPU

Pascal GPU

Pascal GPU

Pascal GPU

Pascal GPU

PLX

Page 24: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

24

GPU ROADMAP FOR GRAPH ANALYTICS What are the implications….

10X reduction in communication costs

2X or greater speedup for BFS with Pascal

Much larger problem sizes

Biological networks

Page 25: GRAPH ANALYTICS WITH GPU - Nvidia · GRAPH ANALYTICS - INTRODUCTION . Any analytics performed on a Graph Graph is “just another data structure”, like a tree or an array. Focus

Thank you!