AscendIndexIVFSQT

API定义

AscendIndexIVFSQT(const faiss::IndexIVFScalarQuantizer *index, AscendIndexIVFSQTConfig config = AscendIndexIVFSQTConfig());

功能描述

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

输入

const faiss::IndexIVFScalarQuantizer *index:CPU侧的Index资源。

AscendIndexIVFSQTConfig config:Device侧资源配置。

输出

返回值

约束说明

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