arXiv cs.CL· Gokul Karthik Kumar, Yotam Perlitz, Corey Lammie, Andrea Giovannini, Katja Hose·· 2 天前AI 评分32
DataKernelBench:LLM 能否在 GPU 上优化数据库查询?
DataKernelBench: Can LLMs Optimize Database Queries on GPUs?
AI 导读
DataKernelBench 将 SQL 转换为经校验的 PyTorch TorchPlan 程序,评测 LLM 用 CUDA 或 Triton 优化数据库查询内核。
正文 · 原文
Abstract:GPUs increasingly accelerate database systems, but query-specific peak performance still often relies on hand-written kernels. Existing LLM kernel benchmarks focus on machine learning operators, leaving irregular, heterogeneous, data-movement-heavy database-style operators untested. We introduce DataKernelBench, which translates SQL into validated PyTorch TorchPlan programs and evaluates LLMs that optimize either the core tensor-bounded snippet or the full query in CUDA or Triton through execution-guided repair. Across ten proprietary and open-weight models on TPC-H SF10 with an H100 GPU, the strongest full-query CUDA configuration achieves $2.11\times$ speedup over the TorchPlan baseline at full pass rate. We find that higher-performing implementations commonly use kernel fusion and execution-strategy changes, stronger models benefit most from full-query specialization, and workload context matters more than hardware context. To handle data larger than GPU memory, we extend TorchPlan with Dask-cuDF for on-demand partition loading on TPC-H SF100 with four H100 GPUs, achieving $2.54\times$ speedup.
Project page: this https URL
| Comments: | Accepted at EMNLP 2026 |
| Subjects: | Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Databases (cs.DB); Machine Learning (cs.LG); Programming Languages (cs.PL) |
| Cite as: | arXiv:2608.25061 [cs.CL] |
| (or arXiv:2608.25061v3 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2608.25061 arXiv-issued DOI via DataCite |
Submission history
From: Gokul Karthik Kumar [view email]
[v1]
Tue, 25 Aug 2026 18:57:39 UTC (2,340 KB)
[v2]
Thu, 27 Aug 2026 17:07:30 UTC (2,340 KB)
[v3]
Wed, 14 Oct 2026 21:33:09 UTC (2,340 KB)
来源:arXiv cs.CL · arxiv.org