Commit Graph

3 Commits (e7d153dbf543a862b9119572eef501822ccfbba9)

Author SHA1 Message Date
Mengdi Lin be4fc8e503 fix hnsw unit test in opt mode (#3919)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3919

These tests are passing successfully in `dev` mode during my local development when I added them but I recently noticed they are failing on contbuild which is running them in opt/mode: https://www.internalfb.com/intern/test/281475152762853/

Upon further inspection, 2 of these were from floating point comparisons which we can fix with `EXPECT_NEAR`. The another one stems from indeterminism of the results in opt mode, so we will relax the test until we figure out a way to deal with the indeterminism

Reviewed By: junjieqi

Differential Revision: D63942329

fbshipit-source-id: 60f1c0b8a0db93015cd32bf991ab983ff2d1af13
2024-10-07 20:20:36 -07:00
Mengdi Lin 52ce3f55ae add hnsw unit test for PR 3840 (#3849)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3849

https://github.com/facebookresearch/faiss/issues/3845

Add unit tests for helper search utilities for HNSW. These utility functions live inside an anonymous namespace and each has a reference version gated behind a const bool, I refactored them so the reference version is a flag for the function which defaults to false.

If we are concerned about the performance overhead of the extra if branching (whether to use reference version or not) inside these utility functions, I'm happy to lift out the reference versions to their own functions inside the unit test

Reviewed By: junjieqi

Differential Revision: D62510014

fbshipit-source-id: b92ed4db69d125c7830da93946f1c2374fb87b08
2024-09-12 13:54:54 -07:00
Alexandr Guzhva e8b7575e93 AVX2 version of faiss::HNSW::MinimaxHeap::pop_min() (#2874)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2874

Reviewed By: mdouze

Differential Revision: D46125506

fbshipit-source-id: 4099e5c95bfb168b2097a42f5308c4bea1f72ca8
2023-05-26 11:35:21 -07:00