DATABASE HARDWARE ACCELERATION POSTGRESQL FDW • SQL SERVER CLR GRAPHCORE IPU • POPLAR SDK TRANSPARENT CPU FALLBACK

QueryAccel

Push SQL's heaviest operations onto IPU hardware, transparently.

QueryAccel lets PostgreSQL and Microsoft SQL Server offload aggregates, vector operations, and inference onto Graphcore IPU hardware, without changing how you write queries. A PostgreSQL foreign data wrapper intercepts eligible operations at the planner level. SQL Server reaches the same acceleration through a CLR stored procedure. Both fall back to native CPU execution automatically when it's faster or when no IPU is present, so QueryAccel never makes a query slower than the engine's own plan would.

QueryAccel System Specs Production Ready
Target Databases PostgreSQL (15–17) • MS SQL Server
Hardware Acceleration Graphcore Colossus MK2 GC200 IPU
Data Serialization Apache Arrow • gRPC Protobuf
Offloaded Aggregates COUNT, SUM, AVG, MIN, MAX
Vector Distances Cosine, L2 Euclidean, Dot Product
Max Payload Size 100 MB Streaming Batch Chunks
Fallback Guarantee 100% Graceful CPU Execution
ARCHITECTURE

How It Fits Together

From query interception in PostgreSQL and SQL Server to gRPC streaming and Poplar IPU tile kernel execution.

⚡
C# / .NET 10

QueryAccelService

gRPC Microservice Backend

Executes aggregates and vector operations through pluggable kernels: Poplar-backed IPU hardware kernels when present, pure SIMD C# CPU kernels otherwise. Selected via environment flag with zero code modifications.

🐘
C / C++ Native Extension

PostgresIpuQueryAccel

Native PostgreSQL FDW

Foreign Data Wrapper intercepting queries at the PostgreSQL planner stage. Pushes down aggregates and predicates, streams data via Apache Arrow, and uses cost-based estimation to decide when IPU execution yields speedups.

🌉
C++ / Poplar SDK

SqlIpuBridgeMicroservice

Inference gRPC Daemon

Exposes raw IPU tensor compute and ONNX graph execution over gRPC. Handles device init, graph compilation, batch tensor execution, and graceful CPU simulation fallbacks.

🗄️
C# CLR / T-SQL Bridge

SqlIpuBridgeClient.SqlServerClr

SQL Server CLR Assembly

Managed assembly enabling Microsoft SQL Server to invoke IPU acceleration directly from T-SQL stored procedures using a single EXEC statement with retry logic and up to 100MB payload streaming.

COMPUTE CATALOG

What Runs on the IPU

Hardware kernels mapped to thousands of in-processor SRAM tiles for massive memory bandwidth and zero cache contention.

Relational Aggregations

COUNT / COUNT(DISTINCT)

Parallel bit-vector counting across 1,472 IPU SRAM tiles with zero memory contention.

SUM / AVG

SIMD FP32/FP16 reduction trees executing with deterministic accumulator precision.

MIN / MAX

Branchless reduction kernels over contiguous memory-mapped columnar chunks.

Dense Vector Metrics

Cosine Similarity

1536-dim / 768-dim embedding search evaluated across millions of vectors in sub-millisecond windows.

Euclidean (L2) Distance

Hardware-accelerated squared difference and sqrt accumulation on IPU IPU vector engines.

Dot Product / Inner Product

High-throughput matrix-vector operations with dedicated SRAM tile caching.

In-Database Model Inference

ONNX Graph Execution

Compiled PopART ONNX models loaded directly into tile memory for zero-copy row scoring.

Embedding Generation

Transformer encoder forward passes invoked directly within SQL transaction boundaries.

Simulation Fallback

Guaranteed CPU execution path when IPU cards are offline or busy.

ENTERPRISE RESILIENCE

Built for Production Databases, Not a Research Harness

Engineered with strict safety invariants, granular timing telemetry, and bulletproof fallback guarantees.

⏱️

Split Telemetry Profiling

Kernel execution time and IPC/Arrow serialization time are reported separately, letting DBAs pinpoint whether IPU compute or marshaling dominates latency.

🛑

Mid-Request Cancellation

Client query cancellations immediately propagate through gRPC tokens to stop running Poplar engine sessions, preventing tile starvation.

🛡️

Resilient CLR Transport

SQL Server client includes automatic retry logic with exponential backoff and supports message payloads up to 100MB for large batch queries.

🔄

Guaranteed Graceful Degradation

No IPU? No Poplar driver? Network failure? The query executes seamlessly on the native PostgreSQL / SQL Server CPU engine without throwing.

PostgreSQL Transparent Pushdown C/C++ FDW
-- Transparently intercepted by PostgresIpuQueryAccel FDW
SELECT 
  customer_segment,
  COUNT(*),
  SUM(transaction_amount),
  AVG(risk_score)
FROM ipu_orders_fdw
WHERE order_date >= '2026-01-01'
GROUP BY customer_segment;

-- Cost-based planner dispatches to IPU tile reduction kernels
-- Fallback to native CPU engine if serialization cost exceeds speedup
SQL Server CLR Bridge T-SQL Stored Procedure
-- Invoke IPU model scoring directly from T-SQL stored proc
DECLARE @ReturnCode int;
DECLARE @Scores nvarchar(max);

EXEC @ReturnCode = dbo.sp_IpuRunInference
  @ModelName = N'FraudDetection_v3',
  @BatchDataJson = @InputFeatures,
  @TimeoutMs = 250,
  @OutputScores = @Scores OUTPUT;

-- Automatic retry with exponential backoff and 100MB payload support
DATABASE & HARDWARE CONVERGENCE

Why This Exists

“Specialized accelerator hardware is usually locked behind bespoke pipelines that only machine-learning code can reach. QueryAccel puts that hardware behind the interface database engines already speak, SQL, so accelerating an aggregate or a similarity search doesn't require rewriting the application around a new API.”

HF Labs Systems Foundation • Zero-Friction Database Acceleration

Accelerate Your SQL Workloads with Graphcore IPUs

Drop QueryAccel into existing PostgreSQL and SQL Server instances without rewriting application queries. Explore the repository or read the manual.