Metadata-Version: 2.2
Name: faiss-cuda-cu128
Version: 1.14.1.post0
Summary: GPU-enabled FAISS wheels (CUDA 12.8, Taylor Geospatial).
Keywords: faiss,similarity-search,nearest-neighbors,cuda,gpu
Author-Email: Taylor Geospatial <support@taylorgeospatial.org>
License: MIT License
         
         Copyright (c) 2026 Taylor Geospatial
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
         ----------------------------------------------------------------------------
         
         The wheels published by this project bundle compiled binaries built from
         FAISS (https://github.com/facebookresearch/faiss), distributed under its
         own MIT License:
         
         MIT License
         
         Copyright (c) Facebook, Inc. and its affiliates.
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
Project-URL: Homepage, https://github.com/taylorgeospatial/faiss-cuda
Project-URL: Source, https://github.com/taylorgeospatial/faiss-cuda
Project-URL: Issues, https://github.com/taylorgeospatial/faiss-cuda/issues
Requires-Python: <3.15,>=3.11
Requires-Dist: numpy<3,>=2
Requires-Dist: packaging
Requires-Dist: nvidia-cuda-runtime-cu12>=12.8
Requires-Dist: nvidia-cublas-cu12>=12.8
Provides-Extra: fix-cuda
Requires-Dist: nvidia-cuda-runtime-cu12==12.8.*; extra == "fix-cuda"
Requires-Dist: nvidia-cublas-cu12==12.8.*; extra == "fix-cuda"
Description-Content-Type: text/markdown

# faiss-cuda

GPU-enabled [FAISS](https://github.com/facebookresearch/faiss) wheels published to
PyPI, maintained by [Taylor Geospatial](https://taylorgeospatial.org).

```bash
pip install faiss-cuda          # CUDA 13.x (default — driver R580+)
pip install faiss-cuda-cu128    # CUDA 12.8 (driver R570+)
```

No system CUDA toolkit required. The CUDA runtime libraries are pulled from PyPI
at install time (`nvidia-cuda-runtime-cu13`, `nvidia-cublas-cu13` for the default
package; `*-cu12` for `faiss-cuda-cu128`) and preloaded by a small loader shipped
in the wheel. Your only host prerequisite is a recent NVIDIA driver.

## What's in the wheel

- `faiss` Python package, GPU-enabled, built against FAISS upstream **v1.14.1**.
- Default (`faiss-cuda`, CUDA 13) built for arch `75;80;86;89;90;100` —
  T4, A100, A10/A30, RTX-40, H100/H200, Blackwell B100/B200.
- `faiss-cuda-cu128` (CUDA 12.8) built for `75;80;86;89;90` (Blackwell needs cu13).
- `manylinux2014_x86_64`, CPython 3.12 and 3.13.
- CUDA libs (`libcudart`, `libcublas`, `libcublasLt`) are *excluded* from the
  wheel — they install transitively from PyPI as `nvidia-*-cu12` packages, which
  keeps the wheel small and avoids ABI clashes if you also have PyTorch installed.

## Verify

```python
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)
```

## Variants

| Package             | CUDA | Driver | sm archs                  |
|---------------------|------|--------|---------------------------|
| `faiss-cuda`        | 13.0 | R580+  | 75, 80, 86, 89, 90, 100   |
| `faiss-cuda-cu128`  | 12.8 | R570+  | 75, 80, 86, 89, 90        |

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

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

## Build from source

Wheels are built natively on TGI RAILS (no container). The build script
provisions CUDA toolkit via pip (`nvidia-cuda-nvcc-cuXX`), uses system gcc +
openblas 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: NVIDIA GPU node with CUDA driver, RHEL 8 / glibc
2.28 baseline, gcc 11+, `uv`, `openblas-devel`.

```bash
sbatch --account=<PROJECT> scripts/rails.sbatch     # builds both cuda12 and cuda13
ls wheelhouse/
```

Or directly on a node:

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

## Releasing

1. Build wheels on RAILS: `sbatch scripts/rails.sbatch` (~30 min cold, ~5 min cached).
2. Tag and create a GitHub release, attaching every `.whl` from `wheelhouse/`:
   ```bash
   gh release create v1.14.1.post0 wheelhouse/*.whl --notes "..."
   ```
3. 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>.postN` (e.g. FAISS
1.14.1 → `1.14.1.post0`). Bump `postN` on packaging-only changes. The `faiss/`
git submodule is the source of truth for the upstream version.

## License

MIT. See [`LICENSE`](LICENSE).

The wheels redistribute compiled binaries built from
[FAISS](https://github.com/facebookresearch/faiss) (Meta, MIT-licensed); the
LICENSE file includes Meta's copyright and license text alongside ours.
