Skip to content

Add check for struct sizes #4172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mdouze
Copy link
Contributor

@mdouze mdouze commented Feb 6, 2025

Summary:
C++ Faiss is compiled with (at least) 3 compilers:

  • the one compiling the main CPU Faiss
  • the one called by nvcc to compile host code on GPU Faiss
  • the one compiling the SWIG generated file

Sometimes the compilers are misconfigured and have different ideas of data alignment, size and packing. This is a hard to catch bug.

This test attemtps to check if one of these differences occur.

The test did catch the bug in one configuration in the Github version, see

#4136
https://github.com/facebookresearch/faiss/actions/runs/13177278514/job/36779465009?pr=4136

Differential Revision: D69243348

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69243348

Summary:

C++ Faiss is compiled with (at least) 3 compilers:
- the one compiling the main CPU Faiss
- the one called by nvcc to compile host code on GPU Faiss
- the one compiling the SWIG generated file

Sometimes the compilers are misconfigured and have different ideas of data alignment, size and packing. This is a hard to catch bug.

This test attemtps to check if one of these differences occur.

The test did catch the bug in one configuration in the Github version, see


facebookresearch#4136
https://github.com/facebookresearch/faiss/actions/runs/13177278514/job/36779465009?pr=4136

Reviewed By: mnorris11

Differential Revision: D69243348
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69243348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants