Skip to content

Parameterize existing tests with @for_all_simd_levels#5134

Closed
algoriddle wants to merge 1 commit into
facebookresearch:mainfrom
algoriddle:export-D101822335
Closed

Parameterize existing tests with @for_all_simd_levels#5134
algoriddle wants to merge 1 commit into
facebookresearch:mainfrom
algoriddle:export-D101822335

Conversation

@algoriddle
Copy link
Copy Markdown
Contributor

Summary:
Expand DD test coverage by applying for_all_simd_levels to existing test
classes that exercise DD-dispatched code paths but were previously pinned
to a single SIMD level.

This is the "mega decorator" diff from the DD test coverage gaps plan --
pure decorator additions, no new test logic. Follow-up diffs add new
test files and numerical cross-level assertions for gaps the decorator
alone cannot close.

Classes decorated (grouped by area):

  • Binary Hamming non-IVF: TestRange and TestKnn in
    test_binary_hashindex.py; TestBinarySearchParams in
    test_binary_search_params.py; TestIndexBinaryFromFloat in
    test_index_binary_from_float.py; TestSpectralHash in
    test_index_accuracy.py.

  • IVFPQ / search: EvalIVFPQAccuracy in test_index.py;
    TestSelector and TestSearchParams in test_search_params.py.

  • Flat / refine / Panorama: TestIndexFlat, TestIndexFlatL2,
    TestIndexFlatL2Panorama, TestScalarQuantizer in test_index.py;
    TestDistanceComputer, TestIndexRefineSearchParams,
    TestIndexRefineRangeSearch in test_refine.py;
    TestIndexRefinePanorama, TestIndexFlatPanorama,
    TestIndexHNSWFlatPanorama, TestIndexIVFFlatPanorama in their
    respective files.

  • Quantizer encode: TestResidualQuantizer,
    TestIndexResidualQuantizerSearch in test_residual_quantizer.py;
    TestComponents, TestLocalSearchQuantizer in
    test_local_search_quantizer.py.

  • Fast scan: TestFastScanFiltering, TestBlockSkipConsistency,
    TestFastScanRangeSearchFilter in test_fastscan_filter.py.

  • Broader index tests (search-exercising classes only):
    TestParameterSpace in test_autotune.py; TestSpectralHash in
    test_factory.py; TestMerge1, TestMerge2, TestRemoveFastScan in
    test_merge_index.py.

BUCK changes move decorated tests from the legacy-listing lists to the
simd_levels lists (which use supports_static_listing = False, required
for dynamic class name generation), and add the new entries
test_binary_search_params, test_fastscan_filter, test_refine_panorama,
test_hnsw_panorama.

Differential Revision: D101822335

Summary:
Expand DD test coverage by applying for_all_simd_levels to existing test
classes that exercise DD-dispatched code paths but were previously pinned
to a single SIMD level.

This is the "mega decorator" diff from the DD test coverage gaps plan --
pure decorator additions, no new test logic. Follow-up diffs add new
test files and numerical cross-level assertions for gaps the decorator
alone cannot close.

Classes decorated (grouped by area):

* Binary Hamming non-IVF: TestRange and TestKnn in
  test_binary_hashindex.py; TestBinarySearchParams in
  test_binary_search_params.py; TestIndexBinaryFromFloat in
  test_index_binary_from_float.py; TestSpectralHash in
  test_index_accuracy.py.

* IVFPQ / search: EvalIVFPQAccuracy in test_index.py;
  TestSelector and TestSearchParams in test_search_params.py.

* Flat / refine / Panorama: TestIndexFlat, TestIndexFlatL2,
  TestIndexFlatL2Panorama, TestScalarQuantizer in test_index.py;
  TestDistanceComputer, TestIndexRefineSearchParams,
  TestIndexRefineRangeSearch in test_refine.py;
  TestIndexRefinePanorama, TestIndexFlatPanorama,
  TestIndexHNSWFlatPanorama, TestIndexIVFFlatPanorama in their
  respective files.

* Quantizer encode: TestResidualQuantizer,
  TestIndexResidualQuantizerSearch in test_residual_quantizer.py;
  TestComponents, TestLocalSearchQuantizer in
  test_local_search_quantizer.py.

* Fast scan: TestFastScanFiltering, TestBlockSkipConsistency,
  TestFastScanRangeSearchFilter in test_fastscan_filter.py.

* Broader index tests (search-exercising classes only):
  TestParameterSpace in test_autotune.py; TestSpectralHash in
  test_factory.py; TestMerge1, TestMerge2, TestRemoveFastScan in
  test_merge_index.py.

BUCK changes move decorated tests from the legacy-listing lists to the
simd_levels lists (which use supports_static_listing = False, required
for dynamic class name generation), and add the new entries
test_binary_search_params, test_fastscan_filter, test_refine_panorama,
test_hnsw_panorama.

Differential Revision: D101822335
@meta-cla meta-cla Bot added the CLA Signed label Apr 21, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 21, 2026

@algoriddle has exported this pull request. If you are a Meta employee, you can view the originating Diff in D101822335.

@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 22, 2026

This pull request has been merged in f4338ad.

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.

1 participant