faiss icon indicating copy to clipboard operation
faiss copied to clipboard

Add check for struct sizes

Open mdouze opened this issue 11 months ago • 2 comments

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

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

Differential Revision: D69243348

mdouze avatar Feb 06 '25 13:02 mdouze