diff --git a/README.md b/README.md index 47b2bf93ac..2c7f83ad02 100755 --- a/README.md +++ b/README.md @@ -1,19 +1,20 @@ -#
 RAFT: Reusable Accelerated Functions and Tools
+#
 RAFT: Reusable Accelerated Functions and Tools for Vector Search and More
-![Navigating the canyons of accelerated possibilities](img/raft.png) +![RAFT tech stack](img/raft-tech-stack-vss.png) ## Resources - [RAFT Reference Documentation](https://docs.rapids.ai/api/raft/stable/): API Documentation. - [RAFT Getting Started](./docs/source/quick_start.md): Getting started with RAFT. - [Build and Install RAFT](./docs/source/build.md): Instructions for installing and building RAFT. +- [Example Notebooks](./notebooks): Example jupyer notebooks - [RAPIDS Community](https://rapids.ai/community.html): Get help, contribute, and collaborate. - [GitHub repository](https://github.com/rapidsai/raft): Download the RAFT source code. - [Issue tracker](https://github.com/rapidsai/raft/issues): Report issues or request features. ## Overview -RAFT contains fundamental widely-used algorithms and primitives for data science and machine learning. The algorithms are CUDA-accelerated and form building blocks for rapidly composing analytics. +RAFT contains fundamental widely-used algorithms and primitives for machine learning and information retrieval. The algorithms are CUDA-accelerated and form building blocks for more easily writing high performance applications. By taking a primitives-based approach to algorithm development, RAFT - accelerates algorithm construction time @@ -22,16 +23,16 @@ By taking a primitives-based approach to algorithm development, RAFT While not exhaustive, the following general categories help summarize the accelerated functions in RAFT: ##### -| Category | Examples | -| --- | --- | -| **Data Formats** | sparse & dense, conversions, data generation | +| Category | Examples | +| --- |-----------------------------------------------------------------------------------------------------------------------------------| +| **Data Formats** | sparse & dense, conversions, data generation | | **Dense Operations** | linear algebra, matrix and vector operations, reductions, slicing, norms, factorization, least squares, svd & eigenvalue problems | -| **Sparse Operations** | linear algebra, eigenvalue problems, slicing, norms, reductions, factorization, symmetrization, components & labeling | -| **Spatial** | pairwise distances, nearest neighbors, neighborhood graph construction | -| **Basic Clustering** | spectral clustering, hierarchical clustering, k-means | -| **Solvers** | combinatorial optimization, iterative solvers | -| **Statistics** | sampling, moments and summary statistics, metrics | -| **Tools & Utilities** | common utilities for developing CUDA applications, multi-node multi-gpu infrastructure | +| **Sparse Operations** | linear algebra, eigenvalue problems, slicing, norms, reductions, factorization, symmetrization, components & labeling | +| **Spatial** | pairwise distances, nearest neighbors and vector search, neighborhood graph construction | +| **Basic Clustering** | spectral clustering, hierarchical clustering, k-means | +| **Solvers** | combinatorial optimization, iterative solvers | +| **Statistics** | sampling, moments and summary statistics, metrics | +| **Tools & Utilities** | common utilities for developing CUDA applications, multi-node multi-gpu infrastructure | RAFT is a C++ header-only template library with an optional shared library that @@ -44,6 +45,29 @@ In addition being a C++ library, RAFT also provides 2 Python libraries: ![RAFT is a C++ header-only template library with optional shared library and lightweight Python wrappers](img/arch.png) +## Use cases + +### Vector Similarity Search + +RAFT contains state-of-the-art implementations of approximate nearest neighbors algorithms on the GPU that enable vector similarity search. Vector similarity search applications often require fast online queries done one-at-a-time and RAFT's graph-based [CAGRA](https://docs.rapids.ai/api/raft/nightly/pylibraft_api/neighbors/#cagra) algorithm outperforms the state-of-the art on the CPU (hierarchical navigable small-world graph or HNSW). + +In addition to CAGRA, RAFT contains other state-of-the-art GPU-accelerated implementations of popular algorithms for vector similarity search, such as [IVF-Flat](https://docs.rapids.ai/api/raft/nightly/pylibraft_api/neighbors/#ivf-flat) and [IVF-PQ](https://docs.rapids.ai/api/raft/nightly/pylibraft_api/neighbors/#ivf-pq) algorithms originally popularized by the [FAISS](https://github.com/facebookresearch/faiss) library. + +### Information Retrieval + +RAFT also contains a catalog of reusable primitives for composing algorithms that require fast neighborhood computations, such as + +1. Computing distances between vectors and computing kernel gramm matrices +2. Performing ball radius queries for constructing epsilon neighborhoods +3. Clustering points to partition a space for smaller and faster searches +4. Constructing neighborhood "connectivities" graphs from dense vectors + +As an example, computations such as the above list are critical for information retrieval, data mining, and machine learning applications such as clustering, manifold learning, and dimensionality reduction. + +## Is RAFT right for me? + +RAFT contains low level primitives for accelerating applications and workflows. Data source providers and application developers may find specific tools -- like ANN algorithms -- very useful. RAFT is not intended to be used directly by data scientists for discovery and experimentation. For data science tools, please see the [RAPIDS website](https://rapids.ai/). + ## Getting started ### RAPIDS Memory Manager (RMM) @@ -323,3 +347,14 @@ If citing the sparse pairwise distances API, please consider using the following year={2021} } ``` + +If citing the single-linkage agglomerative clustering APIs, please consider the following bibtex: +```bibtex +@misc{nolet2023cuslink, + title={cuSLINK: Single-linkage Agglomerative Clustering on the GPU}, + author={Corey J. Nolet and Divye Gala and Alex Fender and Mahesh Doijade and Joe Eaton and Edward Raff and John Zedlewski and Brad Rees and Tim Oates}, + year={2023}, + eprint={2306.16354}, + archivePrefix={arXiv}, + primaryClass={cs.LG} +} \ No newline at end of file diff --git a/cpp/doxygen/Doxyfile b/cpp/doxygen/Doxyfile index 374d55da75..09353125b9 100644 --- a/cpp/doxygen/Doxyfile +++ b/cpp/doxygen/Doxyfile @@ -893,11 +893,8 @@ EXCLUDE = ../include/raft/sparse/linalg/symmetrize.hpp \ ../include/raft/util/device_utils.cuh \ ../include/raft/core/error.hpp \ ../include/raft/core/handle.hpp \ - ../include/raft/util/integer_utils.hpp \ - ../include/raft/core/interruptible.hpp \ - ../include/raft/core/mdarray.hpp \ + ../include/raft/util/integer_utils.hpp ../include/raft/util/pow2_utils.cuh \ - ../include/raft/core/span.hpp \ ../include/raft/util/vectorized.cuh \ ../include/raft/raft.hpp \ ../include/raft/core/cudart_utils.hpp \ diff --git a/cpp/include/raft/core/coo_matrix.hpp b/cpp/include/raft/core/coo_matrix.hpp index a5f7c05493..52ac69f163 100644 --- a/cpp/include/raft/core/coo_matrix.hpp +++ b/cpp/include/raft/core/coo_matrix.hpp @@ -23,6 +23,11 @@ namespace raft { +/** + * \defgroup coo_matrix COO Matrix + * @{ + */ + template class coordinate_structure_t : public sparse_structure { public: @@ -289,4 +294,7 @@ class coo_matrix } } }; + +/** @} */ + } // namespace raft \ No newline at end of file diff --git a/cpp/include/raft/core/csr_matrix.hpp b/cpp/include/raft/core/csr_matrix.hpp index 95d09d3eea..1113cc2023 100644 --- a/cpp/include/raft/core/csr_matrix.hpp +++ b/cpp/include/raft/core/csr_matrix.hpp @@ -22,6 +22,11 @@ namespace raft { +/** + * \defgroup csr_matrix CSR Matrix + * @{ + */ + template class compressed_structure_t : public sparse_structure { public: @@ -301,4 +306,7 @@ class csr_matrix } } }; + +/** @} */ + } // namespace raft \ No newline at end of file diff --git a/cpp/include/raft/core/device_coo_matrix.hpp b/cpp/include/raft/core/device_coo_matrix.hpp index 9ab5160ef5..41da605ff0 100644 --- a/cpp/include/raft/core/device_coo_matrix.hpp +++ b/cpp/include/raft/core/device_coo_matrix.hpp @@ -23,6 +23,11 @@ namespace raft { +/** + * \defgroup device_coo_matrix Device COO Matrix + * @{ + */ + /** * Specialization for a sparsity-preserving coordinate structure view which uses device memory */ @@ -388,4 +393,6 @@ auto make_device_coordinate_structure_view(raft::device_span rows, return device_coordinate_structure_view(rows, cols, n_rows, n_cols); } +/** @} */ + }; // namespace raft \ No newline at end of file diff --git a/cpp/include/raft/core/device_csr_matrix.hpp b/cpp/include/raft/core/device_csr_matrix.hpp index df186cc194..da4ac117b1 100644 --- a/cpp/include/raft/core/device_csr_matrix.hpp +++ b/cpp/include/raft/core/device_csr_matrix.hpp @@ -25,6 +25,11 @@ namespace raft { +/** + * \defgroup device_csr_matrix Device CSR Matrix Types + * @{ + */ + /** * Specialization for a sparsity-preserving compressed structure view which uses device memory */ @@ -414,4 +419,6 @@ auto make_device_compressed_structure_view(raft::device_span indptr, return device_compressed_structure_view(indptr, indices, n_cols); } +/** @} */ + }; // namespace raft \ No newline at end of file diff --git a/cpp/include/raft/core/host_coo_matrix.hpp b/cpp/include/raft/core/host_coo_matrix.hpp index 9e6aacfa48..7a216dc8a2 100644 --- a/cpp/include/raft/core/host_coo_matrix.hpp +++ b/cpp/include/raft/core/host_coo_matrix.hpp @@ -22,6 +22,11 @@ namespace raft { +/** + * \defgroup host_coo_matrix Host COO Matrix + * @{ + */ + /** * Specialization for a sparsity-preserving coordinate structure view which uses host memory */ @@ -386,4 +391,6 @@ auto make_host_coordinate_structure_view(raft::host_span rows, return host_coordinate_structure_view(rows, cols, n_rows, n_cols); } +/** @} */ + }; // namespace raft \ No newline at end of file diff --git a/cpp/include/raft/core/host_csr_matrix.hpp b/cpp/include/raft/core/host_csr_matrix.hpp index 4b4df823db..f32ff1dc00 100644 --- a/cpp/include/raft/core/host_csr_matrix.hpp +++ b/cpp/include/raft/core/host_csr_matrix.hpp @@ -24,6 +24,11 @@ namespace raft { +/** + * \defgroup host_csr_matrix Host CSR Matrix + * @{ + */ + /** * Specialization for a sparsity-preserving compressed structure view which uses host memory */ @@ -415,4 +420,6 @@ auto make_host_compressed_structure_view(raft::host_span indptr, return host_compressed_structure_view(indptr, indices, n_cols); } +/** @} */ + }; // namespace raft \ No newline at end of file diff --git a/cpp/include/raft/core/host_span.hpp b/cpp/include/raft/core/host_span.hpp index 8b37414e76..36978dfca4 100644 --- a/cpp/include/raft/core/host_span.hpp +++ b/cpp/include/raft/core/host_span.hpp @@ -21,7 +21,7 @@ namespace raft { /** - * @defgroup device_span one-dimensional device span type + * @defgroup host_span one-dimensional device span type * @{ */ diff --git a/cpp/include/raft/core/interruptible.hpp b/cpp/include/raft/core/interruptible.hpp index f7351c3411..10ab22f820 100644 --- a/cpp/include/raft/core/interruptible.hpp +++ b/cpp/include/raft/core/interruptible.hpp @@ -303,7 +303,7 @@ class interruptible { }; /** - * @} + * @} // end doxygen group interruptible */ } // namespace raft diff --git a/cpp/include/raft/core/math.hpp b/cpp/include/raft/core/math.hpp index 50d5d85566..56a8d78926 100644 --- a/cpp/include/raft/core/math.hpp +++ b/cpp/include/raft/core/math.hpp @@ -30,7 +30,7 @@ namespace raft { /** - * @defgroup Absolute Absolute value + * @defgroup math_functions Mathematical Functions * @{ */ template @@ -55,12 +55,7 @@ constexpr RAFT_INLINE_FUNCTION auto abs(T x) { return x < T{0} ? -x : x; } -/** @} */ -/** - * @defgroup Trigonometry Trigonometry functions - * @{ - */ /** Inverse cosine */ template RAFT_INLINE_FUNCTION auto acos(T x) @@ -199,12 +194,7 @@ RAFT_INLINE_FUNCTION auto tanh(T x) return std::tanh(x); #endif } -/** @} */ -/** - * @defgroup Exponential Exponential and logarithm - * @{ - */ /** Exponential function */ template && @@ -286,12 +276,9 @@ log(T x) #endif } #endif -/** @} */ /** - * @defgroup Maximum Maximum of two or more values. - * - * The CUDA Math API has overloads for all combinations of float/double. We provide similar + * @brief The CUDA Math API has overloads for all combinations of float/double. We provide similar * functionality while wrapping around std::max, which only supports arguments of the same type. * However, though the CUDA Math API supports combinations of unsigned and signed integers, this is * very error-prone so we do not support that and require the user to cast instead. (e.g the max of @@ -408,10 +395,8 @@ max(T x) } #endif -/** @} */ - /** - * @defgroup Minimum Minimum of two or more values. + * @brief Minimum Minimum of two or more values. * * The CUDA Math API has overloads for all combinations of float/double. We provide similar * functionality while wrapping around std::min, which only supports arguments of the same type. @@ -530,12 +515,7 @@ min(T x) #endif } #endif -/** @} */ -/** - * @defgroup Power Power and root functions - * @{ - */ /** Power */ template RAFT_INLINE_FUNCTION auto pow(T1 x, T2 y) @@ -587,7 +567,6 @@ sqrt(T x) #endif } #endif -/** @} */ /** Sign */ template @@ -596,4 +575,6 @@ RAFT_INLINE_FUNCTION auto sgn(T val) -> int return (T(0) < val) - (val < T(0)); } +/** @} */ + } // namespace raft diff --git a/cpp/include/raft/core/mdarray.hpp b/cpp/include/raft/core/mdarray.hpp index 7bd5a28a0c..2cdeb36fc8 100644 --- a/cpp/include/raft/core/mdarray.hpp +++ b/cpp/include/raft/core/mdarray.hpp @@ -34,7 +34,7 @@ namespace raft { /** - * @defgroup mdarray multi-dimensional memory-owning type + * @defgroup mdarray_apis multi-dimensional memory-owning type * @{ */ @@ -343,9 +343,7 @@ class mdarray container_type c_; }; -/** - * @} - */ +/** @} */ /** * @defgroup mdarray_reshape Row- or Col-norm computation @@ -387,8 +385,6 @@ auto reshape(const array_interface_type& mda, extents new return reshape(mda.view(), new_shape); } -/** - * }@ - */ +/** @} */ } // namespace raft diff --git a/cpp/include/raft/core/mdspan.hpp b/cpp/include/raft/core/mdspan.hpp index e87c76d82d..f1a1adb916 100644 --- a/cpp/include/raft/core/mdspan.hpp +++ b/cpp/include/raft/core/mdspan.hpp @@ -270,6 +270,13 @@ auto reshape(mdspan_type mds, extents new_shape) new_shape); } +/* @} */ + +/** + * @defgroup mdspan_unravel Unravel mdspan + * @{ + */ + /** * \brief Turns linear index into coordinate. Similar to numpy unravel_index. * @@ -303,9 +310,7 @@ RAFT_INLINE_FUNCTION auto unravel_index(Idx idx, } } -/** - * @} - */ +/** @} */ /** * @brief Const accessor specialization for default_accessor @@ -337,6 +342,11 @@ accessor_of_const(host_device_accessor mds) mds.data_handle(), mds.mapping(), acc_c}; } +/** @} */ + } // namespace raft diff --git a/cpp/include/raft/core/mdspan_types.hpp b/cpp/include/raft/core/mdspan_types.hpp index 07c69f472c..62f95b6afc 100644 --- a/cpp/include/raft/core/mdspan_types.hpp +++ b/cpp/include/raft/core/mdspan_types.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,18 +24,13 @@ using std::experimental::dynamic_extent; using std::experimental::extents; /** - * @defgroup C-Contiguous layout for mdarray and mdspan. Implies row-major and contiguous memory. + * @defgroup mdspan_layout C- and F-contiguous mdspan layouts * @{ */ using std::experimental::layout_right; using layout_c_contiguous = layout_right; using row_major = layout_right; -/** @} */ -/** - * @defgroup F-Contiguous layout for mdarray and mdspan. Implies column-major and contiguous memory. - * @{ - */ using std::experimental::layout_left; using layout_f_contiguous = layout_left; using col_major = layout_left; diff --git a/cpp/include/raft/core/resource/device_memory_resource.hpp b/cpp/include/raft/core/resource/device_memory_resource.hpp index af684df747..9aa9e4fb85 100644 --- a/cpp/include/raft/core/resource/device_memory_resource.hpp +++ b/cpp/include/raft/core/resource/device_memory_resource.hpp @@ -29,6 +29,12 @@ #include namespace raft::resource { + +/** + * \defgroup device_memory_resource Device memory resources + * @{ + */ + class limiting_memory_resource : public resource { public: limiting_memory_resource(std::shared_ptr mr, @@ -235,4 +241,6 @@ inline void set_workspace_to_global_resource( workspace_resource_factory::default_plain_resource(), allocation_limit, std::nullopt)); }; +/** @} */ + } // namespace raft::resource diff --git a/cpp/include/raft/core/resource/sub_comms.hpp b/cpp/include/raft/core/resource/sub_comms.hpp index 7070b61c54..11d2aed1e0 100644 --- a/cpp/include/raft/core/resource/sub_comms.hpp +++ b/cpp/include/raft/core/resource/sub_comms.hpp @@ -43,7 +43,7 @@ class sub_comms_resource_factory : public resource_factory { }; /** - * @defgroup resource_subcomms Subcommunicator resource functions + * @defgroup resource_sub_comms Subcommunicator resource functions * @{ */ diff --git a/cpp/include/raft/core/span.hpp b/cpp/include/raft/core/span.hpp index 22906580de..d77e0fcb40 100644 --- a/cpp/include/raft/core/span.hpp +++ b/cpp/include/raft/core/span.hpp @@ -280,7 +280,6 @@ auto as_writable_bytes(span s) noexcept return {reinterpret_cast(s.data()), s.size_bytes()}; } -/** - * @} - */ +/* @} */ + } // namespace raft diff --git a/cpp/include/raft/core/sparse_types.hpp b/cpp/include/raft/core/sparse_types.hpp index a1432c9eb6..55da3037a9 100644 --- a/cpp/include/raft/core/sparse_types.hpp +++ b/cpp/include/raft/core/sparse_types.hpp @@ -22,6 +22,11 @@ namespace raft { +/** + * \defgroup sparse_types Sparse API vocabulary + * @{ + */ + enum SparsityType { OWNING, PRESERVING }; /** @@ -214,4 +219,7 @@ class sparse_matrix { container_policy_type cp_; container_type c_elements_; }; + +/* @} */ + } // namespace raft \ No newline at end of file diff --git a/cpp/include/raft/core/temporary_device_buffer.hpp b/cpp/include/raft/core/temporary_device_buffer.hpp index fcb63f169c..358eeab861 100644 --- a/cpp/include/raft/core/temporary_device_buffer.hpp +++ b/cpp/include/raft/core/temporary_device_buffer.hpp @@ -27,7 +27,7 @@ namespace raft { /** - * \defgroup TemporaryDeviceBuffer `raft::temporary_device_buffer` and associated factories + * \defgroup temporary_device_buffer `raft::temporary_device_buffer` * @{ */ @@ -137,6 +137,13 @@ class temporary_device_buffer { int device_id_; }; +/**@}*/ + +/** + * \defgroup temporary_device_buffer_factories Temporary device buffer factories + * @{ + */ + /** * @brief Factory to create a `raft::temporary_device_buffer` * diff --git a/docs/source/cpp_api/core.rst b/docs/source/cpp_api/core.rst index c4728337a0..7e69f92948 100644 --- a/docs/source/cpp_api/core.rst +++ b/docs/source/cpp_api/core.rst @@ -19,4 +19,5 @@ expose in public APIs. core_kvp.rst core_nvtx.rst core_interruptible.rst - core_operators.rst \ No newline at end of file + core_operators.rst + core_math.rst \ No newline at end of file diff --git a/docs/source/cpp_api/core_math.rst b/docs/source/cpp_api/core_math.rst new file mode 100644 index 0000000000..681bf02e66 --- /dev/null +++ b/docs/source/cpp_api/core_math.rst @@ -0,0 +1,18 @@ +Mathematical Functions +====================== + +.. role:: py(code) + :language: c++ + :class: highlight + + +The math functions APIs guarantee both CUDA and CPU compatibility, making it more straightforward to write `__host__ __device__` functions without being concerned whether the underlying intrinsics will build and work. + +``#include `` + +namespace *raft::core* + +.. doxygengroup:: math_functions + :project: RAFT + :members: + :content-only: diff --git a/docs/source/cpp_api/core_resources.rst b/docs/source/cpp_api/core_resources.rst index 4f1dd4e5a4..e3d402d6af 100644 --- a/docs/source/cpp_api/core_resources.rst +++ b/docs/source/cpp_api/core_resources.rst @@ -143,7 +143,7 @@ Device Memory Resource namespace *raft::resource* - .. doxygengroup:: resource_memory_resource + .. doxygengroup:: device_memory_resource :project: RAFT :members: :content-only: diff --git a/docs/source/cpp_api/mdspan_mdarray.rst b/docs/source/cpp_api/mdspan_mdarray.rst index e14fe5a9e3..bcc2254204 100644 --- a/docs/source/cpp_api/mdspan_mdarray.rst +++ b/docs/source/cpp_api/mdspan_mdarray.rst @@ -7,7 +7,7 @@ mdarray: Multi-dimensional Owning Container ``#include `` -.. doxygengroup:: mdarray +.. doxygengroup:: mdarray_apis :project: RAFT :members: :content-only: diff --git a/docs/source/cpp_api/mdspan_mdspan.rst b/docs/source/cpp_api/mdspan_mdspan.rst index 619150f538..6011a9f103 100644 --- a/docs/source/cpp_api/mdspan_mdspan.rst +++ b/docs/source/cpp_api/mdspan_mdspan.rst @@ -19,11 +19,15 @@ mdspan: Multi-dimensional Non-owning View .. doxygenfunction:: raft::make_strided_layout(Extents extents, Strides strides) :project: RAFT -.. doxygenfunction:: raft::unravel_index +.. doxygengroup:: mdspan_unravel :project: RAFT + :members: + :content-only: -.. doxygenfunction:: raft::make_const_mdspan(mdspan_type mds) +.. doxygengroup:: mdspan_make_const :project: RAFT + :members: + :content-only: Device Vocabulary diff --git a/docs/source/cpp_api/mdspan_representation.rst b/docs/source/cpp_api/mdspan_representation.rst index f514cf38e0..386e6f14e9 100644 --- a/docs/source/cpp_api/mdspan_representation.rst +++ b/docs/source/cpp_api/mdspan_representation.rst @@ -8,14 +8,12 @@ Multi-dimensional Representation Data Layouts ------------- -``#include `` - -.. doxygentypedef:: raft::row_major - :project: RAFT +``#include `` -.. doxygentypedef:: raft::col_major +.. doxygengroup:: mdspan_layout :project: RAFT - + :members: + :content-only: Shapes ------ diff --git a/docs/source/cpp_api/mdspan_temporary_device_buffer.rst b/docs/source/cpp_api/mdspan_temporary_device_buffer.rst index 90d08ac5bb..8c6fdd2a9d 100644 --- a/docs/source/cpp_api/mdspan_temporary_device_buffer.rst +++ b/docs/source/cpp_api/mdspan_temporary_device_buffer.rst @@ -7,17 +7,15 @@ temporary_device_buffer: Temporary raft::device_mdspan Producing Object ``#include `` -.. doxygenclass:: raft::temporary_device_buffer +.. doxygengroup:: temporary_device_buffer :project: RAFT :members: + :content-only: Factories --------- -.. doxygenfunction:: raft::make_temporary_device_buffer - :project: RAFT - -.. doxygenfunction:: raft::make_readonly_temporary_device_buffer - :project: RAFT -.. doxygenfunction:: raft::make_writeback_temporary_device_buffer +.. doxygengroup:: temporary_device_buffer_factories :project: RAFT + :members: + :content-only: diff --git a/docs/source/cpp_api/sparse_types.rst b/docs/source/cpp_api/sparse_types.rst index e69de29bb2..4ddf2cc0d5 100644 --- a/docs/source/cpp_api/sparse_types.rst +++ b/docs/source/cpp_api/sparse_types.rst @@ -0,0 +1,22 @@ +Sparse Types +============ + +.. role:: py(code) + :language: c++ + :class: highlight + + +``#include `` + +.. doxygengroup:: sparse_types + :project: RAFT + :members: + :content-only: + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + sparse_types_coo_matrix.rst + sparse_types_csr_matrix.rst diff --git a/docs/source/cpp_api/sparse_types_coo_matrix.rst b/docs/source/cpp_api/sparse_types_coo_matrix.rst new file mode 100644 index 0000000000..855d89fdea --- /dev/null +++ b/docs/source/cpp_api/sparse_types_coo_matrix.rst @@ -0,0 +1,39 @@ +COO Matrix +========== + +.. role:: py(code) + :language: c++ + :class: highlight + + +Basic Vocabulary +---------------- + +``#include `` + +.. doxygengroup:: coo_matrix + :project: RAFT + :members: + :content-only: + + +Device COO Matrix +----------------- + +``#include `` + +.. doxygengroup:: device_coo_matrix + :project: RAFT + :members: + :content-only: + +Host COO Matrix +----------------- + +``#include `` + +.. doxygengroup:: host_coo_matrix + :project: RAFT + :members: + :content-only: + diff --git a/docs/source/cpp_api/sparse_types_csr_matrix.rst b/docs/source/cpp_api/sparse_types_csr_matrix.rst new file mode 100644 index 0000000000..b704846c4e --- /dev/null +++ b/docs/source/cpp_api/sparse_types_csr_matrix.rst @@ -0,0 +1,39 @@ +CSR Matrix +========== + +.. role:: py(code) + :language: c++ + :class: highlight + + +Basic Vocabulary +---------------- + +``#include `` + +.. doxygengroup:: csr_matrix + :project: RAFT + :members: + :content-only: + + +Device CSR Matrix +----------------- + +``#include `` + +.. doxygengroup:: device_csr_matrix + :project: RAFT + :members: + :content-only: + +Host CSR Matrix +----------------- + +``#include `` + +.. doxygengroup:: host_csr_matrix + :project: RAFT + :members: + :content-only: + diff --git a/docs/source/index.rst b/docs/source/index.rst index 5bb42bce45..37235c2f25 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,7 +1,25 @@ -RAPIDS RAFT: Reusable Accelerated Functions and Tools -===================================================== +RAPIDS RAFT: Reusable Accelerated Functions and Tools for Vector Search and More +================================================================================ -RAFT contains fundamental widely-used algorithms and primitives for scientific computing, data science and machine learning. The algorithms are CUDA-accelerated and form building-blocks for rapidly composing analytics. +.. image:: ../../img/raft-tech-stack-vss.png + :width: 800 + :alt: RAFT Tech Stack + +Resources +######### + +.. _raft_reference: https://docs.rapids.ai/api/raft/stable/ + +- `Example Notebooks `_: Example jupyer notebooks +- `RAPIDS Community `_: Get help, contribute, and collaborate. +- `GitHub repository `_: Download the RAFT source code. +- `Issue tracker `_: Report issues or request features. + + +Overview +######## + +RAFT contains fundamental widely-used algorithms and primitives for machine learning and information retrieval. The algorithms are CUDA-accelerated and form building blocks for more easily writing high performance applications. By taking a primitives-based approach to algorithm development, RAFT @@ -9,7 +27,6 @@ By taking a primitives-based approach to algorithm development, RAFT - reduces the maintenance burden by maximizing reuse across projects, and - centralizes core reusable computations, allowing future optimizations to benefit all algorithms that use them. - While not exhaustive, the following general categories help summarize the accelerated building blocks that RAFT contains: .. list-table:: @@ -25,7 +42,7 @@ While not exhaustive, the following general categories help summarize the accele * - Sparse Operations - linear algebra, eigenvalue problems, slicing, norms, reductions, factorization, symmetrization, components & labeling * - Spatial - - pairwise distances, nearest neighbors, neighborhood graph construction + - pairwise distances, nearest neighbors and vector search, neighborhood graph construction * - Basic Clustering - spectral clustering, hierarchical clustering, k-means * - Solvers @@ -36,18 +53,18 @@ While not exhaustive, the following general categories help summarize the accele - common utilities for developing CUDA applications, multi-node multi-gpu infrastructure .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Contents: quick_start.md build.md - developer_guide.md cpp_api.rst pylibraft_api.rst + using_libraft.md raft_ann_benchmarks.md raft_dask_api.rst using_comms.rst - using_libraft.md + developer_guide.md contributing.md diff --git a/docs/source/quick_start.md b/docs/source/quick_start.md index e955706dc4..3909b40f20 100644 --- a/docs/source/quick_start.md +++ b/docs/source/quick_start.md @@ -118,7 +118,7 @@ auto metric = raft::distance::DistanceType::L2SqrtExpanded; raft::distance::pairwise_distance(handle, input.view(), input.view(), output.view(), metric); ``` -### Python Example +## Python Example 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. diff --git a/img/raft-tech-stack-vss.png b/img/raft-tech-stack-vss.png new file mode 100644 index 0000000000..cb24f002ab Binary files /dev/null and b/img/raft-tech-stack-vss.png differ