Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
258 changes: 136 additions & 122 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,132 +38,146 @@ jobs:
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
linux-x86_64-AVX2-cmake:
name: Linux x86_64 AVX2 (cmake)
needs: linux-x86_64-cmake
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
with:
opt_level: avx2
linux-x86_64-AVX512-cmake:
name: Linux x86_64 AVX512 (cmake)
needs: linux-x86_64-cmake
runs-on: faiss-aws-m7i.large
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
with:
opt_level: avx512
linux-x86_64-AVX512_SPR-cmake:
name: Linux x86_64 AVX512_SPR (cmake)
needs: linux-x86_64-cmake
runs-on: faiss-aws-m7i.large
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
with:
opt_level: avx512_spr
linux-x86_64-GPU-cmake:
name: Linux x86_64 GPU (cmake)
needs: linux-x86_64-cmake
runs-on: 4-core-ubuntu-gpu-t4
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
with:
gpu: ON
linux-x86_64-GPU-w-CUVS-cmake:
name: Linux x86_64 GPU w/ cuVS (cmake)
needs: linux-x86_64-cmake
runs-on: 4-core-ubuntu-gpu-t4
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
with:
gpu: ON
cuvs: ON
linux-x86_64-GPU-w-ROCm-cmake:
name: Linux x86_64 GPU w/ ROCm (cmake)
needs: linux-x86_64-cmake
runs-on: faiss-amd-MI200
container:
image: ubuntu:22.04
options: --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size 16G --group-add video --cap-add=SYS_PTRACE --cap-add=SYS_ADMIN
steps:
- name: Container setup
run: |
if [ -f /.dockerenv ]; then
apt-get update && apt-get install -y sudo && apt-get install -y git
git config --global --add safe.directory '*'
else
echo 'Skipping. Current job is not running inside a container.'
fi
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
with:
gpu: ON
rocm: ON
linux-arm64-SVE-cmake:
name: Linux arm64 SVE (cmake)
needs: linux-x86_64-cmake
runs-on: faiss-aws-r8g.large
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test (cmake)
uses: ./.github/actions/build_cmake
with:
opt_level: sve
env:
# Context: https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction
OPENBLAS_NUM_THREADS: '1'
linux-x86_64-conda:
name: Linux x86_64 (conda)
needs: linux-x86_64-cmake
runs-on: ubuntu-latest
osx-arm64-nightly:
name: OSX arm64 nightlies
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Build and Package (conda)
uses: ./.github/actions/build_conda
windows-x86_64-conda:
name: Windows x86_64 (conda)
needs: linux-x86_64-cmake
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Build and Package (conda)
uses: ./.github/actions/build_conda
linux-arm64-conda:
name: Linux arm64 (conda)
needs: linux-x86_64-cmake
runs-on: 2-core-ubuntu-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build_conda
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
with:
fetch-depth: 0
fetch-tags: true
- name: Build and Package (conda)
uses: ./.github/actions/build_conda
label: nightly
# linux-x86_64-AVX2-cmake:
# name: Linux x86_64 AVX2 (cmake)
# needs: linux-x86_64-cmake
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Test (cmake)
# uses: ./.github/actions/build_cmake
# with:
# opt_level: avx2
# linux-x86_64-AVX512-cmake:
# name: Linux x86_64 AVX512 (cmake)
# needs: linux-x86_64-cmake
# runs-on: faiss-aws-m7i.large
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Test (cmake)
# uses: ./.github/actions/build_cmake
# with:
# opt_level: avx512
# linux-x86_64-AVX512_SPR-cmake:
# name: Linux x86_64 AVX512_SPR (cmake)
# needs: linux-x86_64-cmake
# runs-on: faiss-aws-m7i.large
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Test (cmake)
# uses: ./.github/actions/build_cmake
# with:
# opt_level: avx512_spr
# linux-x86_64-GPU-cmake:
# name: Linux x86_64 GPU (cmake)
# needs: linux-x86_64-cmake
# runs-on: 4-core-ubuntu-gpu-t4
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Test (cmake)
# uses: ./.github/actions/build_cmake
# with:
# gpu: ON
# linux-x86_64-GPU-w-CUVS-cmake:
# name: Linux x86_64 GPU w/ cuVS (cmake)
# needs: linux-x86_64-cmake
# runs-on: 4-core-ubuntu-gpu-t4
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Test (cmake)
# uses: ./.github/actions/build_cmake
# with:
# gpu: ON
# cuvs: ON
# linux-x86_64-GPU-w-ROCm-cmake:
# name: Linux x86_64 GPU w/ ROCm (cmake)
# needs: linux-x86_64-cmake
# runs-on: faiss-amd-MI200
# container:
# image: ubuntu:22.04
# options: --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size 16G --group-add video --cap-add=SYS_PTRACE --cap-add=SYS_ADMIN
# steps:
# - name: Container setup
# run: |
# if [ -f /.dockerenv ]; then
# apt-get update && apt-get install -y sudo && apt-get install -y git
# git config --global --add safe.directory '*'
# else
# echo 'Skipping. Current job is not running inside a container.'
# fi
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Test (cmake)
# uses: ./.github/actions/build_cmake
# with:
# gpu: ON
# rocm: ON
# linux-arm64-SVE-cmake:
# name: Linux arm64 SVE (cmake)
# needs: linux-x86_64-cmake
# runs-on: faiss-aws-r8g.large
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Test (cmake)
# uses: ./.github/actions/build_cmake
# with:
# opt_level: sve
# env:
# # Context: https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction
# OPENBLAS_NUM_THREADS: '1'
# linux-x86_64-conda:
# name: Linux x86_64 (conda)
# needs: linux-x86_64-cmake
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# fetch-tags: true
# - name: Build and Package (conda)
# uses: ./.github/actions/build_conda
# windows-x86_64-conda:
# name: Windows x86_64 (conda)
# needs: linux-x86_64-cmake
# runs-on: windows-2019
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# fetch-tags: true
# - name: Build and Package (conda)
# uses: ./.github/actions/build_conda
# linux-arm64-conda:
# name: Linux arm64 (conda)
# needs: linux-x86_64-cmake
# runs-on: 2-core-ubuntu-arm
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# fetch-tags: true
# - name: Build and Package (conda)
# uses: ./.github/actions/build_conda
11 changes: 7 additions & 4 deletions faiss/impl/mapped_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,15 @@ struct MmappedFileMappingOwner::PImpl {
#else

struct MmappedFileMappingOwner::PImpl {
PImpl(FILE* f) {
FAISS_THROW_FMT("Not implemented");
void* ptr = nullptr;
size_t ptr_size = 0;

PImpl(const std::string& filename) {
FAISS_THROW_MSG("Not implemented");
}

~PImpl() {
FAISS_THROW_FMT("Not implemented");
PImpl(FILE* f) {
FAISS_THROW_MSG("Not implemented");
}
};

Expand Down
5 changes: 5 additions & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io
import sys
import pickle
import platform
from multiprocessing.pool import ThreadPool
from common_faiss_tests import get_dataset_2

Expand Down Expand Up @@ -485,6 +486,10 @@ def test_reader(self):


class TestIOFlatMMap(unittest.TestCase):
@unittest.skipIf(
platform.system() not in ["Windows", "Linux"],
"supported OSes only"
)
def test_mmap(self):
xt, xb, xq = get_dataset_2(32, 0, 100, 50)
index = faiss.index_factory(32, "SQfp16", faiss.METRIC_L2)
Expand Down
Loading