Skip to content

DataKernelBench: Can LLMs Optimize Database Queries on GPUs?

Aug 2026 · 1 citation · 43 references
Computer Science

TL;DR

DataKernelBench is introduced, 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 and finds 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.

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: https://kerneldf.github.io/datakernelbench

View source

Similar papers

Jul 2026

Are LLM-Generated GPU Kernels Production-Ready? A Trace-Driven Benchmark and Optimization Agent

Atrex-Bench is presented, a benchmark whose 30 operators and 440 shapes are sampled directly from full-cluster production inference traces of compute-limited, memory-rich GPUs, and a profile-driven kernel-optimization agent that combines iterative measure-revise search, optimization dropout for escaping stalled search...

Ling-Yun Yang, Yuxiao Wang, Shenghao Liang et al. · 3 citations
Jul 2026

Terascale Query Processing in the Browser: Rethinking GPU Acceleration

WGLog is introduced, the first web-browser-native GPU engine for compute-bound recursive database queries and replaces hash-table-based joins with atomic-free sorted-array joins, eliminating the serialization bottleneck that hash tables suffer on skewed graphs.

Jiaxin Lu, Landon Dyken, Yi-Hao Sun et al. · 0 citations
Jul 2026

Automated Tensor Scheduling for Hybrid CPU-GPU LLM Inference on Consumer Devices

ATSInfer combines static tensor placement with load-aware dynamic transfer and introduces asynchronous CPU-GPU coordination to efficiently schedule hardware storage, data movement, and computation across heterogeneous backends and can substantially improve the user experience of local LLM deployment on personal consume...

Yangyijian Liu, Hong-Yi Ye, Ming-Yang Li et al. · 0 citations
Book Open access Jul 2026

torch_cufft: Extending PyTorch FFT Capacity with Multi-GPU and Descriptor-Resident cuFFTXt Execution

This extended abstract presents torch_cufft, a PyTorch-facing FFT system that routes FFT requests across single-GPU, single-node multi-GPU, and distributed multi-process backends, and focuses on a simple systems question: how much does the maximum feasible FFT size depend on where data lives during execution.

Yash Malhotra, S. Kuppannagari · 0 citations
Preprint Aug 2026

LazyTrain: Limited-resource Allocation toward Zero-waste Yield Optimization in Large Language Model Training

LazyTrain is proposed, an optimization layer over a layer-streaming executor that formulates checkpoint selection, activation placement, recomputation, and CPU-GPU-NVMe communication overlap as a mixed-integer scheduling problem, then executes the solved policy during training.

Xiao-Jun Wu, Ce-Hao Yang, Hong-Hao Liu et al. · 1 citation

Related blog posts

MIT News · Artificial Intelligence Dec 1, 2026

A new form of memory helps robots learn complex skills

The method uses large vision-language models to teach smaller models how to remember key details about a robot’s surroundings, making the machines more reactive and resourceful.

Microsoft Research Blog Nov 30, 2026

Forgotten, or just hidden? Stress testing how AI models unlearn

When AI “forgets,” is the information really gone? Standard tests can suggest an AI model has successfully forgotten specific information. A controlled Microsoft Research study found a different picture when researchers changed the questions and used strategic prompts. The findings point to a gap between looking like information is forgotten and making it resistant to recovery. The post Forgotten, or just hidden? Stress testing how AI models unlearn appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.