Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9c7d71a
Bye BOND and NARY
lkuffo Feb 23, 2026
b240a83
Working refactor
lkuffo Feb 23, 2026
e4fb3ad
U8 works
lkuffo Feb 23, 2026
540af93
IVF2 working
lkuffo Feb 23, 2026
32f420f
IVF2 working
lkuffo Feb 23, 2026
2c975cd
Adding SuperKMeans
lkuffo Feb 23, 2026
7cfc6aa
Build Index done
lkuffo Feb 24, 2026
4a7f91e
End to end benchmark that creates indexes from scratch
lkuffo Feb 24, 2026
d8b11f7
Refactor structure
lkuffo Feb 24, 2026
52580a1
Serialize and deserialize
lkuffo Feb 24, 2026
3087114
Removing old benchmarks
lkuffo Feb 24, 2026
cb79831
Refactoring bindings
lkuffo Feb 24, 2026
58f5b25
Get used memory in bytes
lkuffo Feb 24, 2026
d2d9ad2
Get in memory size
lkuffo Feb 24, 2026
8710451
Format fix
lkuffo Feb 24, 2026
dd9c7c1
FFTW working but deactivating for now
lkuffo Feb 24, 2026
305e52f
Filtered search working
lkuffo Feb 24, 2026
46a289c
Test suite
lkuffo Feb 24, 2026
83c4f81
Fixing bug with PDXTree
lkuffo Feb 24, 2026
5e44f10
Git Ignore
lkuffo Feb 24, 2026
8265b03
Reintroducing FAISS and some readme stuff
lkuffo Feb 24, 2026
08e6e52
Hierarchical KMeans by default
lkuffo Feb 25, 2026
0696ebf
Fixing examples
lkuffo Feb 25, 2026
880b20a
Fixing examples
lkuffo Feb 25, 2026
a3affc8
New PDX
lkuffo Feb 25, 2026
6cf5b15
Compile benchmarks flag
lkuffo Feb 25, 2026
43d7e67
Commiting to hierarchical and cleaning a bit
lkuffo Feb 25, 2026
ecdb46c
Fixing FFTW bug and enhancing performance
lkuffo Feb 25, 2026
488a580
Bumping SuperKMeans
lkuffo Feb 25, 2026
04927c0
Adding cohere dataset
lkuffo Feb 25, 2026
8e9c12d
Adding cohere dataset
lkuffo Feb 25, 2026
fa06651
AVX512 fix
lkuffo Feb 25, 2026
89e5aef
AVX512 fix
lkuffo Feb 25, 2026
be7c3e7
AVX512 fix
lkuffo Feb 25, 2026
59369c5
Optimizing index creation
lkuffo Feb 26, 2026
63ff554
Bump superkmeans
lkuffo Feb 26, 2026
6015b69
Fixing unaligned pointer
lkuffo Feb 26, 2026
5423705
Final results and new README
lkuffo Feb 26, 2026
c926522
Removing benchmarks
lkuffo Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
BasedOnStyle: LLVM

# Indentation
IndentWidth: 4
TabWidth: 4

# Braces
BreakBeforeBraces: Attach
AllowShortFunctionsOnASingleLine: InlineOnly

ColumnLimit: 100

# Pointer/reference alignment
PointerAlignment: Left
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignAfterOpenBracket: BlockIndent
AlwaysBreakTemplateDeclarations: Yes

# Spaces
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: true
SpacesInParentheses: false


BinPackParameters: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterReturnType: None
PenaltyReturnTypeOnItsOwnLine: 1024

BinPackArguments: false
AllowAllArgumentsOnNextLine: true
22 changes: 22 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Checks: >
-*,
bugprone-*,
clang-analyzer-*,
cppcoreguidelines-virtual-class-destructor,
modernize-pass-by-value,
modernize-use-emplace,
modernize-use-nullptr,
modernize-use-override,
modernize-use-using,
performance-*,
readability-redundant-*,
-bugprone-easily-swappable-parameters,
-performance-avoid-endl

WarningsAsErrors: ''

CheckOptions:
- key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
value: false

HeaderFilterRegex: 'include/superkmeans/.*'
154 changes: 154 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
name: CI

on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'

jobs:
format-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install clang-format 18.1.8
run: pip install clang-format==18.1.8

- name: Check C++ formatting
run: |
clang-format --version
./scripts/format_check.sh

tidy-check:
runs-on: ubuntu-24.04
env:
CC: clang-18
CXX: clang++-18
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-18 clang-tidy-18 libomp-18-dev libopenblas-dev cmake
sudo ln -sf /usr/bin/clang-tidy-18 /usr/local/bin/clang-tidy

- name: Configure
run: cmake -B build -DPDX_COMPILE_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

- name: Build
run: cmake --build build -j$(nproc)

- name: Run clang-tidy
run: |
ln -s build/compile_commands.json compile_commands.json
./scripts/tidy_check.sh

cpp-build-and-test:
runs-on: ubuntu-24.04
env:
CC: clang-18
CXX: clang++-18
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-18 libomp-18-dev libopenblas-dev cmake

- name: Configure
run: cmake -B build -DPDX_COMPILE_TESTS=ON -DCMAKE_BUILD_TYPE=Release

- name: Build tests
run: cmake --build build -j$(nproc) --target tests

- name: Run tests
run: ctest --test-dir build --output-on-failure

python:
runs-on: ubuntu-24.04
env:
CC: clang-18
CXX: clang++-18
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-18 libomp-18-dev libopenblas-dev cmake

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Python bindings
run: pip install .

- name: Verify import
run: python -c "import pdxearch; print('pdxearch imported successfully')"

sanitizers-asan-ubsan:
runs-on: ubuntu-24.04
env:
CC: clang-18
CXX: clang++-18
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-18 libomp-18-dev libopenblas-dev cmake

- name: Configure with ASan + UBSan
run: |
cmake -B build_asan -DPDX_COMPILE_TESTS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"

- name: Build tests
run: cmake --build build_asan -j$(nproc) --target tests

- name: Run tests
run: ctest --test-dir build_asan --output-on-failure

ci-pass:
runs-on: ubuntu-latest
if: always()
needs:
- format-check
- tidy-check
- cpp-build-and-test
- python
- sanitizers-asan-ubsan
steps:
- name: Check all jobs passed
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more jobs failed or were cancelled"
exit 1
fi
40 changes: 16 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ venv
/cmake-build-debug/
/cmake-build-release/
/cmake-build*/
/build_debug/
/build_release/
/build_relwithdebinfo/
/tests/cmake_test_discovery_*.json
compile_commands.json
/.idea/
/dummy/
/Testing/
Expand All @@ -62,10 +67,10 @@ pdxearch.egg-info
/benchmarks/core_indexes/faiss_l0/*
!/benchmarks/core_indexes/faiss_l0/*.json

/benchmarks/datasets/adsampling_nary
/benchmarks/datasets/adsampling_pdx
/benchmarks/datasets/downloaded
/benchmarks/datasets/nary
/benchmarks/datasets/raw
/benchmarks/datasets/faiss
/benchmarks/datasets/pdx
/benchmarks/datasets/purescan
/benchmarks/datasets/queries
Expand All @@ -91,25 +96,12 @@ cmake_install.cmake
/benchmarks/milvus/volumes/
/benchmarks/python_scripts/indexes

/benchmarks/BenchmarkNaryIVFADSampling
/benchmarks/BenchmarkNaryIVFADSamplingSIMD
/benchmarks/BenchmarkPDXADSampling
/benchmarks/BenchmarkIVF2ADSampling
/benchmarks/FilteredBenchmarkPDXADSampling
/benchmarks/FilteredBenchmarkU8IVF2ADSampling
/benchmarks/BenchmarkASYM_U8PDXADSampling
/benchmarks/BenchmarkU8PDXADSampling
/benchmarks/BenchmarkLEP8PDXADSampling
/benchmarks/BenchmarkPDXIVFBOND
/benchmarks/BenchmarkPDXBOND
/benchmarks/BenchmarkPDXLinearScan
/benchmarks/BenchmarkU*
/benchmarks/G4*
/benchmarks/BenchmarkNaryIVFLinearScan
/benchmarks/KernelPDXL1
/benchmarks/KernelPDXL2
/benchmarks/KernelPDXIP
/benchmarks/KernelNaryL1
/benchmarks/KernelNaryL2
/benchmarks/KernelNaryIP
/benchmarks/BenchmarkU8*
/benchmarks/BenchmarkEndToEnd
/benchmarks/BenchmarkSerialization
/benchmarks/BenchmarkPDXIVF
/benchmarks/BenchmarkFiltered
/benchmarks/BenchmarkSpecialFilters

# Test binaries (but keep the committed test data)
*.bin
!tests/test_data.bin
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
[submodule "extern/findFFTW"]
path = extern/findFFTW
url = https://github.com/egpbos/findfftw.git
[submodule "extern/SuperKMeans"]
path = extern/SuperKMeans
url = https://github.com/lkuffo/SuperKMeans
Loading