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

未关闭
#3,009 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Cuda
星标
902
派生
267
平均合并
2 天 21 小时
30 天内合并 PR
57

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/cuvs 的其他 Issue

查看 NVIDIA/cuvs 的全部 Issue

相似的 Issue

更多 Machine Learning Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。