WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

[FEA] golang API for index serialization back to CPU #1592

@cpegeric

Description

@cpegeric

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I wish I could use RAFT to do [...]

All indexes like cagra, ivf_flat, ivf_pg, ... have similar issue that is without serialization functions to CPU in golang APIs.

e.g. golang ivf_flat API only hav 3 functions CreateIndex, BuildIndex and SearchIndex. There is
no function to serialize the index back to CPU just like C api does.

C APIs

/**
 * @brief De-allocate IVF-Flat index
 *
 * @param[in] index cuvsIvfFlatIndex_t to de-allocate
 */
cuvsError_t cuvsIvfFlatIndexDestroy(cuvsIvfFlatIndex_t index);

/** Get the number of clusters/inverted lists */
cuvsError_t cuvsIvfFlatIndexGetNLists(cuvsIvfFlatIndex_t index, int64_t* n_lists);

/** Get the dimensionality of the data */
cuvsError_t cuvsIvfFlatIndexGetDim(cuvsIvfFlatIndex_t index, int64_t* dim);

/**
 * @brief Get the cluster centers corresponding to the lists [n_lists, dim]
 *
 * @param[in] index cuvsIvfFlatIndex_t Built Ivf-Flat Index
 * @param[out] centers Preallocated array on host or device memory to store output, [n_lists, dim]
 * @return cuvsError_t
 */
cuvsError_t cuvsIvfFlatIndexGetCenters(cuvsIvfFlatIndex_t index, DLManagedTensor* centers);

Describe the solution you'd like
A clear and concise description of what you want to happen.

Complete the golang API to match with C, Rust and Python for all indexes.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context, code examples, or references to existing implementations about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions