Accelerating Big Data Analytics with Domain Specific Languages Kunle Olukotun Cadence Design Systems Professor Stanford University

Similar documents
HIGH PERFORMANCE BIG DATA ANALYTICS

Big Data Analytics in the Age of Accelerators Kunle Olukotun Cadence Design Systems Professor Stanford University

Green-Marl: A DSL for Easy and Efficient Graph Analysis

A Multi-layered Domain-specific Language for Stencil Computations

Introducing PgOpenCL A New PostgreSQL Procedural Language Unlocking the Power of the GPU! By Tim Child

Seeking Opportunities for Hardware Acceleration in Big Data Analytics

Parallel Computing for Data Science

MapGraph. A High Level API for Fast Development of High Performance Graphic Analytics on GPUs.

The Flink Big Data Analytics Platform. Marton Balassi, Gyula Fora" {mbalassi,

Spark in Action. Fast Big Data Analytics using Scala. Matei Zaharia. project.org. University of California, Berkeley UC BERKELEY

Big Data With Hadoop

Applications to Computational Financial and GPU Computing. May 16th. Dr. Daniel Egloff

Apache Flink Next-gen data analysis. Kostas

Challenges for Data Driven Systems

Parallel Programming Survey

GPU System Architecture. Alan Gray EPCC The University of Edinburgh

Scaling Out With Apache Spark. DTL Meeting Slides based on

Spark and the Big Data Library

Spark. Fast, Interactive, Language- Integrated Cluster Computing

Big Graph Processing: Some Background

How To Write A Program In Scala

Apache Flink. Fast and Reliable Large-Scale Data Processing

Big Data Analytics. Lucas Rego Drumond

Accelerating Hadoop MapReduce Using an In-Memory Data Grid

Map-Reduce for Machine Learning on Multicore

OpenACC Programming and Best Practices Guide

A survey on platforms for big data analytics

Parallel Programming Map-Reduce. Needless to Say, We Need Machine Learning for Big Data

Asking Hard Graph Questions. Paul Burkhardt. February 3, 2014

Accelerating Simulation & Analysis with Hybrid GPU Parallelization and Cloud Computing

Benchmark Hadoop and Mars: MapReduce on cluster versus on GPU

Big Data looks Tiny from the Stratosphere

A Performance Evaluation of Open Source Graph Databases. Robert McColl David Ediger Jason Poovey Dan Campbell David A. Bader

Distributed R for Big Data

Streaming items through a cluster with Spark Streaming

Apache Mahout's new DSL for Distributed Machine Learning. Sebastian Schelter GOTO Berlin 11/06/2014

From GWS to MapReduce: Google s Cloud Technology in the Early Days

OpenMP Programming on ScaleMP

22S:295 Seminar in Applied Statistics High Performance Computing in Statistics

PARALLEL JAVASCRIPT. Norm Rubin (NVIDIA) Jin Wang (Georgia School of Technology)

Parallel Computing. Benson Muite. benson.

Spark: Cluster Computing with Working Sets

The Stratosphere Big Data Analytics Platform

Le langage OCaml et la programmation des GPU

Analytics on Big Data

Implementation of Spark Cluster Technique with SCALA

Big Data and Scripting Systems beyond Hadoop

RevoScaleR Speed and Scalability

Performance Evaluations of Graph Database using CUDA and OpenMP Compatible Libraries

Lecture 10 - Functional programming: Hadoop and MapReduce

HPC Wales Skills Academy Course Catalogue 2015

Fundamentals of Java Programming

: provid.ir

Bringing Big Data Modelling into the Hands of Domain Experts

INTEL PARALLEL STUDIO EVALUATION GUIDE. Intel Cilk Plus: A Simple Path to Parallelism

Can the Elephants Handle the NoSQL Onslaught?

Overview on Modern Accelerators and Programming Paradigms Ivan Giro7o

Distributed R for Big Data

Report: Declarative Machine Learning on MapReduce (SystemML)

Convex Optimization for Big Data: Lecture 2: Frameworks for Big Data Analytics

World s fastest database and big data analytics platform

Overview of HPC Resources at Vanderbilt

Graph Processing and Social Networks

Mining Large Datasets: Case of Mining Graph Data in the Cloud

MongoDB Aggregation and Data Processing Release 3.0.4

The Service Revolution software engineering without programming languages

Parallel Computing: Strategies and Implications. Dori Exterman CTO IncrediBuild.

MapReduce. MapReduce and SQL Injections. CS 3200 Final Lecture. Introduction. MapReduce. Programming Model. Example

An Overview of Knowledge Discovery Database and Data mining Techniques

GPU Hardware and Programming Models. Jeremy Appleyard, September 2015

Analysis of MapReduce Algorithms

Embedded Systems: map to FPGA, GPU, CPU?

ACCELERATING SELECT WHERE AND SELECT JOIN QUERIES ON A GPU

GPUs for Scientific Computing

Apache MRQL (incubating): Advanced Query Processing for Complex, Large-Scale Data Analysis

Efficient Parallel Graph Exploration on Multi-Core CPU and GPU

Outline. High Performance Computing (HPC) Big Data meets HPC. Case Studies: Some facts about Big Data Technologies HPC and Big Data converging

Architectures for Big Data Analytics A database perspective

Oracle BI EE Implementation on Netezza. Prepared by SureShot Strategies, Inc.

Introduction to Big Data with Apache Spark UC BERKELEY

Course Development of Programming for General-Purpose Multicore Processors

Xeon+FPGA Platform for the Data Center

GPU for Scientific Computing. -Ali Saleh

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

Retour vers le futur des bibliothèques de squelettes algorithmiques et DSL

Platforms and Algorithms for Big Data Analytics Chandan K. Reddy Department of Computer Science Wayne State University

MongoDB Aggregation and Data Processing

Stateful Distributed Dataflow Graphs: Imperative Big Data Programming for the Masses

Other Map-Reduce (ish) Frameworks. William Cohen

Data Centric Interactive Visualization of Very Large Data

Recent and Future Activities in HPC and Scientific Data Management Siegfried Benkner

Parallel Data Preparation with the DS2 Programming Language

Xilinx SDAccel. A Unified Development Environment for Tomorrow s Data Center. By Loring Wirbel Senior Analyst. November

Transcription:

Accelerating Big Data Analytics with Domain Specific Languages Kunle Olukotun Cadence Design Systems Professor Stanford University 36e Forum ORAP CNRS, Paris November, 5 2015

Research Goals Unleash full power of modern computing platforms on big data Huge and growing amounts of data Deliver the capability to mine, search and analyze this data in real time to enable discovery and decision making Make parallel application development practical for the masses (Joe/Jane the programmer) Parallelism is not for the average programmer Too difficult to find parallelism, to debug, and get good performance Parallel applications without parallel programming

Data Center Computing Platforms > 1 TFLOPS Graphics Processing Unit (GPU) 10s of cores Multicore Multi-socket 1000s of nodes Cluster Programmable Logic

Expert Parallel Programming Required > 1 TFLOPS 10s of cores CUDA OpenCL Graphics Processing Unit (GPU) 1000s of nodes Threads OpenMP Multicore Muti-socket MPI Map Reduce Cluster MPI: Message Passing Interface Verilog VHDL Programmable Logic

Expert Programmers Low Productivity

Too Few Expert Programmers Image Filter OpenMP Assignment Optimizations: ~3 orders of magnitude Precomputing twiddle Not computing what isn t part of the filter Transposing the matrix Using SSE

Hypothesis It is possible to write one program and run it efficiently on all these machines

Domain Specific Languages Domain Specific Languages (DSLs) Programming language with restricted expressiveness for a particular domain High-level, usually declarative, and deterministic

Data Analytics Application Data Prep Big-Data Analytics Programming Challenge Pthreads OpenMP Multicore Data Transform High-Performance Domain Specific Languages CUDA OpenCL GPU Network Analysis MPI Map Reduce Cluster Predictive Analytics Verilog VHDL FPGA

High Performance DSLs for Data Analytics Applications Data Transformation Graph Analysis Prediction Recommendation Domain Specific Languages Data Extraction OptiWrangler Query Proc. OptiQL Graph Alg. OptiGraph Machine Learning OptiML DSL Compiler DSL Compiler DSL Compiler DSL Compiler Heterogeneous Hardware Multicore GPU FPGA Cluster

Delite: DSL Infrastructure Applications Data Transformation Graph Analysis Prediction Recommendation HP DSLs Data Extraction OptiWrangle Query Proc. OptiQL Graph Alg. OptiGraph Machine Learning OptiML Delite DSL Framework DSL Compiler DSL Compiler DSL Compiler DSL Compiler Heterogeneous Hardware Multicore GPU FPGA Cluster

Delite Overview K. J. Brown et. al., A heterogeneous parallel framework for domain-specific languages, PACT, 2011. Op<{Wrangler, QL, ML, Graph} DSL 1 DSL n domain ops domain ops domain data domain data Domain specific analyses & transforma<ons Key elements DSLs embedded in Scala IR created using type-directed staging parallel data Parallel patterns Op<mized Code Generators Generic analyses & transforma<ons Domain specific optimization General parallelism and locality optimizations Scala C++ CUDA OpenCL MPI HDL Optimized mapping to HW targets

Delite DSL Examples

OptiML: A DSL for Machine Learning Designed for Iterative Statistical Inference e.g. SVMs, logistic regression, neural networks, etc. Dense/sparse vectors and matrices, message-passing graphs, training/test sets Mostly Functional Data manipulation with classic functional operators (map, filter) and ML-specific ones (sum, vector constructor, untilconverged) Math with MATLAB-like syntax (a*b, chol(..), exp(..)) Mutation is explicit (.mutable) and last resort Implicitly parallel control structures sum{ }, (0::end) { }, gradient { }, untilconverged { } Allow anonymous functions with restricted semantics to be passed as arguments of the control structures

K-means Clustering in OptiML untilconverged(kmeans, tol){kmeans => val clusters = samples.grouprowsby { sample => kmeans.maprows(mean => dist(sample, mean)).minindex } val newkmeans = clusters.map(e => e.sum / e.length) calculate newkmeans } assign each sample to the closest mean distances to current means No explicit map-reduce, no key-value pairs No distributed data structures (e.g. RDDs) No annotations for hardware design Efficient multicore and GPU execution Efficient cluster implementation Efficient FPGA hardware move each cluster centroid to the mean of the points assigned to it

OptiQL Data querying of in-memory collections inspired by LINQ to Objects SQL-like declarative language Key operations are query operators on the Table data structure User-defined schema Use high-level semantic knowledge to implement query optimizer Fusion eliminates temporary allocations AoS SoA Eliminate fields not used in query 5-100x performance advantage over LINQ On 8 cores

OptiQL: TPCH-Q1 // lineitems: Table[LineItem] // Similar to Q1 of the TPC- H benchmark val q = lineitems Where(_.l_shipdate <= Date( 19981201 )). GroupBy(l => l.l_linestatus). Select(g => new Record { val linestatus = g.key val sumqty = g.sum(_.l_quantity) val sumdiscountedprice = g.sum(r => r.l_extendedprice*(1.0- r.l_discount)) val avgprice = g.average(_.l_extendedprice) val countorder = g.count }) OrderBy(_.returnFlag) ThenBy(_.lineStatus)

OptiGraph A DSL for large-scale graph analysis based on Green-Marl Green-Marl: A DSL for Easy and Efficient Graph Analysis (Hong et. al.), ASPLOS 12 Mostly functional DSL Only explicit mutation, no explicit iteration Data structures Graph (directed, undirected), node, edge, Set of nodes, edges, neighbors, Graph traversals Summation, Breadth-first traversal,

Example: Betweenness Centrality Betweenness Centrality A measure that tells how central a node is in the graph Used in social network analysis Definition How many shortest paths are there between any two nodes going through this node. Low BC High BC Kevin Bacon Ayush K. Kehdekar [Image source; Wikipedia]

OptiGraph Betweenness Centrality 1. val bc = sum(g.nodes){ s => 2. val sigma = g.inbforder(s) { (v,prev_sigma) => if(v==s) 1 3. else sum(v.parents){ w => prev_sigma(w)} 4. } 5. val delta = g.inrevbforder(s){ (v,prev_delta) => 6. sum(v.children){ w => 7. sigma(v)/sigma(w)*(1+prev_delta(w)) 8. } 9. } 10. delta 11. }

Delite Implementation

DSL Goals build domain-specific languages that are as productive as libraries and as performant as parallel code?... for DSL users... for DSL authors high-level, composable, interactive, debuggable easy to construct and extend

Delite: A Framework for High Performance DSLs Overall Approach: Generative Programming for Abstraction without regret Embed compilers in Scala libraries Scala does syntax and type checking Use metaprogramming with LMS (type-directed staging) to build an intermediate representation (IR) of the user program Optimize IR and map to multiple targets Goal: Make embedded DSL compilers easier to develop than stand alone DSLs As easy as developing a library

Building an Intermediate Representation (IR) Delite DSLs use LMS to build an IR from Scala application code val v1: Rep[Vector[Double]] = Vector.rand(1000) val v2: Rep[Vector[Double]] = Vector.rand(1000) val a: Rep[Vector[Double]] = v1+v2 println(a) Vector.rand Vector.rand v1+v2 Method calls on Rep[T] instances construct nodes instead of evaluating Rep[T] is abstract type constructor println

Domain Specific Optimizations I Use domain-specific knowledge to make optimizations in a modular fashion Override IR node creation Use Scala pattern matching Construct Optimized IR nodes if possible Construct default otherwise A B A C B C * * A + + AB + AC * A(B+C) A, B, C are large matrices Rewrite rules are simple, yet powerful optimization mechanism

Domain Specific Optimizations II Access to the full domain specific IR allows for application of much more complex optimizations Traversals for analysis Schedules the IR and visit each node in order DSL defines operation to execute at each node Transformers for optimizations Combines traversals with rewrite rules Transformed version is written as normal source code, then re-staged to an IR

Parallel Patterns: Delite Ops Parallel execution patterns Functional: Map, FlatMap, ZipWith, Reduce, Filter, GroupBy, Sort, Join, union, intersection Non-functional: Foreach, ForeachReduce, Sequential Set of patterns can grow over time Provide high-level information about data access patterns and parallelism DSL author maps each domain operation to the appropriate pattern Delite handles parallel optimization, code generation, and execution for all DSLs Delite provides implementations of these patterns for multiple hardware targets High-level information creates straightforward and efficient implementations Multi-core, GPU, clusters and FPGA

Parallel Patterns Most data analytic computations can be expressed as parallel patterns on collections (e.g. sets, arrays, table) Pattern Anonymous Function map in map { e => e + 1 } Example zipwith ina zipwith(inb) { (ea,eb) => ea + eb } foreach ina foreach { e => if (e>0) inb(e) = true } filter in filter { e => e > 0} reduce in reduce { (e1,e2) => e1 + e2 } groupby in groupby { e => e.id } Other patterns: sort, intersection, union

Parallel Pattern Language (PPL) A data-parallel language that supports parallel patterns Example application: k-means val clusters = samples groupby { sample => val dists = kmeans map { mean => mean.zip(sample){ (a,b) => sq(a b) } reduce { (a,b) => a + b } } Range(0, dists.length) reduce { (i,j) => if (dists(i) < dists(j)) i else j } } val newkmeans = clusters map { e => val sum = e reduce { (v1,v2) => v1.zip(v2){ (a,b) => a + b } } val count = e map { v => 1 } reduce { (a,b) => a + b } sum map { a => a / count } }

Programming Model Comparison Programing Model Rich Data Parallelism Use Nested Parallelism Multiple Collections Random Reads Hardware Targets MapReduce Cluster DryadLINQ Cluster Spark PowerGraph Dandelion Delite (PPL) Cluster, Multicore Cluster, Multicore Cluster, Multicore, GPU Cluster, Multicore, NUMA, GPU FPGA

Raising the Level of Abstraction for Accelerators A higher level programming model Architecture independent High-level enough to encode important semantic information Efficient mapping to low-level programming models Parallel Patterns CUDA OpenCL OpenMP / TBB nvidia TESLA AMD APU Intel Xeon Phi nvidia TESLA

Mapping Nested Parallel Patterns to GPUs Parallel patterns are often nested in applications > 70% apps in Rodinia benchmark contain kernels with nested parallelism Efficiently mapping parallel patterns on GPUs becomes significantly more challenging when patterns are nested Memory coalescing, divergence, dynamic allocations, Large space of possible mappings HyoukJoong Lee et. al, Locality-Aware Mapping of Nested Parallel Patterns on GPUs, MICRO'14

Nested Delite Ops on Rodinia Apps 8 Normalized ExecuOon Ome 7 6 5 4 3 2 1 manual GPU 1D GPU 2D 0 Hotspot GE BFS Pathfinder 2D mapping exposes more parallelism 2D mapping enables coalesced memory accesses

Distributed Heterogeneous Execution Separate Memory Regions NUMA Clusters FPGAs Partitioning Analysis Multidimensional arrays Decide which data structures / parallel ops to partition across abstract memory regions Nested Pattern Transformations Optimize patterns for distributed and heterogeneous architectures Delite&parallel&data& par22oned&data& par22oned&data& DSL&Applica2on& local&data& Delite& parallel& pa+erns& Partitioning & Stencil Analysis local&data& scheduled& pa+erns& Nested Pattern Transformations scheduled,& transformed& pa+erns& Heterogeneous&Code&Genera2on&&&Distributed&Run2me&

Locality-Improving Transformations Sometimes the optimal way of writing nesting parallel patterns is architecture dependent, e.g., Logistic Regression: untilconverged(theta, tol){ theta => (0 until x.numcols) map { j => val gradient = sum(0, x.numrows){ i => x(i,j)*(y(i) - hyp(theta,x(i))) } theta(j) + alpha*gradient } } untilconverged(theta, tol){ theta => val gradientvec = sum(0, x.numrows){ i => (0 until x.numcols) map { j => x(i,j)*(y(i) hyp(theta,x(i))) } } (0 until x.numcols) map { j => theta(j) + alpha*gradientvec(j) } } GPU optimized vector of sums sum of vectors Cluster & multicore optimized

Parallel Patterns as Multiloops Collect(cond)(f) Produces values from a function f Lower data-parallel patterns to multiloops (non-affine) which contain one or more structured bodies (generators) Creates a flat collection by conditionally (cond) appending the values (filter) Covers Map, Zip, Filter, FlatMap, Reduce(cond)(f)(red) Produces values from a function f Reduces those values using associative op r Covers Reduce, Map-Reduce, Filter-Reduce, BucketCollect(cond)(key)(f) Produces (key, value) pairs from functions (key, f) Creates a nested collection by appending values to the buffer for the key Covers GroupBy, BucketReduce(cond)(key)(f)(red) Produces (key, value) pairs from functions (key, f) Reduces values with like key using associative op r Result is flat (one element per key) Covers Distinct, Google s MapReduce, cond: Index => Boolean key: Index => K f: Index => V red: (V,V) => V

Rewriting Nested Patterns: GroupBy-Reduce Rule Example: basic SQL query: lineitems.groupby(item => item.type).map(group => group.map(item => item.quantity).sum) Issues: intermediate output of groupby can be very large compared to final output limited parallelism over resulting groups Rewrite rule fuses and flattens the nested reduction: A = BucketCollect s (c)(k)(f 1 ) Collect A (_)(i => Reduce A(i) (_)(f 2 )(r)) BucketReduce s (c)(k)(f 2 (f 1 ))(r) Optimized version: single traversal without materializing intermediate collections bucketreduce(size = lineitems.size) (cond = i => true) (key = i => lineitems(i).type) (value = i => lineitems(i).quantity) (reduce = (a,b) => a + b) Same rule can be applied to groupby formulation of k-means, k-nearest neighbors, Polyhedral analysis can t do this optimization

Keys To Delite Performance Compilers exploit high-level semantics (domain specific opt.) MatrixTimesVector instead of Staging programmatically removes } abstraction Method calls inlined, modularity structures (traits, classes) compiled away Generated code is low-level and first order for i <- 0 until m.numrows { for j <- 0 until m.numcols {... } Parallel patterns as first class citizens in the IR Easy for DSL authors to expose parallelism Data structures are represented in the IR Struct wrappers, fields, are statically eliminated when possible Analysis and transformation to optimize across parallel patterns Delite provides a large set for all DSLs Each DSL can add its own

Example Generated Code Scala def apply(x388:int,x423:int,x389:int, x419:array[double],x431:int, x433:array[double]) { val x418 = x413 * x389 val x912_zero = { 0 } val x912_zero_2 = { 1.7976931348623157E308 } var x912 = x912_zero var x912_2 = x912_zero_2 var x425 = 0 while (x425 < x423) { val x430 = x425 * 1 val x432 = x430 * x431 val x916_zero = { 0.0 }... CUDA device int dev_collect_x478_x478(int x423,int x389,delitearray<double> x419,int x431,delitearray<double> x433,int x413) { int x418 = x413 * x389; int x919 = 0; double x919_2 = 1.7976931348623157E308; int x425 = 0; while (x425 < x423) { int x430 = x425 * 1; int x432 = x430 * x431; double x923 = 0.0; int x450 = 0;... Abstraction without regret: Eliminate higher-order abstractions in generated code

Delite DSL Performance

OptiML and OptiQL on Cluster 20 node Amazon cluster Q1: TPC-H 5GB dataset; GDA: 17GB dataset

OptiML on Heterogeneous Cluster 4 node local cluster: 3.4 GB dataset

OptiGraph: Page Rank val pr = untilconverged(0,threshold){ oldpr => g.mapnodes{ n => } ((1.0- damp)/g.numnodes) + damp*sum(n.innbrs){ w => } oldpr(w)/w.outdegree }{(curpr,oldpr) => sum(abs(curpr- oldpr))}

Multi-socket NUMA Performance TPCHQ1 Gene GDA LogReg Speedup 35 30 25 20 15 10 5 30x 50 45 40 35 30 25 20 15 10 5 45x 45 40 35 30 25 20 15 10 5 10x 25 20 15 10 5 10x 0 1 12 24 48 0 1 12 24 48 0 1 12 24 48 0 1 12 24 48 k- means Triangle PageRank 1 48 threads 4 sockets 50 45 40 35 50 45 40 35 35 30 25 30 25 20 15 10 5 11x 30 25 20 15 10 5 5x 20 15 10 5 10x 0 1 12 24 48 0 1 12 24 48 0 1 12 24 48

MSM Builder Using OptiML with Vijay Pande Markov State Models (MSMs) MSMs are a powerful means of modeling the structure and dynamics of molecular systems, like proteins high prod, high perf low prod, high perf x86 ASM high prod, low perf!

Re-Usable DSL Components DSL Delite Ops Generic Optimizations OptiML OptiQL OptiGraph Map, ZipWith, Reduce, Foreach, GroupBy, Sort Map, Reduce, Filter, Sort, GroupBy, intersection Map, Reduce, Filter, GroupBy CSE, DCE, code motion, fusion CSE, DCE, DFE, SoA, code motion, fusion CSE, DCE, code motion OptiMesh ForeachReduce CSE, DCE, code motion OptiWrangler Map, ZipWith, Reduce, Filter, Sort, GroupBy CSE, DCE, code motion, fusion Domain Specific Optimizations linear algebra query optimization scatter, gather (push, pull) stencil collection, coloring transform

Real Applications Span Multiple Domains Data cleansing and querying Visualization Analytics Image sources: ThinkStock http://technaverbascripta.wordpress.com/2012/10/19/text-network-analysis-2-meaning-circulation-in-lolita/ http://bl.ocks.org/mbostock/3943967

DSL Composition DSLs that require restricted semantics to enable domain-specific transformations We use a three step process: Independently stage each DSL block using scopes Lower each IR to the common IR (Delite IR) and combine together Optimize and code generate the final composed IR Scopes A Scala construct for type-safe isolated lexical scoping

DSL Composability Data analytic application with a Twitter dataset Uses OptiQL, OptiGraph, and OptiML

DSL Development Should Be Even Simpler The Problem Embedded DSLs are high-level and high performance for end users Easier to develop than external DSLs, easier to use than lowlevel code...but they are still not as easy to develop or use as libraries Significant Boilerplate with Embedding: Emulate DSL syntax Isolate the DSL program from the DSL compiler Extend parallel patterns Implement new data structures Debugging is Painful Compilation is slow Interactive programming is hard

Forge: A Meta-DSL Delite is a highly flexible compiler for high performance in heterogeneous environments but it is too low-level for the average DSL developer Raising the level of abstraction Idea: let s apply DSL principles to DSL development Let DSL authors specify what, not how Forge: a meta dsl for dsl development A declarative language for specifying DSL behavior Can generate multiple concrete implementations of a DSL

Forge Compilation Pipeline

High Performance Data Analytics with Delite Applications Data Transformation Graph Analysis Prediction Recommendation Domain Specific Languages Data Extraction OptiWrangler Query Proc. OptiQL Graph Alg. OptiGraph Machine Learning OptiML Delite DSL Framework DSL Compiler DSL Compiler DSL Compiler DSL Compiler Heterogeneous Hardware Multicore GPU FPGA Cluster

FPGAs in the Datacenter? FPGAs based accelerators Recent commercial interest from Baidu, Microsoft, and Intel Key advantage: Performance, Performance/Watt Key disadvantage: lousy programming model Verilog and VHDL poor match for software developers High quality designs High level synthesis (HLS) tools with C interface Medium/low quality designs Need architectural knowledge to build good accelerators Not enough information in compiler IR to perform access pattern and data layout optimizations Cannot synthesize complex data paths with nested parallelism

Optimized Approach to HW Generation Key optimizations: Parallel pattern tiling to maximize on-chip data reuse Metapipelines to exploit nested parallelism Generate MaxJ code Use Maxeler s MaxCompiler to generate FPGA bitstream Parallel Pattern IR Pattern Transformations Fusion Pattern Tiling Code Motion Tiled Parallel Pattern IR Hardware Generation Memory Allocation Template Selection Metapipeline Analysis MaxJ HGL Bitstream Generation FPGA Configuration

Summary In the age of heterogeneous architectures Power limited computing parallelism and accelerators Staged embedded DSLs can be productive DSL users program at a high-level Embedded DSLs with a common backend can efficiently compose Staging and re-use makes language construction much simpler Meta DSLs reduce the burden on DSL developers even further And high performance Additional semantic information and restrictions enables compiler to do domain-specific optimization Staging programmatically removes high-level, library abstraction Parallel patterns enable aggressive parallelism and locality optimizations through transformations Efficient mapping to heterogeneous architectures using parallel patterns

Colaborators & Funding Faculty PhD students Pat Hanrahan Martin Odersky (EPFL) Chris Ré Tiark Rompf (Purdue/EPFL) Chris Aberger Kevin Brown Hassan Chafi Zach DeVito Chris De Sa Nithin George (EPFL) David Koeplinger Funding PPL : Oracle Labs, Nvidia, Intel, AMD, Huawei, SAP NSF DARPA HyoukJoong Lee Victoria Popic Raghu Prabhakar Aleksander Prokopec (EPFL) Vojin Jovanovic (EPFL) Vera Salvisberg (EPFL) Arvind Sujeeth

Big Data Analytics In the Age of Accelerators Power Performance Productivity Portability Accelerators (GPU, FPGA, ) Delite High Performance DSLs (OptiML, OptiQL, )

Thank You! Questions? Delite repository: http://stanford-ppl.github.com/delite Stanford Pervasive Parallelism Lab: http://ppl.stanford.edu