copyFrom
API definition |
void copyFrom(const faiss::IndexIVFScalarQuantizer *index); |
|---|---|
Function |
Copies AscendIndexIVFSQ to the Ascend based on an existing index and retains the resource configuration on the device of the original AscendIndex. |
Input |
const faiss::IndexIVFScalarQuantizer *index: index resources on the CPU. |
Output |
N/A |
Return value |
N/A |
Restrictions |
index must be a valid CPU Index pointer. The value range of dimension d of the index is {64, 128, 256, 384, 512}. The value range of nlist (number of clustering centroids) is {1024, 2048, 4096, 8192, 16384, 32768}. The value range of nprobe (total number of candidate buckets) is 0 < nprobe ≤ nlist. The value range of the total number of vectors is 0 ≤ n < 1e9. The value of metric_type can be faiss::MetricType::METRIC_L2 or faiss::MetricType::METRIC_INNER_PRODUCT. sq.qtype supports only ScalarQuantizer::QuantizerType::QT_8bit. |