AscendIndexSQ
API定义 |
AscendIndexSQ(const faiss::IndexScalarQuantizer* index, AscendIndexSQConfig config = AscendIndexSQConfig()) |
---|---|
功能描述 |
AscendIndexSQ的构造函数,基于一个已有的“index”创建Ascend上的检索Index。 |
输入 |
const faiss::IndexScalarQuantizer* index:CPU侧资源配置。 AscendIndexSQConfig config:NPU侧资源配置。 |
输出 |
无 |
返回值 |
无 |
约束说明 |
“index”需要为合法有效的CPUindex指针,该Index的维度d参数取值范围为{64, 128, 256, 384, 512},底库数量不超过1e9,metric_type参数取值为{faiss::MetricType::METRIC_L2,faiss::MetricType::METRIC_INNER_PRODUCT}, sq.qtype参数仅支持“ScalarQuantizer::QuantizerType::QT_8bit”。 |
父主题: AscendIndexSQ