Skip to main content

faiss-cuda

GPU-enabled FAISS wheels published to PyPI, maintained by Taylor Geospatial.

pip install faiss-cuda

Built against CUDA 12.8. Your only host prerequisite is an NVIDIA driver (R525+). No system CUDA toolkit required — the CUDA runtime libraries install from PyPI (nvidia-cuda-runtime-cu12, nvidia-cublas-cu12) and are preloaded by a small loader shipped in the wheel.

What's in the wheel

  • faiss Python package, GPU-enabled, built against FAISS upstream v1.14.3.
  • CUDA arch 70;80;86;89;90 — V100, A100, A10/A30/RTX-30, RTX-40, H100/H200. T4 (sm_75), B100/B200 (sm_100) and RTX-50 (sm_120) return in the next .post release once PyPI grants a larger file limit (pypi/support#11444).
  • Works on GPU-less machines too: the wheel contains the full CPU implementation of FAISS and loading the CUDA runtime does not require a driver.
  • manylinux_2_28_x86_64, CPython 3.11–3.14. libstdc++ is statically linked so no GCC 11+ runtime is required on the host — works on RHEL 8 / glibc 2.28 out of the box.
  • CUDA libs (libcudart, libcublas, libcublasLt) are excluded from the wheel — they install transitively from PyPI as nvidia-* packages, which keeps the wheel small and avoids ABI clashes if you also have PyTorch installed.

To pin the runtime CUDA libs to the same minor as the build (reproducibility):

pip install 'faiss-cuda[fix-cuda]'

Verify

import faiss, numpy as np
res = faiss.StandardGpuResources()
xb = np.random.random((10000, 64)).astype("float32")
xq = np.random.random((5,     64)).astype("float32")
index = faiss.GpuIndexFlatL2(res, 64)
index.add(xb)
D, I = index.search(xq, 4)
print("GPU OK", I.shape)

CUDA 13

A CUDA 13 variant (packages/cuda13, arch 75;80;86;89;90;100;103;120) is maintained in this repo but not published to PyPI — CUDA 12.8 already covers V100 through Blackwell B200/RTX-50, and CUDA 13 dropped Volta/V100 support entirely. Build it from source if you need sm_103 (GB300) or a pure cu13 dependency stack.

Deprecated: faiss-cuda-cu128

Before 1.14.3, faiss-cuda shipped CUDA 13 and faiss-cuda-cu128 carried the CUDA 12.8 build. faiss-cuda is now the CUDA 12.8 build; faiss-cuda-cu128 remains on PyPI only as an empty shim depending on faiss-cuda>=1.14.3 so old pins keep resolving.

Build from source

Wheels are built natively on TGI RAILS (no container). The build script uses the cluster CUDA toolkit and system gcc via modules, and runs auditwheel repair to certify the result as manylinux_2_28_x86_64. ccache persists builds across SLURM jobs.

Prereqs on the build host: CUDA 12.8 toolkit (13.x for the cuda13 variant), RHEL 8 / glibc 2.28 baseline, gcc 11+, uv, openblas-devel.

scripts/submit_matrix.sh --account <PROJECT>   # all (variant, python) pairs
ls wheelhouse/

Or directly on a node:

scripts/rails_build.sh cuda12         # one package
scripts/rails_build.sh                # both

Releasing

  1. Build wheels on RAILS: scripts/submit_matrix.sh --account <PROJECT>.
  2. Build the cu128 shim: python -m build --wheel packages/cu128-shim -o wheelhouse/.
  3. Tag and create a GitHub release, attaching every .whl from wheelhouse/:
    gh release create v1.14.3 wheelhouse/*.whl --notes "..."
    
  4. The release.yml workflow fires on release: published, downloads the wheel assets, and runs uv publish with OIDC trusted publishing into the pypi environment. Both faiss-cuda and faiss-cuda-cu128 need trusted-publisher configs on PyPI pointing at release.yml + environment pypi.

Versioning

Package version follows upstream FAISS: <faiss_version> on a fresh upstream bump, then <faiss_version>.postN for packaging-only changes (e.g. FAISS 1.14.3 → 1.14.3, next packaging fix → 1.14.3.post0). The faiss/ git submodule is the source of truth for the upstream version.

License

MIT. See LICENSE.

The wheels redistribute compiled binaries built from FAISS (Meta, MIT-licensed); the LICENSE file includes Meta's copyright and license text alongside ours.

Metadata

Release files for faiss-cuda 1.14.3.post0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for faiss-cuda 1.14.3.post0
File
faiss_cuda-1.14.3.post0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
faiss_cuda-1.14.3.post0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
faiss_cuda-1.14.3.post0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
faiss_cuda-1.14.3.post0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details

Total release size: 425.9 MB

Release files / faiss_cuda-1.14.3.post0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL faiss_cuda-1.14.3.post0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 106.5 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
973f14c1cd9528c60764aa5e32a7aadba22c2ecf9bd50fb206bf55010a7504d5
BLAKE2b-256 checksum
How to use checksums
4a152b689760abf1531b32ae6452267a05e66bb4388b289b8f5560deebee0b17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / faiss_cuda-1.14.3.post0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL faiss_cuda-1.14.3.post0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 106.5 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7c16bcd2338d880cd8f355c8c5b0cc3995693c75aee698a224168f7039b18423
BLAKE2b-256 checksum
How to use checksums
632ddf6e0ec234d342d92a326db38e5b9f3d4c04bb88510609676ccd986252e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / faiss_cuda-1.14.3.post0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL faiss_cuda-1.14.3.post0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 106.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d83e92f341a1f79b5ab52fa0982eab3fe80428fcb1a69591ab2021b95f568f33
BLAKE2b-256 checksum
How to use checksums
cfd9ff4dc8cbae70a4f5c76a953ac1e189044940be7a22808b1c3ff865a2a1e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / faiss_cuda-1.14.3.post0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL faiss_cuda-1.14.3.post0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 106.5 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0e74765498e88043ff4b12149c3463d562c72838b34a4487f077e919eea64aa1
BLAKE2b-256 checksum
How to use checksums
8d11a41d612d6055f9251b07774a3f2e0f8c5f1ae6f8de17fb005670c54bc7c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.14.3.post0 This release

4 release files

1.14.3

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page