Skip to content

MB-71397: Fix size calculation for FAISS Indexes#62

Open
CascadingRadium wants to merge 7 commits into
masterfrom
fixSize
Open

MB-71397: Fix size calculation for FAISS Indexes#62
CascadingRadium wants to merge 7 commits into
masterfrom
fixSize

Conversation

@CascadingRadium
Copy link
Copy Markdown
Member

@CascadingRadium CascadingRadium commented May 8, 2026

  • Use the new faiss_Index_size() FAISS method in the Size() API for
    Binary and FP32 index classes.
  • Add missing Size() API for the GPU Index class.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Go FAISS bindings to use the newer FAISS C API signatures for retrieving index size, so Size() continues to work with updated FAISS versions.

Changes:

  • Switch faiss_Index_size binding usage to the new (index, *size_t) -> int form and handle the return code.
  • Switch faiss_IndexBinary_size binding usage to the new (index, *size_t) -> int form and handle the return code.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
index.go Updates Index.Size() to call the new faiss_Index_size signature using an out-parameter.
index_binary.go Updates BinaryIndex.Size() to call the new faiss_IndexBinary_size signature using an out-parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.go Outdated
Comment thread index_binary.go Outdated
capemox
capemox previously approved these changes May 11, 2026
Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

Comment thread index.go Outdated
Comment thread index_binary.go Outdated
Comment thread index.go Outdated
Comment thread index.go Outdated
Comment thread index_binary.go Outdated
Comment thread index_binary.go Outdated
Comment thread index.go
Comment thread index_binary.go
Comment thread gpu.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@CascadingRadium CascadingRadium changed the title Fix size calculation for FAISS Indexes MB-71397: Fix size calculation for FAISS Indexes May 14, 2026
Likith101
Likith101 previously approved these changes May 15, 2026
capemox
capemox previously approved these changes May 15, 2026
@CascadingRadium CascadingRadium dismissed stale reviews from capemox and Likith101 via 066e03a May 15, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants