Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RELEASE] v22.04 #612

Merged
merged 207 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
6018bf9
DOC v21.10 Updates
raydouglass Jul 15, 2021
0e7642a
Merge pull request #297 from rapidsai/branch-21.08
GPUtester Jul 21, 2021
300fcd7
Use the new RAPIDS.cmake to fetch rapids-cmake (#298)
robertmaynard Jul 26, 2021
bfffb4d
Merge pull request #302 from rapidsai/branch-21.08
GPUtester Jul 27, 2021
78eca24
Remove max version pin for dask & distributed on development branch (…
galipremsagar Jul 28, 2021
fc1e701
Warnings are errors (#299)
harrism Jul 28, 2021
39f48bf
Merge pull request #305 from rapidsai/branch-21.08
GPUtester Jul 28, 2021
947e22f
ENH Replace gpuci_conda_retry with gpuci_mamba_retry (#295)
dillon-cullinan Jul 29, 2021
e4d8a03
Enable CUDA device code warnings as errors (#307)
harrism Aug 4, 2021
78b67af
Fix more warnings (#311)
harrism Aug 5, 2021
3196480
Temporarily pin RMM while refactor removes deprecated calls (#315)
dantegd Aug 16, 2021
417f896
Merge remote-tracking branch 'upstream/branch-21.08' into fix-changelogs
ajschmidt8 Aug 23, 2021
d0dd9ce
Merge pull request #318 from ajschmidt8/fix-changelogs
ajschmidt8 Aug 23, 2021
8992816
Update to UCX-Py 0.22 (#319)
pentschev Aug 25, 2021
aab9b95
Add Hamming, Jensen-Shannon, KL-Divergence, Russell rao and Correlati…
mdoijade Aug 25, 2021
1c4e1e6
Miscellaneous tech debts/cleanups (#286)
viclafargue Aug 27, 2021
820e14d
Pin rmm to branch-21.10 and remove warnings from kmeans.hpp (#322)
dantegd Aug 30, 2021
e806f99
Fix build doc (#316)
lowener Sep 7, 2021
f311247
Update with rapids cmake new features (#320)
robertmaynard Sep 9, 2021
f3df0ba
Add broadcast with const input iterator (#328)
seunghwak Sep 15, 2021
0286095
Fix wrong lda parameter in gemv (#327)
achirkin Sep 16, 2021
9ce2fd0
DOC v21.12 Updates
Sep 16, 2021
65a675f
Accounting for rmm::cuda_stream_pool not having a constructor for 0 s…
divyegala Sep 17, 2021
af3deea
Fused L2 (unexpanded) kNN kernel for NN <= 64, without using temporar…
mdoijade Sep 20, 2021
05b6ede
Make sure we keep the rapids-cmake and raft cal version in sync (#331)
robertmaynard Sep 21, 2021
90f6b4b
Merge pull request #332 from rapidsai/branch-21.08
ajschmidt8 Sep 22, 2021
eed1a1b
Merge pull request #333 from rapidsai/branch-21.10
GPUtester Sep 22, 2021
2ecb227
Pin max `dask` and `distributed` versions to `2021.09.1` (#334)
galipremsagar Sep 23, 2021
80d473e
Merge pull request #335 from rapidsai/branch-21.10
GPUtester Sep 23, 2021
9b4adb1
Random Ball Cover Algorithm for 2D Haversine/Euclidean (#213)
cjnolet Sep 23, 2021
61411b9
Merge pull request #336 from rapidsai/branch-21.10
GPUtester Sep 23, 2021
6d7f897
Fix `matrixVectorOp` to verify promoted pointer type is still aligned…
viclafargue Sep 24, 2021
c2e5a09
Merge pull request #337 from rapidsai/branch-21.10
GPUtester Sep 24, 2021
890c48e
Unpin `dask` & `distributed` in CI (#338)
galipremsagar Sep 27, 2021
f5725d6
[HOTFIX] Reverting fused l2 knn for now (#340)
cjnolet Sep 28, 2021
937b6de
Merge pull request #341 from rapidsai/branch-21.10
GPUtester Sep 28, 2021
cc70815
updating cuco to latest commit (#342)
divyegala Sep 30, 2021
aa22b46
Merge pull request #343 from rapidsai/branch-21.10
GPUtester Sep 30, 2021
3c7d49b
update cuco version to pick up bug fix (#346)
ChuckHastings Sep 30, 2021
c2daa5c
Merge pull request #347 from rapidsai/branch-21.10
GPUtester Sep 30, 2021
75656ce
Update to UCX-Py 0.23 (#358)
pentschev Oct 11, 2021
a452192
Update RAFT test directory (#359)
viclafargue Oct 14, 2021
ccba252
Hiding implementation details for distance primitives (dense + sparse…
cjnolet Oct 22, 2021
091cfdf
Fixing overflow in expanded distances (#365)
cjnolet Oct 27, 2021
3a7e3ed
DOC v22.02 Updates
ajschmidt8 Nov 4, 2021
3848fa7
Use 64 bit CuSolver API for Eigen decomposition (#349)
lowener Nov 5, 2021
22d1fc6
README updates (#351)
cjnolet Nov 6, 2021
6c93d46
Port libcudacxx patch from cudf (#370)
dantegd Nov 9, 2021
466ea71
Hiding implementation details for random, stats, and matrix (#356)
divyegala Nov 11, 2021
224e16e
Fixing bad host->device copy (#375)
cjnolet Nov 15, 2021
258c116
Removing conflict w/ CUDA_CHECK (#378)
cjnolet Nov 16, 2021
4a8fa9f
Getting doxygen to run (#371)
cjnolet Nov 16, 2021
4d1d201
Fix coalesced access checks in matrix_vector_op (#372)
achirkin Nov 17, 2021
5dd75eb
Merge branch 'branch-22.02' into branch-21.12-merge-22.02
cjnolet Nov 17, 2021
891ff74
Merge pull request #386 from cjnolet/branch-21.12-merge-22.02
ajschmidt8 Nov 17, 2021
ad1ac18
update changelog
ajschmidt8 Nov 19, 2021
092143d
Merge remote-tracking branch 'upstream/branch-21.10' into fix-changelog
ajschmidt8 Nov 19, 2021
dea0492
Merge pull request #390 from ajschmidt8/fix-changelog
ajschmidt8 Nov 19, 2021
6415333
Merge pull request #391 from rapidsai/branch-21.12
GPUtester Nov 19, 2021
742cd1b
Upgrade `clang` to `11.1.0` (#394)
galipremsagar Nov 22, 2021
ffb3799
Merge pull request #396 from rapidsai/branch-21.12
GPUtester Nov 22, 2021
a3e8181
Adding dev conda environment files. (#397)
cjnolet Nov 22, 2021
8ef8166
Pin max `dask` & `distributed` (#388)
galipremsagar Nov 22, 2021
94e6909
Merge pull request #398 from rapidsai/branch-21.12
GPUtester Nov 22, 2021
6166a47
Add Fused L2 Expanded KNN kernel (#339)
mdoijade Nov 23, 2021
ca4f36a
Update `.clang-format` to be consistent with all other RAPIDS repos (…
codereport Nov 25, 2021
ddb0840
Ensure that the correct ABI for cusolver exists when running tests (#…
robertmaynard Nov 29, 2021
0301d4f
Merge pull request #402 from rapidsai/branch-21.12
GPUtester Nov 29, 2021
6e46e67
Reverting default knn distance to L2Unexpanded for now. (#403)
cjnolet Dec 1, 2021
80507ee
Disabling expanded fused l2 knn to unblock cuml CI (#404)
cjnolet Dec 2, 2021
50f43c7
Disabling fused l2 knn from bfknn (#407)
cjnolet Dec 3, 2021
69c5c71
Update to UCX-Py 0.24 (#392)
pentschev Dec 6, 2021
b29ec65
Hiding implementation details for sparse API (#381)
cjnolet Dec 7, 2021
8ddb61c
fix nan issues in L2 expanded sqrt KNN distances (#411)
mdoijade Dec 9, 2021
2ecdd34
Consistent renaming of CHECK_CUDA and *_TRY macros (#410)
cjnolet Dec 9, 2021
36e2efc
Fix CUDA_CHECK_NO_THROW compatibility define (#414)
zbjornson Dec 10, 2021
fd54f29
Fix using incorrect macro RAFT_CHECK_CUDA in place of RAFT_CUDA_TRY (…
achirkin Dec 10, 2021
367688f
Adding no throw macro variants (#417)
cjnolet Dec 10, 2021
a68a4aa
Disabling fused l2 knn again. Not sure how this got added back. (#421)
cjnolet Dec 13, 2021
906e5e6
One cudaStream_t instance per raft::handle_t (#291)
divyegala Dec 13, 2021
18f91de
Update ucx-py version on release using rvc
jjacobelli Dec 14, 2021
a5162a4
Merge pull request #422 from Ethyling/ucx-py
jjacobelli Dec 15, 2021
681b19d
Adding distance specializations (#376)
cjnolet Dec 15, 2021
d2e5b7a
Remove `IncludeCategories` from `.clang-format` (#412)
codereport Dec 16, 2021
c05c1fa
Fix clang-format style errors (#425)
achirkin Dec 17, 2021
754cc88
NVTX range helpers (#416)
achirkin Dec 17, 2021
f48612d
Fix C++ doxygen documentation (#426)
achirkin Dec 17, 2021
084297f
update changelog
ajschmidt8 Dec 17, 2021
ccd5d75
Fix bug in producer-consumer buffer exchange which occurs in UMAP tes…
mdoijade Dec 20, 2021
c968df4
Fix comms memory leak (#436)
seunghwak Jan 3, 2022
c958dc0
Public apis for remainder of matrix and stats (#438)
divyegala Jan 11, 2022
15fd1d3
Faster matrix-vector-ops (#401)
achirkin Jan 12, 2022
605458e
error macros: determining buffer size instead of fixed 2048 chars (#420)
MatthiasKohl Jan 12, 2022
6a8c7a3
Unpin `dask` and `distributed` (#440)
galipremsagar Jan 13, 2022
b74c65f
DOC
raydouglass Jan 13, 2022
bb2568a
Update cuCollection git tag (#447)
seunghwak Jan 18, 2022
40bb4bc
Remove libcudacxx patch needed for nvcc 11.4 (#446)
robertmaynard Jan 18, 2022
73585f4
Use FAISS with RMM (#363)
viclafargue Jan 19, 2022
d78191f
Merge pull request #452 from rapidsai/branch-22.02
GPUtester Jan 19, 2022
c52420d
Replace RMM CUDA Python bindings with those provided by CUDA-Python …
shwina Jan 20, 2022
7307080
Merge pull request #454 from rapidsai/branch-22.02
GPUtester Jan 20, 2022
4dca1f0
Updates to Python and C++ Docs (#442)
cjnolet Jan 23, 2022
e0062b4
Merge pull request #456 from rapidsai/branch-22.02
GPUtester Jan 23, 2022
99b6dd3
Simplify raft component CMake logic, and allow compilation without FA…
robertmaynard Jan 23, 2022
3097e48
Merge pull request #457 from rapidsai/branch-22.02
GPUtester Jan 23, 2022
a13168f
pin dask (#455)
galipremsagar Jan 24, 2022
9987c68
Merge pull request #458 from rapidsai/branch-22.02
GPUtester Jan 24, 2022
98a6ccc
README and build fixes before release (#459)
cjnolet Jan 24, 2022
575fbd6
Merge pull request #460 from rapidsai/branch-22.02
GPUtester Jan 24, 2022
c39ecd8
Splitting fused l2 knn specializations (#461)
cjnolet Jan 25, 2022
4f22e92
Merge pull request #462 from rapidsai/branch-22.02
GPUtester Jan 25, 2022
66b2746
Removing extra logging from faiss mr (#463)
cjnolet Jan 25, 2022
f6206bf
Merge pull request #464 from rapidsai/branch-22.02
GPUtester Jan 25, 2022
4a13ea7
Adding conda packaging for libraft and pyraft (#439)
cjnolet Jan 26, 2022
093522b
Merge branch 'branch-21.12' into 'branch-22.02'.
ajschmidt8 Jan 27, 2022
e58835b
Merge pull request #465 from rapidsai/branch-22.02
GPUtester Jan 27, 2022
bf7de69
raft always calls `install` after `rapids_cmake_install_lib_dir`.
robertmaynard Jan 28, 2022
5c96e3a
Merge pull request #468 from robertmaynard/bug/correct_invalid_conda_…
jjacobelli Jan 28, 2022
727419d
Merge pull request #469 from rapidsai/branch-22.02
GPUtester Jan 28, 2022
ffe08fe
Hiding implementation details for comms (#409)
cjnolet Feb 1, 2022
bf6dd46
Unpin dask and distributed (#474)
galipremsagar Feb 1, 2022
fc76bcc
Define PTDS via `-D` to fix cache misses in sccache (#476)
trxcllnt Feb 1, 2022
08d58c8
update changelog
raydouglass Feb 2, 2022
fc4c210
iUpdating codeowners to use new raft codeowners (#480)
cjnolet Feb 2, 2022
207a9de
Adding cpu ci for conda build (#482)
cjnolet Feb 2, 2022
7568d4a
Span implementation. (#399)
trivialfis Feb 3, 2022
7fb0158
Replace `ccache` with `sccache` (#471)
ajschmidt8 Feb 3, 2022
6e2fbac
Adding fatbin to shared libs and fixing conda paths in cpu build (#485)
cjnolet Feb 4, 2022
a7832bc
single-pass raft::stats::meanvar (#472)
achirkin Feb 4, 2022
b7640ae
CUBLAS wrappers with switchable host/device pointer mode (#453)
achirkin Feb 4, 2022
c2837b0
Add CMake `install` rule for tests (#483)
ajschmidt8 Feb 4, 2022
0996d4a
More README updates (#467)
cjnolet Feb 5, 2022
57a23f3
Improve row-major meanvar kernel via minimizing atomicCAS locks (#489)
achirkin Feb 7, 2022
5cae680
Reusing shared libs in gpu ci builds (#487)
cjnolet Feb 7, 2022
66a60b9
LinAlg impl in detail (#383)
divyegala Feb 8, 2022
23e1650
Fix integer overflow in distances (#490)
RAMitchell Feb 8, 2022
1a49fc1
Interruptible execution (#433)
achirkin Feb 8, 2022
6422bae
Fix badly merged cublas wrappers (#492)
achirkin Feb 8, 2022
29718bd
Cleaning up cusparse_wrappers (#441)
cjnolet Feb 8, 2022
2ebf89c
Hiding implementation details for lap, clustering, spectral, and labe…
cjnolet Feb 9, 2022
9b0208b
Fixing spectral APIs (#496)
cjnolet Feb 9, 2022
6963de9
Adding destructor for std comms and using nccl allreduce for barrier …
cjnolet Feb 9, 2022
4171917
Passing stream through commsplit (#503)
cjnolet Feb 10, 2022
f46bb14
Correcting the namespace (#505)
vinaydes Feb 10, 2022
fdff8bb
Call initialize() in mpi_comms_t constructor. (#506)
seunghwak Feb 10, 2022
f9462d3
Moving some of the remaining linalg prims from cuml (#502)
cjnolet Feb 10, 2022
37f627c
Move `random` package of cuML to RAFT (#449)
divyegala Feb 11, 2022
6efe89b
Improvents to RNG (#434)
vinaydes Feb 11, 2022
4c089f6
Moving remaining stats prims from cuml (#507)
cjnolet Feb 11, 2022
ad3af3e
Initializing memory in RBC (#509)
cjnolet Feb 15, 2022
b2a88c2
make raft sources compilable with clang (#424)
MatthiasKohl Feb 16, 2022
1409002
Implement span storage optimization. (#515)
trivialfis Feb 18, 2022
98d60db
raft-config is idempotent no matter RAFT_COMPILE_LIBRARIES value (#516)
robertmaynard Feb 18, 2022
5f7aa84
Moving scores and metrics over to raft::stats (#512)
cjnolet Feb 18, 2022
5e0db8e
Fixing Python conda package and installation (#520)
cjnolet Feb 21, 2022
57703c5
mdspan integration. (#437)
trivialfis Feb 22, 2022
11f39d5
Adjusting conda packaging to remove duplicate dependencies (#508)
cjnolet Feb 22, 2022
1c5353e
Use shfl_xor in warpReduce for broadcast (#521)
akifcorduk Feb 22, 2022
badaee0
Updating some of the ci check scripts (#522)
cjnolet Feb 22, 2022
e6d148b
Use `dynamic_extent` from `stdex`. (#523)
trivialfis Feb 22, 2022
309c9f2
Adding instructions to install from conda and build using CPM (#519)
cjnolet Feb 22, 2022
5de31e0
Increase parallelism in allgatherv (#525)
seunghwak Feb 23, 2022
0bbdd4d
Include thrust/sort.h in ball_cover.cuh (#526)
akifcorduk Feb 23, 2022
28fd5ef
Random ball cover in 3d (#510)
cjnolet Feb 24, 2022
08003c2
Moving device functions to cuh files and deprecating hpp (#524)
cjnolet Feb 25, 2022
97c3b2b
Adding lap.hpp back (with deprecation) (#529)
cjnolet Feb 25, 2022
390cf72
Allocate sufficient memory for Hungarian if number of batches > 1 (#531)
ChuckHastings Feb 27, 2022
db7ba5e
find_package(raft) can now be called multiple times safely (#532)
robertmaynard Feb 28, 2022
fd0336a
update changelog
ajschmidt8 Feb 28, 2022
091e2ac
Merge 'branch-22.02' into 'branch-22.04'
ajschmidt8 Feb 28, 2022
a6f3caf
Unify weighted mean code (#514)
lowener Mar 2, 2022
194c7ee
RNG test fixes and improvements (#513)
vinaydes Mar 8, 2022
b5de437
clang-tidy support: improved clang run scripts with latest changes (s…
MatthiasKohl Mar 9, 2022
c0925f3
mdspan PoC for distance make_blobs (#538)
cjnolet Mar 9, 2022
b28c705
Adding logger (#550)
cjnolet Mar 11, 2022
dcc6509
Add benchmarks (#549)
achirkin Mar 11, 2022
ecfbce8
Disabling benchmarks building by default. (#553)
cjnolet Mar 11, 2022
9d77117
Add `.github/ops-bot.yaml` config file (#554)
ajschmidt8 Mar 14, 2022
c705d2a
Upload packages using testing label for nightlies (#556)
jjacobelli Mar 15, 2022
f2ea779
Updated dask and distributed to >=2022.02.1 (#557)
rlratzel Mar 15, 2022
6cab744
Add local conda channel while looking for conda outputs
jjacobelli Mar 16, 2022
d6b9d22
Merge pull request #558 from Ethyling/staging-label
jjacobelli Mar 16, 2022
44a46cf
Set `main` label by default (#559)
galipremsagar Mar 16, 2022
613c722
Remove RAFT memory management (#400)
viclafargue Mar 18, 2022
0d777ea
Pylibraft for pairwise distances (#540)
cjnolet Mar 21, 2022
cf586c4
Update update-version.sh (#560)
raydouglass Mar 22, 2022
c333848
Fixing accidental removal of thrust target from cmakelists (#571)
cjnolet Mar 22, 2022
6e552ec
Fixing raft headers dir (#574)
cjnolet Mar 22, 2022
15eb20a
Thrust package name case (#576)
trxcllnt Mar 22, 2022
ebc4feb
Use unanchored clang-format version check (#573)
zbjornson Mar 22, 2022
e74c012
Adding INSTALL_EXPORT_SET for cuco, rmm, thrust (#579)
cjnolet Mar 22, 2022
1c54493
Don't add gtest to build export set or generate a gtest-config.cmake …
trxcllnt Mar 22, 2022
15b2ef7
Add missing thrust includes to transpose.cuh (#575)
zbjornson Mar 22, 2022
82fd068
removing exclude_from_all from cuco (#580)
cjnolet Mar 22, 2022
45384fe
Pin `dask` and `distributed` version (#581)
galipremsagar Mar 22, 2022
f97e905
exposing faiss::faiss (#582)
cjnolet Mar 22, 2022
ab57c1f
Link to `cuco` and add faiss `EXCLUDE_FROM_ALL` option (#583)
trxcllnt Mar 23, 2022
9a11b83
Fix commands to get conda output files (#584)
jjacobelli Mar 23, 2022
f66f1b3
update `ops-bot` config file (#586)
ajschmidt8 Mar 23, 2022
3997a8f
Updating docs for 22.04 (#566)
cjnolet Mar 25, 2022
08b965d
Update cuco version. (#592)
vyasr Mar 25, 2022
ac6fde4
Adding build script for docs (#589)
cjnolet Mar 28, 2022
6aa9ac8
Fix make_device_vector_view (#595)
lowener Mar 28, 2022
bde2584
KNN select-top-k variants (#551)
achirkin Mar 30, 2022
bdefaaa
Pin cmake in conda recipe to <3.23 (#600)
dantegd Mar 30, 2022
c509483
Only run doc builds for x86_64 (#607)
raydouglass Apr 1, 2022
f5d2627
update changelog
raydouglass Apr 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#cpp code owners
cpp/ @rapidsai/cuml-cpp-codeowners @rapidsai/cugraph-cpp-codeowners
cpp/ @rapidsai/raft-cpp-codeowners

#python code owners
python/ @rapidsai/cuml-python-codeowners @rapidsai/cugraph-python-codeowners
python/ @rapidsai/raft-python-codeowners

#cmake code owners
**/CMakeLists.txt @rapidsai/cuml-cmake-codeowners @rapidsai/cugraph-cmake-codeowners
**/cmake/ @rapidsai/cuml-cmake-codeowners @rapidsai/cugraph-cmake-codeowners
python/setup.py @rapidsai/cuml-cmake-codeowners @rapidsai/cugraph-cmake-codeowners
build.sh @rapidsai/cuml-cmake-codeowners @rapidsai/cugraph-cmake-codeowners
**/build.sh @rapidsai/cuml-cmake-codeowners @rapidsai/cugraph-cmake-codeowners
**/CMakeLists.txt @rapidsai/raft-cmake-codeowners
**/cmake/ @rapidsai/raft-cmake-codeowners
python/setup.py @rapidsai/raft-cmake-codeowners
build.sh @rapidsai/raft-cmake-codeowners
**/build.sh @rapidsai/raft-cmake-codeowners

#build/ops code owners
.github/ @rapidsai/ops-codeowners
Expand Down
8 changes: 8 additions & 0 deletions .github/ops-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file controls which features from the `ops-bot` repository below are enabled.
# - https://github.com/rapidsai/ops-bot

auto_merger: true
branch_checker: true
label_checker: true
release_drafter: true
external_contributors: false
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ build/
build_prims/
dist/
python/**/**/*.cpp
python/external_repositories
python/record.txt
python/raft/record.txt
python/pylibraft/record.txt
log
.ipynb_checkpoints
.DS_Store
Expand Down
333 changes: 235 additions & 98 deletions BUILD.md

Large diffs are not rendered by default.

236 changes: 236 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ into three categories:

### Your first issue

1. Read the project's [README.md](https://github.com/rapidsai/RAFT/blob/main/README.md)
1. Read the project's [README.md](https://github.com/rapidsai/raft)
to learn how to setup the development environment
2. Find an issue to work on. The best way is to look for the [good first issue](https://github.com/rapidsai/RAFT/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
or [help wanted](https://github.com/rapidsai/RAFT/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) labels
Expand Down
24 changes: 24 additions & 0 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Developer Guide

## Local Development

Devloping features and fixing bugs for the RAFT library itself is straightforward and only requires building and installing the relevant RAFT artifacts.

The process for working on a CUDA/C++ feature which spans RAFT and one or more consumers can vary slightly depending on whether the consuming project relies on a source build (as outlined in the [BUILD](BUILD.md#install_header_only_cpp) docs). In such a case, the option `CPM_raft_SOURCE=/path/to/raft/source` can be passed to the cmake of the consuming project in order to build the local RAFT from source. The PR with relevant changes to the consuming project can also pin the RAFT version temporarily by explicitly changing the `FORK` and `PINNED_TAG` arguments to the RAFT branch containing their changes when invoking `find_and_configure_raft`. The pin should be reverted after the changed is merged to the RAFT project and before it is merged to the dependent project(s) downstream.

If building a feature which spans projects and not using the source build in cmake, the RAFT changes (both C++ and Python) will need to be installed into the environment of the consuming project before they can be used. The ideal integration of RAFT into consuming projects will enable both the source build in the consuming project only for this case but also rely on a more stable packaging (such as conda packaging) otherwise.

## API stability

Since RAFT is a core library with multiple consumers, it's important that the public APIs maintain stability across versions and any changes to them are done with caution, adding new functions and deprecating the old functions over a couple releases as necessary.

The public APIs should be lightweight wrappers around calls to private APIs inside the `detail` namespace.

## Testing

It's important for RAFT to maintain a high test coverage in order to minimize the potential for downstream projects to encounter unexpected build or runtime behavior as a result of changes. A well-defined public API can help maintain compile-time stability but means more focus should be placed on testing the functional requirements and verifying execution on the various edge cases within RAFT itself. Ideally, bug fixes and new features should be able to be made to RAFT independently of the consuming projects.


## Documentation

Public APIs always require documentation, since those will be exposed directly to users. In addition to summarizing the purpose of each class / function in the public API, the arguments (and relevant templates) should be documented along with brief usage examples.
224 changes: 218 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,227 @@
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;RAFT: RAPIDS Analytics Frameworks Toolset</div>
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;RAFT: Reusable Accelerated Functions and Tools</div>

RAFT is a repository containining shared utilities, mathematical operations and common functions for the analytics components of RAPIDS. Both the C++ and Python components can be included in consuming libraries.
RAFT contains fundamental widely-used algorithms and primitives for data science, graph and machine learning. The algorithms are CUDA-accelerated and form building-blocks for rapidly composing analytics.

Refer to the [Build and Development Guide](BUILD.md) for details on RAFT's design, building, testing and development guidelines.
By taking a primitives-based approach to algorithm development, RAFT
- accelerates algorithm construction time
- 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 functions in RAFT:
#####
| Category | Examples |
| --- | --- |
| **Data Formats** | sparse & dense, conversions, data generation |
| **Dense Linear Algebra** | matrix arithmetic, norms, factorization, least squares, svd & eigenvalue problems |
| **Spatial** | pairwise distances, nearest neighbors, neighborhood graph construction |
| **Sparse Operations** | linear algebra, eigenvalue problems, slicing, symmetrization, labeling |
| **Basic Clustering** | spectral clustering, hierarchical clustering, k-means |
| **Solvers** | combinatorial optimization, iterative solvers |
| **Statistics** | sampling, moments and summary statistics, metrics |
| **Distributed Tools** | multi-node multi-gpu infrastructure |

RAFT provides a header-only C++ library and pre-compiled shared libraries that can 1) speed up compile times and 2) enable the APIs to be used without CUDA-enabled compilers.

RAFT also provides 2 Python libraries:
- `pylibraft` - low-level Python wrappers around RAFT algorithms and primitives.
- `pyraft` - reusable infrastructure for building analytics, including tools for building both single-GPU and multi-node multi-GPU algorithms.

## Getting started

### RAPIDS Memory Manager (RMM)

RAFT relies heavily on RMM which eases the burden of configuring different allocation strategies globally across the libraries that use it.

### Multi-dimensional Arrays

The APIs in RAFT currently accept raw pointers to device memory and we are in the process of simplifying the APIs with the [mdspan](https://arxiv.org/abs/2010.06474) multi-dimensional array view for representing data in higher dimensions similar to the `ndarray` in the Numpy Python library. RAFT also contains the corresponding owning `mdarray` structure, which simplifies the allocation and management of multi-dimensional data in both host and device (GPU) memory.

The `mdarray` forms a convenience layer over RMM and can be constructed in RAFT using a number of different helper functions:

```c++
#include <raft/mdarray.hpp>

int n_rows = 10;
int n_cols = 10;

auto scalar = raft::make_device_scalar<float>(handle, 1.0);
auto vector = raft::make_device_vector<float>(handle, n_cols);
auto matrix = raft::make_device_matrix<float>(handle, n_rows, n_cols);
```

### C++ Example

Most of the primitives in RAFT accept a `raft::handle_t` object for the management of resources which are expensive to create, such CUDA streams, stream pools, and handles to other CUDA libraries like `cublas` and `cusolver`.

The example below demonstrates creating a RAFT handle and using it with `device_matrix` and `device_vector` to allocate memory, generating random clusters, and computing
pairwise Euclidean distances:
```c++
#include <raft/handle.hpp>
#include <raft/mdarray.hpp>
#include <raft/random/make_blobs.cuh>
#include <raft/distance/distance.cuh>

raft::handle_t handle;

int n_samples = 5000;
int n_features = 50;

auto input = raft::make_device_matrix<float>(handle, n_samples, n_features);
auto labels = raft::make_device_vector<int>(handle, n_samples);
auto output = raft::make_device_matrix<float>(handle, n_samples, n_samples);

raft::random::make_blobs(handle, input.view(), labels.view());

auto metric = raft::distance::DistanceType::L2SqrtExpanded;
raft::distance::pairwise_distance(handle, input.view(), input.view(), output.view(), metric);
```

### Python Example

The `pylibraft` package contains a Python API for RAFT algorithms and primitives. The package is currently limited to pairwise distances, and we will continue adding more.

The example below demonstrates computing the pairwise Euclidean distances between cupy arrays. `pylibraft` is a low-level API that prioritizes efficiency and simplicity over being pythonic, which is shown here by pre-allocating the output memory before invoking the `pairwise_distance` function.

```python
import cupy as cp

from pylibraft.distance import pairwise_distance

n_samples = 5000
n_features = 50

in1 = cp.random.random_sample((n_samples, n_features), dtype=cp.float32)
in2 = cp.random.random_sample((n_samples, n_features), dtype=cp.float32)
output = cp.empty((n_samples, n_samples), dtype=cp.float32)

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.

### Conda

The easiest way to install RAFT is through conda and several packages are provided.
- `libraft-headers` RAFT headers
- `libraft-nn` (optional) contains shared libraries for the nearest neighbors primitives.
- `libraft-distance` (optional) contains shared libraries for distance primitives.
- `pylibraft` (optional) Python wrappers around RAFT algorithms and primitives
- `pyraft` (optional) contains reusable Python infrastructure and tools to accelerate Python algorithm development.

Use the following command to install RAFT 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
mamba install -c rapidsai libraft-headers libraft-nn libraft-distance pyraft pylibraft
```

After installing RAFT, `find_package(raft COMPONENTS nn distance)` can be used in your CUDA/C++ build. `COMPONENTS` are optional and will depend on the packages installed.

### 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.

After [installing](https://github.com/rapidsai/rapids-cmake#installation) rapids-cmake in your project, you can begin using RAFT by placing the code snippet below in a file named `get_raft.cmake` and including it in your cmake build with `include(get_raft.cmake)`. This will make available several targets to add to configure the link libraries for your artifacts.

```cmake

set(RAFT_VERSION "22.04")
set(RAFT_FORK "rapidsai")
set(RAFT_PINNED_TAG "branch-${RAFT_VERSION}")

function(find_and_configure_raft)
set(oneValueArgs VERSION FORK PINNED_TAG COMPILE_LIBRARIES)
cmake_parse_arguments(PKG "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN} )

#-----------------------------------------------------
# Invoke CPM find_package()
#-----------------------------------------------------

rapids_cpm_find(raft ${PKG_VERSION}
GLOBAL_TARGETS raft::raft
BUILD_EXPORT_SET projname-exports
INSTALL_EXPORT_SET projname-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/${PKG_FORK}/raft.git
GIT_TAG ${PKG_PINNED_TAG}
SOURCE_SUBDIR cpp
OPTIONS
"BUILD_TESTS OFF"
"BUILD_BENCH OFF"
"RAFT_COMPILE_LIBRARIES ${PKG_COMPILE_LIBRARIES}"
)

endfunction()

# Change pinned tag here to test a commit in CI
# To use a different RAFT locally, set the CMake variable
# CPM_raft_SOURCE=/path/to/local/raft
find_and_configure_raft(VERSION ${RAFT_VERSION}.00
FORK ${RAFT_FORK}
PINNED_TAG ${RAFT_PINNED_TAG}
COMPILE_LIBRARIES NO
)
```

Several 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.

| Component | Target | Description | Base Dependencies |
| --- | --- | --- | --- |
| n/a | `raft::raft` | Full RAFT header library | CUDA toolkit library, RMM, std::mdspan, cuCollections, Thrust, NVTools |
| distance | `raft::distance` | Pre-compiled template specializations for raft::distance | raft::raft |
| nn | `raft::nn` | Pre-compiled template specializations for raft::spatial::knn | raft::raft, FAISS |

### 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/raft_dev_cuda11.5.yml
mamba activate raft_dev_env
```
```
./build.sh pyraft 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.

## Folder Structure and Contents

The folder structure mirrors the main RAPIDS repos (cuDF, cuML, cuGraph...), with the following folders:
The folder structure mirrors other RAPIDS repos, with the following folders:

- `cpp`: Source code for all C++ code. The code is header only, therefore it is in the `include` folder (with no `src`).
- `python`: Source code for all Python source code.
- `ci`: Scripts for running CI in PRs
- `conda`: Conda recipes and development conda environments
- `cpp`: Source code for C++ libraries.
- `docs`: Doxygen configuration
- `include`: The C++ API is fully-contained here
- `src`: Compiled template specializations for the shared libraries
- `docs`: Source code and scripts for building library documentation (doxygen + pydocs)
- `python`: Source code for Python libraries.

## Contributing

If you are interested in contributing to the RAFT project, please read our [Contributing guidelines](CONTRIBUTING.md). Refer to the [Developer Guide](DEVELOPER_GUIDE.md) for details on the developer guidelines, workflows, and principals.

## References

When citing RAFT generally, please consider referencing this Github project.
```bibtex
@misc{rapidsai,
title={Rapidsai/raft: RAFT contains fundamental widely-used algorithms and primitives for data science, Graph and machine learning.},
url={https://github.com/rapidsai/raft},
journal={GitHub},
publisher={Nvidia RAPIDS},
author={Rapidsai},
year={2022}
}
```
If citing the sparse pairwise distances API, please consider using the following bibtex:
```bibtex
@article{nolet2021semiring,
title={Semiring primitives for sparse neighborhood methods on the gpu},
author={Nolet, Corey J and Gala, Divye and Raff, Edward and Eaton, Joe and Rees, Brad and Zedlewski, John and Oates, Tim},
journal={arXiv preprint arXiv:2104.06357},
year={2021}
}
```
Loading