Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
742dba9
Fuse RaBitQ block reductions into one templated blockReduceSumN<N>
Stardust-SJF Jul 24, 2026
22172a1
Fix rescale-search shared-memory races by restructuring
Stardust-SJF Jul 25, 2026
f3a31aa
Add a standalone RaBitQ quantizer under preprocessing/quantize
Stardust-SJF Jul 26, 2026
1a5e2a3
Make the RaBitQ quantizer detail layer stream- and resource-aware
Stardust-SJF Jul 26, 2026
2c64068
Rename the RaBitQ factories init_* -> make_*
Stardust-SJF Jul 27, 2026
36028d1
Add the C API for the RaBitQ preprocessing quantizer
Stardust-SJF Jul 28, 2026
a2c5747
Merge branch 'main' into cuvs_ivf_rabitq_syn_fix_fused
tfeher Aug 3, 2026
2a1c334
Replace the RaBitQ glue kernels with raft primitives
Stardust-SJF Oct 29, 2026
93ea433
Generate the RaBitQ matmul rotation with the shared IVF-PQ helper
Stardust-SJF Oct 29, 2026
3af40d4
Add cuvsRabitqRotatorMakeFromState to restore a saved rotator
Stardust-SJF Oct 29, 2026
33020da
Batch RaBitQ transform() internally, sized to the L2 cache
Stardust-SJF Oct 29, 2026
69d8b96
Fix 32-bit factor index overflow in the RaBitQ full-factor kernel
Stardust-SJF Oct 29, 2026
e8cd13c
Accept host input in RaBitQ transform()
Stardust-SJF Oct 29, 2026
1618145
Rename pipeline to quantizer and the old quantizer to encoder in RaBitQ
Stardust-SJF Oct 30, 2026
140fab3
Merge branch 'pull-request/2362' into cuvs_ivf_rabitq_standalone_quan…
achirkin Nov 2, 2026
128268a
Merge branch 'main' into cuvs_ivf_rabitq_syn_fix_fused
achirkin Nov 2, 2026
e837738
Merge remote-tracking branch 'sjf/cuvs_ivf_rabitq_syn_fix_fused' into…
achirkin Nov 2, 2026
b5ccd94
Merge remote-tracking branch 'rapidsai/main' into pull-request/2362
achirkin Nov 2, 2026
42fcdfb
Merge branch 'pull-request/2362' into cuvs_ivf_rabitq_standalone_quan…
achirkin Nov 2, 2026
a6ad49e
Merge branch 'main' into cuvs_ivf_rabitq_standalone_quantizer
achirkin Nov 3, 2026
89d518e
Spec-based dataset api
achirkin Nov 3, 2026
8f1b9ce
Fix style
achirkin Nov 3, 2026
4a9e8f3
Fix style
achirkin Nov 3, 2026
f02247a
Merge branch 'cuvs_ivf_rabitq_standalone_quantizer' into fea-rabitq-spec
achirkin Nov 3, 2026
7db6e2f
Fix build errors
achirkin Nov 3, 2026
28ccd92
Merge branch 'cuvs_ivf_rabitq_standalone_quantizer' into fea-rabitq-spec
achirkin Nov 3, 2026
afb5f91
Merge pull request #1 from achirkin/fea-rabitq-spec
Stardust-SJF Nov 4, 2026
82b1325
Merge branch 'main' into cuvs_ivf_rabitq_standalone_quantizer
achirkin Nov 4, 2026
8e68cde
Merge remote-tracking branch 'rapidsai/main' into cuvs_ivf_rabitq_sta…
achirkin Nov 4, 2026
c6632a7
Fix the symbol visibility
achirkin Nov 4, 2026
d42a40a
Merge remote-tracking branch 'public/main' into cuvs_ivf_rabitq_stand…
Stardust-SJF Nov 5, 2026
a7f80d5
Throw instead of exiting on unsupported RaBitQ FHT dimensions
Stardust-SJF Nov 5, 2026
12ed643
Opt in to more shared memory for the RaBitQ scaling-factor kernel
Stardust-SJF Nov 5, 2026
2e5d05a
Request shared memory in the RaBitQ quantize kernels only when needed
Stardust-SJF Nov 5, 2026
b3db6d9
Forward the rescale sample counts to the RaBitQ full-factor path
Stardust-SJF Nov 5, 2026
2cc3b97
Document that RaBitQ delta is computed from signed code levels
Stardust-SJF Nov 5, 2026
6d27955
Document the 16-bit code requirement for RaBitQ ex_bits = 8
Stardust-SJF Nov 5, 2026
0a1302e
Show the RaBitQ delta formulas in the API page tables
Stardust-SJF Nov 5, 2026
3a5fa14
Update cpp/include/cuvs/preprocessing/quantize/rabitq.hpp
Stardust-SJF Nov 11, 2026
d3c0cab
Update cpp/tests/preprocessing/rabitq_quantization.cu
Stardust-SJF Nov 11, 2026
d916649
Apply the review cleanups to the RaBitQ quantizer
Stardust-SJF Nov 11, 2026
b741b07
Use cub::BlockReduce for the RaBitQ quantizer block reductions
Stardust-SJF Nov 11, 2026
c11432f
Take mdspan views in the RaBitQ quantizer detail layer
Stardust-SJF Nov 12, 2026
94ed09e
Use raft::warpReduce for the RaBitQ quantizer warp sums
Stardust-SJF Nov 22, 2026
1540b4c
Add missing cub includes
tfeher Nov 23, 2026
049f6d6
Merge branch 'release/26.12' into cuvs_ivf_rabitq_standalone_quantizer
tfeher Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use raft::warpReduce for the RaBitQ quantizer warp sums
The rescale-search sample evaluators in quantize.cu and
rescale_search.cu now sum with raft::warpReduce instead of the
warpReduceSum that reductions.cuh imported from the ivf_rabitq
reductions header, as suggested in the review. FloatSumN, which the
cub block reductions use, still comes from that header.

raft::warpReduce is a shfl_xor butterfly that leaves the sum in every
lane, while warpReduceSum used shfl_down and left it in lane 0. Lane 0
adds the same partner values in the same order in both, so it gets the
same bits, and every caller reads the result in lane 0 only, so the
codes and factors do not change.

Compared with the previous commit, the outputs (codes, factors,
delta/vl and the scaling factor) are byte-identical, and the only SASS
change is SHFL.DOWN -> SHFL.BFLY in the rescale-sample and fused
quantize kernels, with the same instruction counts and registers.
Those kernels run 0.2-1.4% faster, and the transform(),
transform_residuals() and make_encoder() calls that use them about
0.5-0.8% faster; the other paths are unchanged.
  • Loading branch information
Stardust-SJF committed Nov 22, 2026
commit 94ed09ee81a5103d6aefe8b4e35e38d7cf1af45e
5 changes: 3 additions & 2 deletions cpp/src/preprocessing/quantize/detail/rabitq/quantize.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <cuda_runtime.h>
#include <raft/core/error.hpp>
#include <raft/util/cuda_rt_essentials.hpp>
#include <raft/util/reduction.cuh>

namespace cuvs::preprocessing::quantize::rabitq::detail {

Expand All @@ -46,8 +47,8 @@ static __device__ __forceinline__ float evaluate_rescale_sample(
sqr_denom += quantized * quantized + quantized;
}

numerator = blockred::warpReduceSum(numerator);
sqr_denom = blockred::warpReduceSum(sqr_denom);
numerator = raft::warpReduce(numerator);
sqr_denom = raft::warpReduce(sqr_denom);

return numerator / sqrtf(sqr_denom);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

//
// Block reductions used by the RaBitQ quantizer kernels, built on cub::BlockReduce.
// warpReduceSum and FloatSumN come from ivf_rabitq.
// FloatSumN comes from ivf_rabitq.
//
// Requirements / contract:
// - blockDim.x == kBlockSize.
Expand All @@ -29,7 +29,6 @@ namespace cuvs::preprocessing::quantize::rabitq::detail {
namespace blockred {

using cuvs::neighbors::ivf_rabitq::detail::FloatSumN;
using cuvs::neighbors::ivf_rabitq::detail::warpReduceSum;

/// Sum-reduce N values across the block in one pass; on return vals[k] holds
/// the full block sum in THREAD 0 only (other threads hold partials).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <raft/core/resource/device_properties.hpp>
#include <raft/core/resources.hpp>
#include <raft/util/cuda_rt_essentials.hpp>
#include <raft/util/reduction.cuh>

#include <rmm/device_uvector.hpp>

Expand All @@ -52,8 +53,8 @@ static __device__ __forceinline__ float evaluate_rescale_sample_warp(
sqr_denom += quantized * quantized + quantized;
}

numerator = blockred::warpReduceSum(numerator);
sqr_denom = blockred::warpReduceSum(sqr_denom);
numerator = raft::warpReduce(numerator);
sqr_denom = raft::warpReduce(sqr_denom);
return numerator / sqrtf(sqr_denom);
}

Expand Down
Loading