faiss
faiss copied to clipboard
Add check for struct sizes
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