Commit Graph
4 Commits
Author SHA1 Message Date
Max BuckleyandClaude Opus 4.6 b3a2914982 fix: resolve compiler warnings in test files (#4944)
Summary:
- Fix compiler warnings in all 20 FAISS C++ test files
- Fixes include `-Wshadow`, `-Wunused-parameter`, and signed/unsigned comparisons

All changes are mechanical. No functional changes.

Part 13/13 of the compiler warnings cleanup (split from https://github.com/facebookresearch/faiss/issues/4810 per maintainer request).

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4944

Test Plan:
- [x] No functional changes — all fixes are mechanical renames and annotations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

Reviewed By: mnorris11

Differential Revision: D96996609

Pulled By: alibeklfc

fbshipit-source-id: 72555246a4ccf540eb5422e64018c8d5e2660dce
2026-03-20 10:21:55 -07:00
George Wang 90e4c4dee0 Fix SCD Table test flakiness (#4069)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4069

Test often fails due to bad file descriptor: https://www.internalfb.com/intern/testinfra/diagnostics/12384899035372280.281475109760157.1733399744/

This is due to the filename in the test being the same across all runs - when there are multiple concurrent runs, there will be problems accessing the file.

The solution is to add a randomized component to the temp file, similar to other tests like ```test_io_with_options```, which prevents concurrent accesses of a file.

Reviewed By: pankajsingh88

Differential Revision: D66846937

fbshipit-source-id: d1d3c9ce817c4ce06283db265f13fe1413c2a14b
2024-12-06 14:21:50 -08:00
Michael Norris eff0898a13 Enable linting: lint config changes plus arc lint command (#3966)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3966

This actually enables the linting.

Manual changes:
- tools/arcanist/lint/fbsource-licenselint-config.toml
- tools/arcanist/lint/fbsource-lint-engine.toml

Automated changes:
`arc lint --apply-patches --take LICENSELINT --paths-cmd 'hg files faiss'`

Reviewed By: asadoughi

Differential Revision: D64484165

fbshipit-source-id: 4f2f6e953c94ef6ebfea8a5ae035ccfbea65ed04
2024-10-22 09:46:48 -07:00
John Mazanec 12b92e9fa5 Skip HNSWPQ sdc init with new io flag (#3250)
Summary:
## Description

Related issue: https://github.com/facebookresearch/faiss/issues/3246

When reading HNSWPQ from disk, if index ~read only~ new `IO_FLAG_PQ_SKIP_SDC_TABLE` flag is set, skip initializing the sdc_table.

In addition, adds cpp test case verifying functionality and build test util header file to share creation of temporary files amongst tests.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3250

Test Plan: buck test //faiss/tests/:test_disable_pq_sdc_tables

Reviewed By: junjieqi

Differential Revision: D53844075

Pulled By: mdouze

fbshipit-source-id: e9a83c0e5243867edbca8f80e3b1242b38ef6a42
2024-03-01 04:27:49 -08:00