Skip to main content

Module bbq

Module bbq 

Source
Expand description

BBQ rerank kernels: L2 from the exact centred query to a 1-bit-encoded candidate. centered is the centred query as packed little-endian f32 bytes (dim * 4), packed the candidate’s sign bits (dim.div_ceil(8), MSB-first per byte), residual_norm the candidate’s stored corrective factor.

The scalar kernel here is the reference; every SIMD tier in the sibling modules must agree within PARITY_REL (see the tests below).

Tier coverage is host-dependent, and CI covers only one of them. Both jobs in .github/workflows/test.yml run on ubuntu-24.04-arm, so CI exercises the NEON tier and never an x86 one. The x86 tiers are checked on an x86_64 host; the 512-bit tier additionally needs hardware or Intel SDE (sde64 -spr). Each x86 test returns early, with a printed note, on a host that lacks the feature its tier needs.

Functions§

l2_bbq
Whole-range scalar kernel: the tail helper applied from 0.