Skip to content

Commit 8e1b359

Browse files
ItsPittfacebook-github-bot
authored andcommitted
Adding Documentation for ROCm (facebookresearch#3856)
Summary: Adding documentation for ROCm in README.md and INSTALL.md Pull Request resolved: facebookresearch#3856 Reviewed By: ramilbakhshyiev Differential Revision: D62774430 Pulled By: mnorris11 fbshipit-source-id: c5692be5bb6d5a6876ad168edf1855ed8ccfd26b
1 parent 03123ef commit 8e1b359

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

INSTALL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ $ conda install -c pytorch -c nvidia faiss-gpu=1.8.0
1919

2020
# GPU(+CPU) version with NVIDIA RAFT
2121
$ conda install -c pytorch -c nvidia -c rapidsai -c conda-forge faiss-gpu-raft=1.8.0
22+
23+
# GPU(+CPU) version using AMD ROCm not yet available
2224
```
2325

2426
For faiss-gpu, the nvidia channel is required for CUDA, which is not
@@ -37,6 +39,8 @@ $ conda install -c pytorch/label/nightly -c nvidia faiss-gpu=1.8.0
3739

3840
# GPU(+CPU) version with NVIDIA RAFT
3941
conda install -c pytorch -c nvidia -c rapidsai -c conda-forge faiss-gpu-raft=1.8.0 pytorch pytorch-cuda numpy
42+
43+
# GPU(+CPU) version using AMD ROCm not yet available
4044
```
4145
In the above commands, pytorch-cuda=11 or pytorch-cuda=12 would select a specific CUDA version, if it’s required.
4246

@@ -63,6 +67,8 @@ $ conda install -c conda-forge faiss-cpu
6367

6468
# GPU version
6569
$ conda install -c conda-forge faiss-gpu
70+
71+
# AMD ROCm version not yet available
6672
```
6773

6874
You can tell which channel your conda packages come from by using `conda list`.
@@ -87,6 +93,8 @@ The optional requirements are:
8793
- for GPU indices:
8894
- nvcc,
8995
- the CUDA toolkit,
96+
- for AMD GPUs:
97+
- AMD ROCm,
9098
- for the python bindings:
9199
- python 3,
92100
- numpy,
@@ -137,6 +145,10 @@ Several options can be passed to CMake, among which:
137145
- `-DCMAKE_CUDA_ARCHITECTURES="75;72"` for specifying which GPU architectures
138146
to build against (see [CUDA docs](https://developer.nvidia.com/cuda-gpus) to
139147
determine which architecture(s) you should pick),
148+
- `-DFAISS_ENABLE_ROCM=ON` in order to enable building GPU indices for AMD GPUs.
149+
The hipify script must be executed before using this option.
150+
Invoke `./faiss/gpu/hipify.sh` to execute. `-DFAISS_ENABLE_GPU` must be `ON`
151+
when using this option. (possible values are `ON` and `OFF`),
140152
- python-related options:
141153
- `-DPython_EXECUTABLE=/path/to/python3.7` in order to build a python
142154
interface for a different python than the default one (see

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The GPU implementation can accept input from either CPU or GPU memory. On a serv
1616

1717
## Installing
1818

19-
Faiss comes with precompiled libraries for Anaconda in Python, see [faiss-cpu](https://anaconda.org/pytorch/faiss-cpu) and [faiss-gpu](https://anaconda.org/pytorch/faiss-gpu). The library is mostly implemented in C++, the only dependency is a [BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) implementation. Optional GPU support is provided via CUDA, and the Python interface is also optional. It compiles with cmake. See [INSTALL.md](INSTALL.md) for details.
19+
Faiss comes with precompiled libraries for Anaconda in Python, see [faiss-cpu](https://anaconda.org/pytorch/faiss-cpu) and [faiss-gpu](https://anaconda.org/pytorch/faiss-gpu). The library is mostly implemented in C++, the only dependency is a [BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) implementation. Optional GPU support is provided via CUDA or AMD ROCm, and the Python interface is also optional. It compiles with cmake. See [INSTALL.md](INSTALL.md) for details.
2020

2121
## How Faiss works
2222

0 commit comments

Comments
 (0)