HackerPapers

arXiv:2311.02206cs.DB

Optimizing Datalog for the GPU

Yihao Sun, Ahmedur Rahman Shovon, Thomas Gilray, Kristopher Micinski, Sidharth Kumar

Abstract

Modern Datalog engines (e.g., LogicBlox, Soufflé, ddlog) enable their users to write declarative queries which compute recursive deductions over extensional facts, leaving high-performance operationalization (query planning, semi-naïve evaluation, and parallelization) to the engine. Such engines form the backbone of modern high-throughput applications in static analysis, network monitoring, and social-media mining. In this paper, we present a methodology for implementing a modern in-memory Datalog engine on data center GPUs, allowing us to achieve significant (up to 45x) gains compared to Soufflé (a modern CPU-based engine) on context-sensitive points-to analysis of httpd. We present GPUlog, a Datalog engine backend that implements iterated relational algebra kernels over a novel range-indexed data structure we call the hash-indexed sorted array (HISA). HISA combines the algorithmic benefits of incremental range-indexed relations with the raw computation throughput of operations over dense data structures. Our experiments show that GPUlog is significantly faster than CPU-based Datalog engines while achieving a favorable memory footprint compared to contemporary GPU-based joins.

arXiv comments
Journal reference
DOI
Subjects
cs.DBDatabases cs.PLProgramming Languages

On Hacker News

Linked by 4 identifiable commenters in 4 comments across 4 threads, from Dec 2023 to Apr 2026. Found in 3 HN submissions from Nov 2023 to Jan 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments4 threads

  1. Optimizing Datalog for the GPU 1 comment
    • arxiv: https://arxiv.org/html/2311.02206v5 I've been a fan of this series! The work by this team, as well as kuzudb (acquired by apple) and relational.ai, have similar vibes. One area that has been especially interesting to me is identifying cases where new kinds of…

      lmeyerovView on HNParent context

    • Until I get around to it, there's this blog post I wrote: https://wiwa.substack.com/p/can-we-10x-rust-hashmap-throughp... Not an "expert" on GPU hash tables, but I'm mildly aware of other hashmap things like a novel(?) hash-indexed sorted array (HISA)…

      winwangView on HNParent context

  2. Game Programming in Prolog 1 comment
    • So much of the "magic" with Prolog and similar relational languages necessarily happens with dynamic data at runtime (especially in a game engine where entities move around, etc so the state of relations changes significantly) I'm not sure how much static you could get with it.…

      cmrdporcupineView on HNParent context

    • "GDlog: A GPU-Accelerated Deductive Engine" (2023) https://arxiv.org/abs/2311.02206 : > Abstract: Modern deductive database engines (e.g., LogicBlox and Soufflé) enable their users to write declarative queries which compute recursive deductions over extensional data, leaving…

      westurnerView on HNParent context

Submitted to Hacker News

  • GDlog: A GPU-accelerated deductive engine
  • Ask HN: Who's writing recursive queries / Datalog?

    tl;dr: show me the most interesting recursive queries you've seen / written! "No practical applications of recursive query theory... have been found to date" - Michael Stonebraker, 1998 Readings in Database Systems, 3rd Edition Stonebraker and Hellerstein, eds. Datalog fans [1-3] love to use this quote from 20 years ago, then cite a bunch of applications of Datalog to prove Stonebraker wrong. Indeed, researchers came to love Datalog, and can’t seem to get enough of it in DB/PL conferences.…

  • GDlog: A GPU-Accelerated Deductive Engine

Connected through shared HN threads, not inferred similarity or a recommendation.