faiss-gpu-cu12


Namefaiss-gpu-cu12 JSON
Version 1.8.0.1 PyPI version JSON
download
home_pagehttps://github.com/Di-Is/faiss-gpu-wheels
SummaryA library for efficient similarity search and clustering of dense vectors.
upload_time2024-05-08 21:27:38
maintainerNone
docs_urlNone
authorDi-Is
requires_pythonNone
licenseMIT License
keywords search nearest neighbors
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # faiss-wheels

This repository is based on [kyamagu/faiss-wheels](https://github.com/kyamagu/faiss-wheels).

[![PyPI](https://img.shields.io/pypi/v/faiss-gpu-cu11?label=faiss-gpu-cu11)](https://pypi.org/project/faiss-gpu-cu11/)
[![PyPI](https://img.shields.io/pypi/v/faiss-gpu-cu12?label=faiss-gpu-cu12)](https://pypi.org/project/faiss-gpu-cu12/)

## Overview

This repository provides scripts to build gpu wheels for the [faiss](https://github.com/facebookresearch/faiss) library.
Distribute the `faiss-gpu-cuXX` package to PyPI using the contents of this repository. 

* Builds CUDA 11.8+/CUDA 12.1+ compatible wheels.
  * Support Pascal\~Hopper architecture GPU (Compute Capability 6.0\~9.0).
  * **Dynamically linked to CUDA Runtime and cuBLAS libraries published in PyPI.**
* Bundles OpenBLAS in Linux.


## Installation

The `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels built for CUDA11 and CUDA12 are available on PyPI.
Install one or the other depending on your environment.
These wheels dynamically link to the CUDA Runtime and cuBLAS shared libraries. This approach helps to reduce the file size of the wheels.

`faiss-gpu-cuXX(XX=11 or 12)` has dependencies on CUDA Runtime (`nvidia-cuda-runtime-cuXX`) and cuBLAS (`nvidia-cublas-cuXX`) released by PyPI, and links shared libraries in these packages. 
**Therefore, there is no need to install CUDA on your host(system).**

### <span style="color: red; ">Caution</span>

The published `faiss-gpu-cuXX` package requires proper setup of system, hardware, and other dependencies that cannot be managed by the package manager (e.g. pip).
It is the responsibility of the user of this package to prepare an environment suitable for its operation.

Here are the main requirements that such an environment should meet (Other conditions may be hidden.)

1. the host environment must have a CUDA-compatible Nvidia Driver installed, as required by `faiss-gpu-cuXX` (see below for details)
2. the GPU architecture of the execution environment must be compatible with `faiss-gpu-cuXX` (see below for details)
3. if you install `faiss-gpu-cuXX` and another library (e.g. Pytorch) that uses dynamically linked CUDA in the same environment, they must be linked to the same CUDA shared library.

### Wheel for CUDA12

`faiss-gpu-cu12` is a package built using CUDA Toolkit 12.1.
The following command will install faiss and the CUDA Runtime and cuBLAS for CUDA 12.1 used at build time.

```bash
# install CUDA 12.1 at the same time
pip install faiss-gpu-cu12[fix_cuda]
```

**Requirements**
* OS: Linux
  * arch: x86_64
  * glibc >=2.28
* Nvidia driver: >=R530 (specify `fix_cuda` extra during installation)
* GPU architectures: Pascal\~Hopper (Compute Capability: 6.0\~9.0)

**Advanced**

The `faiss-gpu-cu12` package (the binaries contained in it) is minor version compatible with CUDA and will work dynamically linked with CUDA 12.X (X>=1).

Installation of the CUDA runtime and cuBLAS is allowed to the extent that minor version compatibility is maintained by excluding the `fix_cuda` extra.

This is useful when coexisting this package with a package that has a dependency on the CUDA Toolkit used at build time, such as Pytorch or Tensorflow.

The installation commands are as follows.

```bash
# install CUDA 12.X(X>=1) at the same time
pip install faiss-gpu-cu12
```

If you install the `faiss-gpu-cuXX` package in this way, CUDA may be updated due to lock file updates, etc.

Please note that this may cause an error depending on the compatibility with the driver. (Basically, to use a new CUDA, the driver must also be updated).


### Wheel for CUDA11

`faiss-gpu-cu11` is a package built using CUDA Toolkit 11.8.
The following command will install faiss and the CUDA Runtime and cuBLAS for CUDA 11.8 used at build time.

```bash
# install CUDA 11.8 at the same time
pip install faiss-gpu-cu11[fix_cuda]
```

**Requirements**
* OS: Linux
  * arch: x86_64
  * glibc >=2.28
* Nvidia driver: >=R520 (specify `fix_cuda` extra during installation)
* GPU architectures: Pascal\~Hopper (Compute Capability: 6.0\~9.0)

**Advanced**

Since CUDA 11.8 is the final version of the CUDA 11 series, the results are the same with or without the `fix_cuda` extras.

```bash
# install CUDA 11.X(X>=8) at the same time
pip install faiss-gpu-cu11
```

### Versioning rule

Packages to be published from this repository are "{A}.{B}.{C}.{D}" format.
A, B, and C are the versions of faiss used for builds.
D is the version used to manage changes specific to this repository.

## Usage

### Build wheels

You can build `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels using [dagger](https://dagger.io).

```bash
# build wheel for CUDA 11.8
dagger call build-gpu-wheels --cuda-major-version 11 --host-directory=.:build-view --output ./wheelhouse/gpu/cuda11

# build wheel for CUDA 12.1
dagger call build-gpu-wheels --cuda-major-version 12 --host-directory=.:build-view --output ./wheelhouse/gpu/cuda12
```

When executed, a wheel is created under "{repository root}/wheelhouse/gpu/cuXX".


**Requirements**
* OS: Linux
  * arch: x86_64
* Dagger: v0.11.2

### Test wheels

You can test `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels using [dagger](https://dagger.io).


```bash
# test for faiss-gpu-cu11 wheels
_EXPERIMENTAL_DAGGER_GPU_SUPPORT=1 dagger call test-gpu-wheels --cuda-major-version 11 --host-directory=.:test-view --wheel-directory=./wheelhouse/gpu/cuda11/

# test for faiss-gpu-cu12 wheels
_EXPERIMENTAL_DAGGER_GPU_SUPPORT=1 dagger call test-gpu-wheels --cuda-major-version 12 --host-directory=.:test-view --wheel-directory=./wheelhouse/gpu/cuda12/
```

**Requirements**
* OS: Linux
  * arch: x86_64
* Dagger: v0.11.2
* Nvidia container toolkit
* Nvidia driver: >=R530


### Build & Test wheels

You can build andtest `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels using [dagger](https://dagger.io).

```bash
# test for faiss-gpu-cu11 & cu12 wheels
_EXPERIMENTAL_DAGGER_GPU_SUPPORT=1 dagger call faiss-gpu-ci --cuda-major-versions 11 --cuda-major-versions 12 --host-directory=.:ci-view --output=./wheelhouse
```

**Requirements**
* OS: Linux
  * arch: x86_64
* Dagger: v0.11.2
* Nvidia container toolkit
* Nvidia driver: >=R530

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Di-Is/faiss-gpu-wheels",
    "name": "faiss-gpu-cu12",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "search nearest neighbors",
    "author": "Di-Is",
    "author_email": "rhoxbox@gmail.com@gmail.com",
    "download_url": null,
    "platform": null,
    "description": "# faiss-wheels\n\nThis repository is based on [kyamagu/faiss-wheels](https://github.com/kyamagu/faiss-wheels).\n\n[![PyPI](https://img.shields.io/pypi/v/faiss-gpu-cu11?label=faiss-gpu-cu11)](https://pypi.org/project/faiss-gpu-cu11/)\n[![PyPI](https://img.shields.io/pypi/v/faiss-gpu-cu12?label=faiss-gpu-cu12)](https://pypi.org/project/faiss-gpu-cu12/)\n\n## Overview\n\nThis repository provides scripts to build gpu wheels for the [faiss](https://github.com/facebookresearch/faiss) library.\nDistribute the `faiss-gpu-cuXX` package to PyPI using the contents of this repository. \n\n* Builds CUDA 11.8+/CUDA 12.1+ compatible wheels.\n  * Support Pascal\\~Hopper architecture GPU (Compute Capability 6.0\\~9.0).\n  * **Dynamically linked to CUDA Runtime and cuBLAS libraries published in PyPI.**\n* Bundles OpenBLAS in Linux.\n\n\n## Installation\n\nThe `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels built for CUDA11 and CUDA12 are available on PyPI.\nInstall one or the other depending on your environment.\nThese wheels dynamically link to the CUDA Runtime and cuBLAS shared libraries. This approach helps to reduce the file size of the wheels.\n\n`faiss-gpu-cuXX(XX=11 or 12)` has dependencies on CUDA Runtime (`nvidia-cuda-runtime-cuXX`) and cuBLAS (`nvidia-cublas-cuXX`) released by PyPI, and links shared libraries in these packages. \n**Therefore, there is no need to install CUDA on your host(system).**\n\n### <span style=\"color: red; \">Caution</span>\n\nThe published `faiss-gpu-cuXX` package requires proper setup of system, hardware, and other dependencies that cannot be managed by the package manager (e.g. pip).\nIt is the responsibility of the user of this package to prepare an environment suitable for its operation.\n\nHere are the main requirements that such an environment should meet (Other conditions may be hidden.)\n\n1. the host environment must have a CUDA-compatible Nvidia Driver installed, as required by `faiss-gpu-cuXX` (see below for details)\n2. the GPU architecture of the execution environment must be compatible with `faiss-gpu-cuXX` (see below for details)\n3. if you install `faiss-gpu-cuXX` and another library (e.g. Pytorch) that uses dynamically linked CUDA in the same environment, they must be linked to the same CUDA shared library.\n\n### Wheel for CUDA12\n\n`faiss-gpu-cu12` is a package built using CUDA Toolkit 12.1.\nThe following command will install faiss and the CUDA Runtime and cuBLAS for CUDA 12.1 used at build time.\n\n```bash\n# install CUDA 12.1 at the same time\npip install faiss-gpu-cu12[fix_cuda]\n```\n\n**Requirements**\n* OS: Linux\n  * arch: x86_64\n  * glibc >=2.28\n* Nvidia driver: >=R530 (specify `fix_cuda` extra during installation)\n* GPU architectures: Pascal\\~Hopper (Compute Capability: 6.0\\~9.0)\n\n**Advanced**\n\nThe `faiss-gpu-cu12` package (the binaries contained in it) is minor version compatible with CUDA and will work dynamically linked with CUDA 12.X (X>=1).\n\nInstallation of the CUDA runtime and cuBLAS is allowed to the extent that minor version compatibility is maintained by excluding the `fix_cuda` extra.\n\nThis is useful when coexisting this package with a package that has a dependency on the CUDA Toolkit used at build time, such as Pytorch or Tensorflow.\n\nThe installation commands are as follows.\n\n```bash\n# install CUDA 12.X(X>=1) at the same time\npip install faiss-gpu-cu12\n```\n\nIf you install the `faiss-gpu-cuXX` package in this way, CUDA may be updated due to lock file updates, etc.\n\nPlease note that this may cause an error depending on the compatibility with the driver. (Basically, to use a new CUDA, the driver must also be updated).\n\n\n### Wheel for CUDA11\n\n`faiss-gpu-cu11` is a package built using CUDA Toolkit 11.8.\nThe following command will install faiss and the CUDA Runtime and cuBLAS for CUDA 11.8 used at build time.\n\n```bash\n# install CUDA 11.8 at the same time\npip install faiss-gpu-cu11[fix_cuda]\n```\n\n**Requirements**\n* OS: Linux\n  * arch: x86_64\n  * glibc >=2.28\n* Nvidia driver: >=R520 (specify `fix_cuda` extra during installation)\n* GPU architectures: Pascal\\~Hopper (Compute Capability: 6.0\\~9.0)\n\n**Advanced**\n\nSince CUDA 11.8 is the final version of the CUDA 11 series, the results are the same with or without the `fix_cuda` extras.\n\n```bash\n# install CUDA 11.X(X>=8) at the same time\npip install faiss-gpu-cu11\n```\n\n### Versioning rule\n\nPackages to be published from this repository are \"{A}.{B}.{C}.{D}\" format.\nA, B, and C are the versions of faiss used for builds.\nD is the version used to manage changes specific to this repository.\n\n## Usage\n\n### Build wheels\n\nYou can build `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels using [dagger](https://dagger.io).\n\n```bash\n# build wheel for CUDA 11.8\ndagger call build-gpu-wheels --cuda-major-version 11 --host-directory=.:build-view --output ./wheelhouse/gpu/cuda11\n\n# build wheel for CUDA 12.1\ndagger call build-gpu-wheels --cuda-major-version 12 --host-directory=.:build-view --output ./wheelhouse/gpu/cuda12\n```\n\nWhen executed, a wheel is created under \"{repository root}/wheelhouse/gpu/cuXX\".\n\n\n**Requirements**\n* OS: Linux\n  * arch: x86_64\n* Dagger: v0.11.2\n\n### Test wheels\n\nYou can test `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels using [dagger](https://dagger.io).\n\n\n```bash\n# test for faiss-gpu-cu11 wheels\n_EXPERIMENTAL_DAGGER_GPU_SUPPORT=1 dagger call test-gpu-wheels --cuda-major-version 11 --host-directory=.:test-view --wheel-directory=./wheelhouse/gpu/cuda11/\n\n# test for faiss-gpu-cu12 wheels\n_EXPERIMENTAL_DAGGER_GPU_SUPPORT=1 dagger call test-gpu-wheels --cuda-major-version 12 --host-directory=.:test-view --wheel-directory=./wheelhouse/gpu/cuda12/\n```\n\n**Requirements**\n* OS: Linux\n  * arch: x86_64\n* Dagger: v0.11.2\n* Nvidia container toolkit\n* Nvidia driver: >=R530\n\n\n### Build & Test wheels\n\nYou can build andtest `faiss-gpu-cu11` and `faiss-gpu-cu12` wheels using [dagger](https://dagger.io).\n\n```bash\n# test for faiss-gpu-cu11 & cu12 wheels\n_EXPERIMENTAL_DAGGER_GPU_SUPPORT=1 dagger call faiss-gpu-ci --cuda-major-versions 11 --cuda-major-versions 12 --host-directory=.:ci-view --output=./wheelhouse\n```\n\n**Requirements**\n* OS: Linux\n  * arch: x86_64\n* Dagger: v0.11.2\n* Nvidia container toolkit\n* Nvidia driver: >=R530\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A library for efficient similarity search and clustering of dense vectors.",
    "version": "1.8.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Di-Is/faiss-gpu-wheels"
    },
    "split_keywords": [
        "search",
        "nearest",
        "neighbors"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4074338df26a87a6bf024471c67aa699966727f5adcf3747677e1245e188ed5b",
                "md5": "cd8642ff5ccd76650f900964234765aa",
                "sha256": "495115cde2089056250fee794feba4f193a00020a0a15ffa8f8e619b44058a70"
            },
            "downloads": -1,
            "filename": "faiss_gpu_cu12-1.8.0.1-cp310-cp310-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "cd8642ff5ccd76650f900964234765aa",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 66117804,
            "upload_time": "2024-05-08T21:27:38",
            "upload_time_iso_8601": "2024-05-08T21:27:38.518526Z",
            "url": "https://files.pythonhosted.org/packages/40/74/338df26a87a6bf024471c67aa699966727f5adcf3747677e1245e188ed5b/faiss_gpu_cu12-1.8.0.1-cp310-cp310-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99d8b6dfdbe01dceed7c5f6cd267aee61b9c374f99ef50ca5289f7f5a0575bbd",
                "md5": "1cd4040f39fad597a4cc45bb8a16dcca",
                "sha256": "5412d7813480adc55d12c14c91691cd7437a94e96533f611f012fa5ef562ed8d"
            },
            "downloads": -1,
            "filename": "faiss_gpu_cu12-1.8.0.1-cp311-cp311-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1cd4040f39fad597a4cc45bb8a16dcca",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 66117922,
            "upload_time": "2024-05-08T21:27:56",
            "upload_time_iso_8601": "2024-05-08T21:27:56.410679Z",
            "url": "https://files.pythonhosted.org/packages/99/d8/b6dfdbe01dceed7c5f6cd267aee61b9c374f99ef50ca5289f7f5a0575bbd/faiss_gpu_cu12-1.8.0.1-cp311-cp311-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca1902906d21653b71d6280572b49e67420dc8ddd30ade0a2db107ee834b83b1",
                "md5": "996744a3159ab1e7614ef246a4c4568b",
                "sha256": "69b9cb935e0fcb55a3f3214c6e8aa0303c1a22eeeb3fefa621f9363a83123a2a"
            },
            "downloads": -1,
            "filename": "faiss_gpu_cu12-1.8.0.1-cp312-cp312-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "996744a3159ab1e7614ef246a4c4568b",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 66126374,
            "upload_time": "2024-05-08T21:28:13",
            "upload_time_iso_8601": "2024-05-08T21:28:13.217573Z",
            "url": "https://files.pythonhosted.org/packages/ca/19/02906d21653b71d6280572b49e67420dc8ddd30ade0a2db107ee834b83b1/faiss_gpu_cu12-1.8.0.1-cp312-cp312-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f560c5f6d5392c56aee7fb5385d11a562e3df3552fbea258b592e8940cf3d3b5",
                "md5": "284b552074cba069e3e663160d11fdeb",
                "sha256": "4c3b0f89e7f98552055eda094ebcb9e3a2bdc5ad9c1cd61c0152a7032ab3f87e"
            },
            "downloads": -1,
            "filename": "faiss_gpu_cu12-1.8.0.1-cp38-cp38-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "284b552074cba069e3e663160d11fdeb",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 66117806,
            "upload_time": "2024-05-08T21:28:31",
            "upload_time_iso_8601": "2024-05-08T21:28:31.244811Z",
            "url": "https://files.pythonhosted.org/packages/f5/60/c5f6d5392c56aee7fb5385d11a562e3df3552fbea258b592e8940cf3d3b5/faiss_gpu_cu12-1.8.0.1-cp38-cp38-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77ee4a35dd38b28829d8a6962989d2f1ede15f1f234c94a9b73b412a4fdcff16",
                "md5": "6f9baf7a9b8ad8c1778664d7fed0827c",
                "sha256": "73f870897600b12278217db8a92987c107105d16923c9bf4050d74fd93cb5293"
            },
            "downloads": -1,
            "filename": "faiss_gpu_cu12-1.8.0.1-cp39-cp39-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6f9baf7a9b8ad8c1778664d7fed0827c",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 66117786,
            "upload_time": "2024-05-08T21:28:46",
            "upload_time_iso_8601": "2024-05-08T21:28:46.896860Z",
            "url": "https://files.pythonhosted.org/packages/77/ee/4a35dd38b28829d8a6962989d2f1ede15f1f234c94a9b73b412a4fdcff16/faiss_gpu_cu12-1.8.0.1-cp39-cp39-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-08 21:27:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Di-Is",
    "github_project": "faiss-gpu-wheels",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "faiss-gpu-cu12"
}
        
Elapsed time: 0.23746s