xqlsystems demo infers FlashAttention kernel from 25 SQL lines
A Hacker News post and GitHub file describe a database-style route to tensor optimization, but provide no independent performance benchmark.

xqlsystems published a Hacker News “Show HN” post on Oct. 30 saying its demo can infer a FlashAttention-style kernel from about 25 lines of SQL expressing vanilla attention.
The claim matters because the linked GitHub file is a 322-line Python demo, including 282 lines of code, that presents query planning as an alternative route to writing accelerator-oriented tensor programs directly.
The post said the demo depends on three portable SQL extensions under development: xarray-sql, ddx and einfold. It described xarray-sql as representing petabyte-scale array datasets in cloud tables, ddx as adding automatic differentiation to SQL, and einfold as planning tensor contractions in SQL.
“My hope is that the relational model and algebra provide fresh perspectives on how we might do accelerator programming,” the Hacker News post said. It added that its thesis is to separate the logical layers of a tensor program from the physical layers.
The GitHub file describes attention, the transformer operation commonly written as softmax(Q·Kᵀ/√d)·V, using tables for Q, K and V. In the demo, the feature dimension is 64, so scores are scaled by 1/√64, or 1/8.
The file says a naive SQL plan stores all N×N attention scores. It says FlashAttention, citing Dao et al. 2022, computes the same result without storing those scores by streaming blocks and keeping a running softmax.
The demo says einfold finds a fused plan from two SQL spellings of attention, one using a window expression and one using a group-by form. It also includes a Nadaraya–Watson estimator as a non-attention control and says the same fusion rule applies there.
The script checks forward results against JAX, Google’s differentiable array-programming library, and uses ddx to compute gradients with respect to Q, K and V. Automatic differentiation means computing derivatives of a program, a core operation in training neural networks.
The material is a developer demo and repository file, not an independent benchmark. The supplied Hacker News snapshot showed 5 points and 0 comments, and the GitHub page said the file did not exist on the default branch.
Source: Hacker News “Show HN” post and GitHub repository file, Oct. 30, 2026
More stories
- Europe faces attribution gap after 16 cyber, physical incidents
- PIF backs Grand Theft Auto as Saudi players embrace game
- Signal limits screenshots to curb AI access to messages
- Cognition runs Devin Mac workspaces on EC2 in 6 AWS regions
- Salesforce engineers cut 600-failure triage to 90 minutes
- Türkiye Desk: GTA 6 puts console access and network demand in focus
- Flow Games raises $49m as platform control tightens
- Japan & Asia: Switch 2 leads Famitsu as Korea fines stores
- Accel funding hits $3.5 billion for global startup bets
- OpenAI executive Brad Lightcap exits after COO transition
Latest news
- Trump prepares tariffs on China and other major exporters
- New-car buyers pay record average $50,087 in October
- Banks face ECB reserve debate over liquidity and profits
- Investors see Anthropic debut gains fade below $83 a share
- Iraq orders federal control over Kurdish-area oilfields
- Germans oppose Ukraine aid as poll shows support slipping
- Kim Jong-un receives 10 envoys after constitutional shift
- Ukraine claims Libya strike sinks Russian naval corvette

