diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index bc0d2d625a..216fb995e1 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -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 diff --git a/faiss/impl/mapped_io.cpp b/faiss/impl/mapped_io.cpp index 84ccd4c44f..32486a9e6d 100644 --- a/faiss/impl/mapped_io.cpp +++ b/faiss/impl/mapped_io.cpp @@ -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"); } }; diff --git a/tests/test_io.py b/tests/test_io.py index 9e1853cb49..e2c5e69a18 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -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 @@ -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)