From 4f1d5a10ea661c5bc2b716d9000cc50b4e73ca59 Mon Sep 17 00:00:00 2001 From: Nathan Stephens Date: Thu, 21 Sep 2023 09:02:43 -0700 Subject: [PATCH 1/3] Update README.md Updating installing instructions, bringing it into parity with the docs. Including reference to CUDA version with Conda. Pointing readers to the docs for building and installing from source. --- README.md | 48 ++++++++++++------------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 56d422b489..cbec30eefa 100755 --- a/README.md +++ b/README.md @@ -255,24 +255,28 @@ pairwise_distance(in1, in2, out=output, metric="euclidean") ## Installing -RAFT itself can be installed through conda, [CMake Package Manager (CPM)](https://github.com/cpm-cmake/CPM.cmake), pip, or by building the repository from source. Please refer to the [build instructions](docs/source/build.md) for more a comprehensive guide on installing and building RAFT and using it in downstream projects. - ### Conda The easiest way to install RAFT is through conda and several packages are provided. - `libraft-headers` RAFT headers -- `libraft` (optional) shared library of pre-compiled template instantiations and runtime APIs. +- `libraft` (optional) shared library containing pre-compiled template instantiations and runtime API. - `pylibraft` (optional) Python wrappers around RAFT algorithms and primitives. - `raft-dask` (optional) enables deployment of multi-node multi-GPU algorithms that use RAFT `raft::comms` in Dask clusters. -Use the following command to install all of the RAFT packages with conda (replace `rapidsai` with `rapidsai-nightly` to install more up-to-date but less stable nightly packages). `mamba` is preferred over the `conda` command. +Use the following command, depending on your CUDA version, to install all of the RAFT packages with conda (replace `rapidsai` with `rapidsai-nightly` to install more up-to-date but less stable nightly packages). `mamba` is preferred over the `conda` command. +```bash +# for CUDA 11.8 +mamba install -c rapidsai -c conda-forge -c nvidia raft-dask pylibraft cuda-version=11.8 +``` + ```bash -mamba install -c rapidsai -c conda-forge -c nvidia raft-dask pylibraft +# for CUDA 12.0 +mamba install -c rapidsai -c conda-forge -c nvidia raft-dask pylibraft cuda-version=12.0 ``` You can also install the conda packages individually using the `mamba` command above. -After installing RAFT, `find_package(raft COMPONENTS compiled distributed)` can be used in your CUDA/C++ cmake build to compile and/or link against needed dependencies in your raft target. `COMPONENTS` are optional and will depend on the packages installed. +After installing RAFT, `find_package(raft COMPONENTS nn distance)` can be used in your CUDA/C++ cmake build to compile and/or link against needed dependencies in your raft target. `COMPONENTS` are optional and will depend on the packages installed. ### Pip @@ -282,37 +286,9 @@ pip install pylibraft-cu11 --extra-index-url=https://pypi.nvidia.com pip install raft-dask-cu11 --extra-index-url=https://pypi.nvidia.com ``` -### CMake & CPM - -RAFT uses the [RAPIDS-CMake](https://github.com/rapidsai/rapids-cmake) library, which makes it easy to include in downstream cmake projects. RAPIDS-CMake provides a convenience layer around CPM. Please refer to [these instructions](https://github.com/rapidsai/rapids-cmake#installation) to install and use rapids-cmake in your project. - -#### Example Template Project - -You can find an [example RAFT](cpp/template/README.md) project template in the `cpp/template` directory, which demonstrates how to build a new application with RAFT or incorporate RAFT into an existing cmake project. - -#### CMake Targets - -Additional CMake targets can be made available by adding components in the table below to the `RAFT_COMPONENTS` list above, separated by spaces. The `raft::raft` target will always be available. RAFT headers require, at a minimum, the CUDA toolkit libraries and RMM dependencies. - -| Component | Target | Description | Base Dependencies | -|-------------|---------------------|----------------------------------------------------------|----------------------------------------| -| n/a | `raft::raft` | Full RAFT header library | CUDA toolkit, RMM, NVTX, CCCL, CUTLASS | -| compiled | `raft::compiled` | Pre-compiled template instantiations and runtime library | raft::raft | -| distributed | `raft::distributed` | Dependencies for `raft::comms` APIs | raft::raft, UCX, NCCL | - -### Source - -The easiest way to build RAFT from source is to use the `build.sh` script at the root of the repository: -1. Create an environment with the needed dependencies: -``` -mamba env create --name raft_dev_env -f conda/environments/all_cuda-118_arch-x86_64.yaml -mamba activate raft_dev_env -``` -``` -./build.sh raft-dask pylibraft libraft tests bench --compile-lib -``` +## Building and installing RAFT -The [build](docs/source/build.md) instructions contain more details on building RAFT from source and including it in downstream projects. You can also find a more comprehensive version of the above CPM code snippet the [Building RAFT C++ from source](docs/source/build.md#building-raft-c-from-source-in-cmake) section of the build instructions. +RAFT can be installed through [CMake Package Manager (CPM)](https://github.com/cpm-cmake/CPM.cmake). Please refer to the [build instructions](docs/source/build.md) for more a comprehensive guide on installing and building RAFT and using it in downstream projects. ## Folder Structure and Contents From b1e5523a949e8b2eb51f10d64562ffe2d64cfbe4 Mon Sep 17 00:00:00 2001 From: Nathan Stephens Date: Thu, 21 Sep 2023 09:05:06 -0700 Subject: [PATCH 2/3] Update README.md Updated header for building from source. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cbec30eefa..7ad23bddbb 100755 --- a/README.md +++ b/README.md @@ -286,7 +286,7 @@ pip install pylibraft-cu11 --extra-index-url=https://pypi.nvidia.com pip install raft-dask-cu11 --extra-index-url=https://pypi.nvidia.com ``` -## Building and installing RAFT +### Building and installing RAFT from source RAFT can be installed through [CMake Package Manager (CPM)](https://github.com/cpm-cmake/CPM.cmake). Please refer to the [build instructions](docs/source/build.md) for more a comprehensive guide on installing and building RAFT and using it in downstream projects. From 679e4aa51ecdbc853f6379cecc80c492385ec9c3 Mon Sep 17 00:00:00 2001 From: Nathan Stephens Date: Tue, 26 Sep 2023 09:23:14 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Fixing typos Co-authored-by: Bradley Dice --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7ad23bddbb..e4272a657d 100755 --- a/README.md +++ b/README.md @@ -258,8 +258,8 @@ pairwise_distance(in1, in2, out=output, metric="euclidean") ### Conda The easiest way to install RAFT is through conda and several packages are provided. -- `libraft-headers` RAFT headers -- `libraft` (optional) shared library containing pre-compiled template instantiations and runtime API. +- `libraft-headers` RAFT headers. +- `libraft` (optional) shared library containing pre-compiled template instantiations and runtime APIs. - `pylibraft` (optional) Python wrappers around RAFT algorithms and primitives. - `raft-dask` (optional) enables deployment of multi-node multi-GPU algorithms that use RAFT `raft::comms` in Dask clusters.