DataKernelBench: Can LLMs Optimize Database Queries on GPUs?
Authors/Creators
Description
DataKernelBench
Can LLMs optimize database queries on GPUs?
DataKernelBench evaluates LLMs on a novel task: optimizing analytical database queries as GPU kernels. It first represents each SQL query as a validated PyTorch program called a TorchPlan. It then evaluates LLMs by asking them to optimize either the tensor-intensive core (core) or the full query implementation (full) using CUDA or Triton, with execution-guided repair. The benchmark covers all 22 TPC-H queries.
On TPC-H SF10 using one NVIDIA H100, the strongest configuration—GPT-5.5 with CUDA at the full-query level—achieves 2.11× overall speedup over compiled TorchPlan with a 100% pass rate. The paper evaluates ten proprietary and open-weight models and analyzes how model strength, backend, optimization scope, and prompt context affect correctness and performance.
Links: Project page · Paper · Code · Data: Hugging Face · Zenodo
Files
datakernelbench.zip
Files
(400.0 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:fc000264e2fa5cf130bfca302e9c9552
|
400.0 kB | Preview Download |
Additional details
Identifiers
- arXiv
- arXiv:2608.25061
Funding
Software
- Repository URL
- https://kerneldf.github.io/datakernelbench
- Programming language
- Python , Cuda , SQL