昇腾社区首页
中文
注册

AscendIndexIVFSQFuzzy

API定义

AscendIndexIVFSQFuzzy(const faiss::IndexIVFScalarQuantizer *index, AscendIndexIVFSQFuzzyConfig config = AscendIndexIVFSQFuzzyConfig())

功能描述

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

输入

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

AscendIndexIVFSQFuzzyConfig config:NPU侧资源配置。

输出

返回值

约束说明

“index”需要为合法有效的CPUindex指针,该Index的成员变量要满足如下范围:

  • dim ∈ {64, 128, 256, 384, 512, 1024, 2048}
  • nlist ∈ {1024, 2048, 4096, 8192, 16384, 32768}
  • qtype = ScalarQuantizer::QuantizerType::QT_8bit,当前仅支持“ScalarQuantizer::QuantizerType::QT_8bit”量化器类型。
  • metric = faiss::MetricType::METRIC_INNER_PRODUCT