cuda in sql10/7/2010 4 sql callable procedure ipc sql code sql-callable procedure cuda functionality...

13
DATA-INTENSIVE COMPUTING IN SQL WITH GPUS Tamás Budavári, Richard Wilton / Johns Hopkins U. 10/7/2010

Upload: others

Post on 28-Jan-2021

17 views

Category:

Documents


0 download

TRANSCRIPT

  • DATA-INTENSIVE COMPUTING IN SQL WITH GPUS

    Tamás Budavári, Richard Wilton / Johns Hopkins U.10/7/2010

  • Tamás Budavári

    10/7/2010

    Basic Concept2

    Implement computational functionality in a separate process from the database server process

    Access through inter-process communication (IPC)

    IPCSQL code

    SQL-callable procedureCUDA functionality

    Database server Out-of-process server

  • Tamás Budavári

    10/7/2010

    3

    Why Do It This Way?

    IPCSQL code

    SQL-callable procedureCUDA functionality

    Database server Out-of-process server

    Avoid DBMS permissions, threading restrictions, etc.

    Encapsulate native-code functionality (CUDA API calls)

    Exploit lower-level APIs to facilitate data movement between DBMS and CUDA implementation

  • Tamás Budavári

    10/7/2010

    4

    SQL Callable Procedure

    IPCSQL code

    SQL-callable procedureCUDA functionality

    Database server Out-of-process server

    SQLCLR procedure in C# Fills a shared-memory buffer with a SQL result set

    Signals the out-of-process server and waits for a response

    Returns data from the IPC buffer to the database server

  • Tamás Budavári5

    10/7/2010

    Out-Of-Process Server

    IPCSQL code

    SQL-callable procedureCUDA functionality

    Database server Out-of-process server

    Dynamically loads the CUDA implementation

    Invokes a method with a reference to the IPC buffer

    Signals the SQL-callable procedure that data is ready

  • Tamás Budavári

    Case Study 1: Spatial Statistics

    10/7/2010

    Correlation functions

    Histogram of distances

    State of the art

    Dual-tree traversal

    High resolution bins?

    Just like brute force

    8 bins

    6

  • Tamás Budavári

    Case Study 1: Spatial Statistics

    10/7/2010

    Correlation functions

    Histogram of distances

    State of the art

    Dual-tree traversal

    High resolution bins?

    Just like brute force

    8 bins

    7

    800 × 800 bins

  • Tamás Budavári

    User-Defined Functions

    Pair counts computed on GPU

    Returns 2D histogram as a table (i, j, cts)

    Calculate the correlation fn in SQL

    10/7/2010

    8

  • Tamás Budavári

    User-Defined Functions

    Pair counts computed on GPU

    Returns 2D histogram as a table (i, j, cts)

    Calculate the correlation fn in SQL

    10/7/2010

    9

  • Tamás Budavári

    Async SQL Interface

    10/7/2010

    10

  • Tamás Budavári

    800 × 800 bins11

    59

    0 T

    rill

    ion

    Gal

    axy

    Pai

    rs800 × 800 bins

  • Tamás Budavári

    Summary

    10/7/2010

    New Moore’s law in GPUs – let’s use them!

    Novel extension to SQL Server

    Provides direct access to multiple GPUs

    Inter- and intra-task GPU parallelism

    Also enables distributed parallel queries, MPI…

    Scientific applications

    Corr fn, xmatch, photo-z and gene sequencing…

    12

  • Tamás Budavári

    10/7/2010

    13