Skip to content

Commit 1881b4f

Browse files
authored
2412 remove libraft vss instantiations (#2498)
We are keeping random ball cover headers in RAFT for 24.12, and random ball cover depends on distances and brute-force. Because of this, we're going to leave all of the VSS headers in RAFT for the time being, and will remove them all in a future PR once RBC is formally migrated to cuVS. The tests, benchmarks, and instantiations for all of these APIs will be removed, though, so while the actual headers can still be used, they are no longer being tested and could fail without warning. I've also included a note to users in the README about this, stating to use at their own risk. Authors: - Corey J. Nolet (https://github.com/cjnolet) - Bradley Dice (https://github.com/bdice) Approvers: - Ben Frederickson (https://github.com/benfred) - Bradley Dice (https://github.com/bdice) URL: #2498
1 parent fccf33e commit 1881b4f

File tree

603 files changed

+90
-50080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

603 files changed

+90
-50080
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ jobs:
5252
branch: ${{ inputs.branch }}
5353
date: ${{ inputs.date }}
5454
sha: ${{ inputs.sha }}
55-
skip_upload_pkgs: libraft-template
5655
docs-build:
5756
if: github.ref_type == 'branch'
5857
needs: python-build

.github/workflows/pr.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,8 @@ jobs:
4343
- '!README.md'
4444
- '!docs/**'
4545
- '!img/**'
46-
- '!notebooks/**'
4746
- '!python/**'
4847
- '!thirdparty/LICENSES/**'
49-
test_notebooks:
50-
- '**'
51-
- '!.devcontainer/**'
52-
- '!.pre-commit-config.yaml'
53-
- '!CONTRIBUTING.md'
54-
- '!README.md'
55-
- '!thirdparty/LICENSES/**'
5648
test_python:
5749
- '**'
5850
- '!.devcontainer/**'
@@ -61,7 +53,6 @@ jobs:
6153
- '!README.md'
6254
- '!docs/**'
6355
- '!img/**'
64-
- '!notebooks/**'
6556
- '!thirdparty/LICENSES/**'
6657
checks:
6758
secrets: inherit

README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;RAFT: Reusable Accelerated Functions and Tools for Vector Search and More</div>
22

33
> [!IMPORTANT]
4-
> The vector search and clustering algorithms in RAFT are being migrated to a new library dedicated to vector search called [cuVS](https://github.com/rapidsai/cuvs). We will continue to support the vector search algorithms in RAFT during this move, but will no longer update them after the RAPIDS 24.06 (June) release. We plan to complete the migration by RAPIDS 24.10 (October) release and will be removing them altogether in the 24.12 (December) release.
4+
> The vector search and clustering algorithms in RAFT have been formally migrated to a new library dedicated to vector search called [cuVS](https://github.com/rapidsai/cuvs). The headers for the vector search and clustering algorithms in RAFT will remain for a bried period, but will no longer be tested, benchmarked, included in the pre-compiled libraft binary, or otherwise updated after the 24.12 (December 2024) release. We will be removing these headers altogether in a future release. It is strongly suggested to use cuVS for these routines, which include any headers in the `distance`, `neighbors`, `cluster` and `spatial` directories, and use the RAFT versions at your own risk.
55
66
![RAFT tech stack](img/raft-tech-stack-vss.png)
77

@@ -27,7 +27,6 @@
2727
- [RAFT Reference Documentation](https://docs.rapids.ai/api/raft/stable/): API Documentation.
2828
- [RAFT Getting Started](./docs/source/quick_start.md): Getting started with RAFT.
2929
- [Build and Install RAFT](./docs/source/build.md): Instructions for installing and building RAFT.
30-
- [Example Notebooks](./notebooks): Example jupyter notebooks
3130
- [RAPIDS Community](https://rapids.ai/community.html): Get help, contribute, and collaborate.
3231
- [GitHub repository](https://github.com/rapidsai/raft): Download the RAFT source code.
3332
- [Issue tracker](https://github.com/rapidsai/raft/issues): Report issues or request features.
@@ -120,13 +119,13 @@ auto metric = raft::distance::DistanceType::L2SqrtExpanded;
120119
raft::distance::pairwise_distance(handle, input.view(), input.view(), output.view(), metric);
121120
```
122121
123-
It's also possible to create `raft::device_mdspan` views to invoke the same API with raw pointers and shape information:
122+
It's also possible to create `raft::device_mdspan` views to invoke the same API with raw pointers and shape information. Take this example from the [NVIDIA cuVS](https://github.com/rapidsai/cuvs) library:
124123
125124
```c++
126125
#include <raft/core/device_resources.hpp>
127126
#include <raft/core/device_mdspan.hpp>
128127
#include <raft/random/make_blobs.cuh>
129-
#include <raft/distance/distance.cuh>
128+
#include <cuvs/distance/distance.hpp>
130129
131130
raft::device_resources handle;
132131
@@ -147,21 +146,21 @@ auto output_view = raft::make_device_matrix_view(output, n_samples, n_samples);
147146
148147
raft::random::make_blobs(handle, input_view, labels_view);
149148
150-
auto metric = raft::distance::DistanceType::L2SqrtExpanded;
151-
raft::distance::pairwise_distance(handle, input_view, input_view, output_view, metric);
149+
auto metric = cuvs::distance::DistanceType::L2SqrtExpanded;
150+
cuvs::distance::pairwise_distance(handle, input_view, input_view, output_view, metric);
152151
```
153152

154153

155154
### Python Example
156155

157156
The `pylibraft` package contains a Python API for RAFT algorithms and primitives. `pylibraft` integrates nicely into other libraries by being very lightweight with minimal dependencies and accepting any object that supports the `__cuda_array_interface__`, such as [CuPy's ndarray](https://docs.cupy.dev/en/stable/user_guide/interoperability.html#rmm). The number of RAFT algorithms exposed in this package is continuing to grow from release to release.
158157

159-
The example below demonstrates computing the pairwise Euclidean distances between CuPy arrays. Note that CuPy is not a required dependency for `pylibraft`.
158+
The example below demonstrates computing the pairwise Euclidean distances between CuPy arrays using the [NVIDIA cuVS](https://github.com/rapidsai/cuvs) library. Note that CuPy is not a required dependency for `pylibraft`.
160159

161160
```python
162161
import cupy as cp
163162

164-
from pylibraft.distance import pairwise_distance
163+
from cuvs.distance import pairwise_distance
165164

166165
n_samples = 5000
167166
n_features = 50
@@ -208,7 +207,7 @@ pylibraft.config.set_output_as(lambda device_ndarray: return device_ndarray.copy
208207
```python
209208
import cupy as cp
210209

211-
from pylibraft.distance import pairwise_distance
210+
from cuvs.distance import pairwise_distance
212211

213212
n_samples = 5000
214213
n_features = 50
@@ -230,7 +229,6 @@ RAFT's C++ and Python libraries can both be installed through Conda and the Pyth
230229

231230
The easiest way to install RAFT is through conda and several packages are provided.
232231
- `libraft-headers` C++ headers
233-
- `libraft` (optional) C++ shared library containing pre-compiled template instantiations and runtime API.
234232
- `pylibraft` (optional) Python library
235233
- `raft-dask` (optional) Python library for deployment of multi-node multi-GPU algorithms that use the RAFT `raft::comms` abstraction layer in Dask clusters.
236234

@@ -253,8 +251,6 @@ You can also install the conda packages individually using the `mamba` command a
253251
mamba install -c rapidsai -c conda-forge -c nvidia libraft libraft-headers cuda-version=12.5
254252
```
255253

256-
If installing the C++ APIs please see [using libraft](https://docs.rapids.ai/api/raft/nightly/using_libraft/) for more information on using the pre-compiled shared library. You can also refer to the [example C++ template project](https://github.com/rapidsai/raft/tree/branch-24.12/cpp/template) for a ready-to-go CMake configuration that you can drop into your project and build against installed RAFT development artifacts above.
257-
258254
### Installing Python through Pip
259255

260256
`pylibraft` and `raft-dask` both have experimental packages that can be [installed through pip](https://rapids.ai/pip.html#install):
@@ -263,12 +259,10 @@ pip install pylibraft-cu11 --extra-index-url=https://pypi.nvidia.com
263259
pip install raft-dask-cu11 --extra-index-url=https://pypi.nvidia.com
264260
```
265261

266-
These packages statically build RAFT's pre-compiled instantiations and so the C++ headers and pre-compiled shared library won't be readily available to use in your code.
262+
These packages statically build RAFT's pre-compiled instantiations and so the C++ headers won't be readily available to use in your code.
267263

268264
The [build instructions](https://docs.rapids.ai/api/raft/nightly/build/) 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++ and Python from source](https://docs.rapids.ai/api/raft/nightly/build/#building-c-and-python-from-source) section of the build instructions.
269265

270-
You can find an example [RAFT project template](cpp/template/README.md) in the `cpp/template` directory, which demonstrates how to build a new application with RAFT or incorporate RAFT into an existing CMake project.
271-
272266

273267
## Contributing
274268

@@ -282,7 +276,7 @@ When citing RAFT generally, please consider referencing this Github project.
282276
title={Rapidsai/raft: RAFT contains fundamental widely-used algorithms and primitives for data science, Graph and machine learning.},
283277
url={https://github.com/rapidsai/raft},
284278
journal={GitHub},
285-
publisher={Nvidia RAPIDS},
279+
publisher={NVIDIA RAPIDS},
286280
author={Rapidsai},
287281
year={2022}
288282
}

build.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ARGS=$*
1818
# scripts, and that this script resides in the repo dir!
1919
REPODIR=$(cd $(dirname $0); pwd)
2020

21-
VALIDARGS="clean libraft pylibraft raft-dask docs tests template bench-prims clean --uninstall -v -g -n --compile-lib --compile-static-lib --allgpuarch --no-nvtx --show_depr_warn --incl-cache-stats --time -h"
21+
VALIDARGS="clean libraft pylibraft raft-dask docs tests bench-prims clean --uninstall -v -g -n --compile-lib --compile-static-lib --allgpuarch --no-nvtx --show_depr_warn --incl-cache-stats --time -h"
2222
HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<tool>] [--limit-tests=<targets>] [--limit-bench-prims=<targets>] [--build-metrics=<filename>]
2323
where <target> is:
2424
clean - remove all existing build artifacts and configuration (start over)
@@ -29,7 +29,6 @@ HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<to
2929
docs - build the documentation
3030
tests - build the tests
3131
bench-prims - build micro-benchmarks for primitives
32-
template - build the example RAFT application template
3332
3433
and <flag> is:
3534
-v - verbose build mode
@@ -73,8 +72,8 @@ INSTALL_TARGET=install
7372
BUILD_REPORT_METRICS=""
7473
BUILD_REPORT_INCL_CACHE_STATS=OFF
7574

76-
TEST_TARGETS="CLUSTER_TEST;CORE_TEST;DISTANCE_TEST;LABEL_TEST;LINALG_TEST;MATRIX_TEST;NEIGHBORS_TEST;NEIGHBORS_ANN_BRUTE_FORCE_TEST;NEIGHBORS_ANN_CAGRA_TEST;NEIGHBORS_ANN_NN_DESCENT_TEST;NEIGHBORS_ANN_IVF_TEST;RANDOM_TEST;SOLVERS_TEST;SPARSE_TEST;SPARSE_DIST_TEST;SPARSE_NEIGHBORS_TEST;STATS_TEST;UTILS_TEST"
77-
BENCH_TARGETS="CLUSTER_BENCH;CORE_BENCH;NEIGHBORS_BENCH;DISTANCE_BENCH;LINALG_BENCH;MATRIX_BENCH;SPARSE_BENCH;RANDOM_BENCH"
75+
TEST_TARGETS="CORE_TEST;LABEL_TEST;LINALG_TEST;MATRIX_TEST;RANDOM_TEST;SOLVERS_TEST;SPARSE_TEST;STATS_TEST;UTILS_TEST"
76+
BENCH_TARGETS="CORE_BENCH;LINALG_BENCH;MATRIX_BENCH;SPARSE_BENCH;RANDOM_BENCH"
7877

7978
CACHE_ARGS=""
8079
NVTX=ON
@@ -480,11 +479,3 @@ if hasArg docs; then
480479
sphinx-build -b html source _html
481480
fi
482481

483-
################################################################################
484-
# Initiate build for example RAFT application template (if needed)
485-
486-
if hasArg template; then
487-
pushd ${REPODIR}/cpp/template
488-
./build.sh
489-
popd
490-
fi

conda/recipes/libraft/build_libraft_template.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

conda/recipes/libraft/meta.yaml

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -322,57 +322,3 @@ outputs:
322322
home: https://rapids.ai/
323323
license: Apache-2.0
324324
summary: libraft tests
325-
- name: libraft-template
326-
version: {{ version }}
327-
script: build_libraft_template.sh
328-
build:
329-
script_env: *script_env
330-
number: {{ GIT_DESCRIBE_NUMBER }}
331-
string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
332-
ignore_run_exports_from:
333-
{% if cuda_major == "11" %}
334-
- {{ compiler('cuda11') }}
335-
{% else %}
336-
- {{ compiler('cuda') }}
337-
- cuda-cudart-dev
338-
- libcublas-dev
339-
{% endif %}
340-
requirements:
341-
build:
342-
- {{ compiler('c') }}
343-
- {{ compiler('cxx') }}
344-
{% if cuda_major == "11" %}
345-
- {{ compiler('cuda11') }} ={{ cuda_version }}
346-
{% else %}
347-
- {{ compiler('cuda') }}
348-
{% endif %}
349-
- cuda-version ={{ cuda_version }}
350-
- cmake {{ cmake_version }}
351-
- ninja
352-
- {{ stdlib("c") }}
353-
host:
354-
- {{ pin_subpackage('libraft', exact=True) }}
355-
- {{ pin_subpackage('libraft-headers', exact=True) }}
356-
- cuda-version ={{ cuda_version }}
357-
{% if cuda_major == "11" %}
358-
- cuda-profiler-api {{ cuda11_cuda_profiler_api_run_version }}
359-
- libcublas {{ cuda11_libcublas_host_version }}
360-
- libcublas-dev {{ cuda11_libcublas_host_version }}
361-
{% else %}
362-
- cuda-cudart-dev
363-
- cuda-profiler-api
364-
- libcublas-dev
365-
{% endif %}
366-
run:
367-
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
368-
{% if cuda_major == "11" %}
369-
- cudatoolkit
370-
{% else %}
371-
- cuda-cudart
372-
- libcublas
373-
{% endif %}
374-
- {{ pin_subpackage('libraft', exact=True) }}
375-
about:
376-
home: https://rapids.ai/
377-
license: Apache-2.0
378-
summary: libraft template

0 commit comments

Comments
 (0)