昇腾社区首页
中文
注册

AscendIndexIVFSQC

API定义

AscendIndexIVFSQC(const faiss::IndexIVFScalarQuantizer *index, AscendIndexIVFSQCConfig config = AscendIndexIVFSQCConfig())

功能描述

AscendIndexIVFSQC的构造函数,基于一个已有的“index”创建Ascend上的检索Index。

输入

const faiss::IndexIVFScalarQuantizer *index:CPU侧资源配置。

AscendIndexIVFSQCConfig config:NPU侧资源配置。

输出

返回值

约束说明

  • “index”需要为合法有效的CPUindex指针。
  • index->d ∈ {64, 128, 256, 384, 512, 1024}。
  • index->sq.d ∈ {32, 64, 96, 128}。
  • “index”的维度必须大于index->sq的维度且可以被index->sq的维度整除。