Skip to content

Commit

Permalink
Improving documentation across the board. Adding quick-start to breat…
Browse files Browse the repository at this point in the history
…he docs. (#943)

Lots of improvements to the docs all around:

- adding all new ANN docs and cleaning up neighborhood docs in general
- new quick-start tutorial in the docs
- docs added to many different APIs including core, clustering, and solvers
- making sure to include docs for mdspan/mdarray in the `core` docs
- updates to build.sh to only compile nn/dist libs when the appropriate tests/benchmarks are selected

Authors:
  - Corey J. Nolet (https://github.com/cjnolet)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #943
  • Loading branch information
cjnolet authored Oct 24, 2022
1 parent 18d7195 commit 3cc4737
Show file tree
Hide file tree
Showing 41 changed files with 1,164 additions and 400 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pairwise_distance(in1, in2, output, metric="euclidean")

## Installing

RAFT itself can be installed through conda, [Cmake Package Manager (CPM)](https://github.com/cpm-cmake/CPM.cmake), or by building the repository from source. Please refer to the [build instructions](BUILD.md) for more a comprehensive guide on building RAFT and using it in downstream projects.
RAFT itself can be installed through conda, [Cmake Package Manager (CPM)](https://github.com/cpm-cmake/CPM.cmake), or by building the repository from source. Please refer to the [build instructions](docs/source/build.md) for more a comprehensive guide on building RAFT and using it in downstream projects.

### Conda

Expand All @@ -119,7 +119,7 @@ You can also install the `libraft-*` conda packages individually using the `mamb

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.

### CPM
### Cmake & CPM

RAFT uses the [RAPIDS-CMake](https://github.com/rapidsai/rapids-cmake) library, which makes it simple to include in downstream cmake projects. RAPIDS CMake provides a convenience layer around CPM.

Expand Down Expand Up @@ -186,7 +186,7 @@ mamba activate raft_dev_env
./build.sh raft-dask pylibraft libraft tests bench --compile-libs
```

The [build](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](BUILD.md#build_cxx_source) section of the build instructions.
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.

## Folder Structure and Contents

Expand Down Expand Up @@ -220,7 +220,7 @@ The folder structure mirrors other RAPIDS repos, with the following folders:
- `scripts`: Helpful scripts for development
- `src`: Compiled APIs and template specializations for the shared libraries
- `test`: Googletests source code
- `docs`: Source code and scripts for building library documentation (doxygen + pydocs)
- `docs`: Source code and scripts for building library documentation (Uses breath, doxygen, & pydocs)
- `python`: Source code for Python libraries.
- `pylibraft`: Python build and source code for pylibraft library
- `raft-dask`: Python build and source code for raft-dask library
Expand Down
44 changes: 38 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,50 @@ fi

if hasArg tests || (( ${NUMARGS} == 0 )); then
BUILD_TESTS=ON
COMPILE_DIST_LIBRARY=ON
ENABLE_NN_DEPENDENCIES=ON
COMPILE_NN_LIBRARY=ON
CMAKE_TARGET="${CMAKE_TARGET};${TEST_TARGETS}"

# Force compile nn library when needed test targets are specified
if [[ $CMAKE_TARGET == *"CLUSTER_TEST"* || \
$CMAKE_TARGET == *"SPARSE_DIST_TEST"* || \
$CMAKE_TARGET == *"SPARSE_NEIGHBORS_TEST"* || \
$CMAKE_TARGET == *"NEIGHBORS_TEST"* || \
$CMAKE_TARGET == *"STATS_TEST"* ]]; then
echo "-- Enabling nearest neighbors lib for gtests"
ENABLE_NN_DEPENDENCIES=ON
COMPILE_NN_LIBRARY=ON
fi

# Force compile distance library when needed test targets are specified
if [[ $CMAKE_TARGET == *"CLUSTER_TEST"* || \
$CMAKE_TARGET == *"DISTANCE_TEST"* || \
$CMAKE_TARGET == *"SPARSE_DIST_TEST" || \
$CMAKE_TARGET == *"SPARSE_NEIGHBORS_TEST"* || \
$CMAKE_TARGET == *"NEIGHBORS_TEST" || \
$CMAKE_TARGET == *"STATS_TEST"* ]]; then
echo "-- Enabling distance lib for gtests"
COMPILE_DIST_LIBRARY=ON
fi
fi

if hasArg bench || (( ${NUMARGS} == 0 )); then
BUILD_BENCH=ON
COMPILE_DIST_LIBRARY=ON
ENABLE_NN_DEPENDENCIES=ON
COMPILE_NN_LIBRARY=ON
CMAKE_TARGET="${CMAKE_TARGET};${BENCH_TARGETS}"

# Force compile nn library when needed benchmark targets are specified
if [[ $CMAKE_TARGET == *"CLUSTER_BENCH"* || \
$CMAKE_TARGET == *"NEIGHBORS_BENCH"* ]]; then
echo "-- Enabling nearest neighbors lib for benchmarks"
ENABLE_NN_DEPENDENCIES=ON
COMPILE_NN_LIBRARY=ON
fi

# Force compile distance library when needed benchmark targets are specified
if [[ $CMAKE_TARGET == *"CLUSTER_BENCH"* || \
$CMAKE_TARGET == *"NEIGHBORS_BENCH"* ]]; then
echo "-- Enabling distance lib for benchmarks"
COMPILE_DIST_LIBRARY=ON
fi

fi

if hasArg --buildfaiss; then
Expand Down
4 changes: 3 additions & 1 deletion cpp/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,9 @@ EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/include/raft/sparse/linalg/s
@CMAKE_CURRENT_SOURCE_DIR@/include/raft/span.hpp \
@CMAKE_CURRENT_SOURCE_DIR@/include/raft/vectorized.cuh \
@CMAKE_CURRENT_SOURCE_DIR@/include/raft/raft.hpp \
@CMAKE_CURRENT_SOURCE_DIR@/include/raft/core/cudart_utils.hpp
@CMAKE_CURRENT_SOURCE_DIR@/include/raft/core/cudart_utils.hpp \
@CMAKE_CURRENT_SOURCE_DIR@/include/raft/matrix/math.cuh \
@CMAKE_CURRENT_SOURCE_DIR@/include/raft/matrix/matrix.cuh

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down
Loading

0 comments on commit 3cc4737

Please sign in to comment.