一句话:提出 GPUlog:基于哈希索引有序数组 HISA 的 GPU Datalog 引擎,实现关系代数内核并显著加速递归推理。
现代 Datalog 引擎能将递归演绎查询高效执行,但在 CPU 上仍有性能瓶颈。本文面向数据中心 GPU 设计内存 Datalog 引擎后端 GPUlog,其核心是新型 range-indexed 数据结构 HISA(hash-indexed sorted array),兼具增量范围索引关系的算法优势与稠密数据结构的高吞吐。在此之上实现迭代式关系代数内核,支持查询计划、半朴素求值与并行化。实验在 httpd 的上下文敏感指针分析等任务上评估,相比 CPU 引擎 Soufflé 最高加速 45×,并优于当代 GPU join,且内存占用更优。
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 45×) 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 favorable memory footprint compared to contemporary GPU-based joins.