[FEA] IVF-PQ transform: faster PQ-encode kernels (SIMT / tensor-core backends)

Aperta
#3,009 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva

Direzione di ricerca

The issue identifies ivf_pq::transform and the prototype environment variable LANCE_CUVS_PQ_ENCODE_BACKEND, but names no source files or tests. First read the transform and its index parameters, then locate the prototype kernels and microbench used for the reported timings and accuracy. Before implementation, maintainers need to decide the parameter API and acceptable accuracy; done means the chosen backends are selectable and validated, including the PER_CLUSTER fallback.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature request

Problem
In ivf_pq::transform, PQ encoding of residuals is a significant part of the cost at large scale.

Solution
Add alternative encode backends for PER_SUBSPACE codebooks, selectable via a parameter:
baseline (current), simt, tensor (TF32/FP16 tensor cores), tensor3 (3-pass split, ~exact).

Measured (microbench, us/row): baseline 0.370, simt 0.143, tensor 0.064, tensor3 0.0715.
Accuracy vs exact FP64: tensor ~0.08% of codes differ; tensor3 ~exact. Best 1B config uses tensor3.

Open questions for maintainers

  • API shape: a field in the transform/index params vs an automatic choice (default stays baseline or tensor3?).
  • Is a ~0.08% code mismatch acceptable for tensor, or should only the ~exact variant ship?
  • PER_CLUSTER codebooks are not supported by the new backends (falls back to baseline).

Prototype has an env var (LANCE_CUVS_PQ_ENCODE_BACKEND); upstream would replace it with a parameter.

Lingua principale
Cuda
Stelle
902
Fork
267
Merge medio
2g 21h
PR unite (30g)
57

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/cuvs

Tutte le issue di NVIDIA/cuvs

Issue simili

Altre issue su Machine Learning

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.