RepoPilot

facebookresearch / faiss

Search facebookresearch/faiss

GitHub

Code

How facebookresearch/faiss is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Suggested starting pointAI
  5. Suggested starting pointAI
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new index type

  • Export the class in SWIG interface by adding class declarations.
  • Add wrapper in Python class_wrappers.py for user-friendly API.

Add GPU implementation for existing index

  • Register cloner logic in GpuCloner to convert CPU to GPU index.

Add new distance metric

  • Implement distance computation kernel in distances.h and dispatch table.
  • Add dispatcher logic to select correct implementation at runtime.
  • Integrate into Index.cpp search methods to use new metric.

Change the public API

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.

Code quality and hotspots

Largest source files

  • Branch points176 per file on average
  • Code issues0 errors, 14 warnings
  • Largest file3,808 lines
  • Hotspot load7 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions11 workflows
  • Tests186 test filesPytest · 0.26 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: faiss/gpu/test · demos/offline_ivf/tests · faiss/gpu_metal/test

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.