Skip to content

Commit

Permalink
Merge branch '2412-remove-ann-bench' into 2412-remove-libraft-instant…
Browse files Browse the repository at this point in the history
…iations
  • Loading branch information
cjnolet committed Nov 15, 2024
2 parents 21b17d6 + 10fd77f commit 132ef5d
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 1,211 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,5 @@ jobs:
cuda: '["12.5"]'
build_command: |
sccache -z;
build-all -DBUILD_PRIMS_BENCH=ON -DBUILD_ANN_BENCH=ON --verbose;
build-all -DBUILD_PRIMS_BENCH=ON --verbose;
sccache -s;
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ pairwise_distance(in1, in2, out=output, metric="euclidean")

## Installing

RAFT's C++ and Python libraries can both be installed through Conda and the Python libraries through Pip.
RAFT's C++ and Python libraries can both be installed through Conda and the Python libraries through Pip.


### Installing C++ and Python through Conda
Expand Down
5 changes: 0 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ BUILD_ALL_GPU_ARCH=0
BUILD_TESTS=OFF
BUILD_TYPE=Release
BUILD_PRIMS_BENCH=OFF
BUILD_ANN_BENCH=OFF
BUILD_CPU_ONLY=OFF
COMPILE_LIBRARY=OFF
INSTALL_TARGET=install
BUILD_REPORT_METRICS=""
Expand Down Expand Up @@ -200,7 +198,6 @@ if (( ${NUMARGS} != 0 )); then
cacheTool
limitTests
limitBench
limitAnnBench
buildMetrics
for a in ${ARGS}; do
if ! (echo " ${VALIDARGS} " | grep -q " ${a} "); then
Expand Down Expand Up @@ -401,8 +398,6 @@ if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || has
-DDISABLE_DEPRECATION_WARNINGS=${DISABLE_DEPRECATION_WARNINGS} \
-DBUILD_TESTS=${BUILD_TESTS} \
-DBUILD_PRIMS_BENCH=${BUILD_PRIMS_BENCH} \
-DBUILD_ANN_BENCH=${BUILD_ANN_BENCH} \
-DBUILD_CPU_ONLY=${BUILD_CPU_ONLY} \
-DCMAKE_MESSAGE_LOG_LEVEL=${CMAKE_LOG_LEVEL} \
${CACHE_ARGS} \
${EXTRA_CMAKE_ARGS}
Expand Down
25 changes: 0 additions & 25 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,5 @@ rapids-conda-retry mambabuild \
conda/recipes/raft-dask

sccache --show-adv-stats
sccache --zero-stats

# Build ann-bench for each cuda and python version
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/raft-ann-bench

sccache --show-adv-stats

# Build ann-bench-cpu only in CUDA 11 jobs since it only depends on python
# version
RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then
sccache --zero-stats

rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/raft-ann-bench-cpu

sccache --show-adv-stats
fi

rapids-upload-conda-to-s3 python
2 changes: 0 additions & 2 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ sed_runner "/^set(RAFT_VERSION/ s|\".*\"|\"${NEXT_SHORT_TAG}\"|g" docs/source/bu
sed_runner "s|branch-[0-9][0-9].[0-9][0-9]|branch-${NEXT_SHORT_TAG}|g" docs/source/build.md
sed_runner "/rapidsai\/raft/ s|branch-[0-9][0-9].[0-9][0-9]|branch-${NEXT_SHORT_TAG}|g" docs/source/developer_guide.md

sed_runner "s|:[0-9][0-9].[0-9][0-9]|:${NEXT_SHORT_TAG}|g" docs/source/raft_ann_benchmarks.md

sed_runner "s|branch-[0-9][0-9].[0-9][0-9]|branch-${NEXT_SHORT_TAG}|g" README.md

# .devcontainer files
Expand Down
3 changes: 1 addition & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ option(DISABLE_OPENMP "Disable OpenMP" OFF)
option(RAFT_NVTX "Enable nvtx markers" OFF)

set(RAFT_COMPILE_LIBRARY_DEFAULT OFF)
if((BUILD_TESTS OR BUILD_PRIMS_BENCH))
if(BUILD_TESTS OR BUILD_PRIMS_BENCH)
set(RAFT_COMPILE_LIBRARY_DEFAULT ON)
endif()
option(RAFT_COMPILE_LIBRARY "Enable building raft shared library instantiations"
Expand All @@ -81,7 +81,6 @@ include(CMakeDependentOption)
message(VERBOSE "RAFT: Building optional components: ${raft_FIND_COMPONENTS}")
message(VERBOSE "RAFT: Build RAFT unit-tests: ${BUILD_TESTS}")
message(VERBOSE "RAFT: Building raft C++ benchmarks: ${BUILD_PRIMS_BENCH}")
message(VERBOSE "RAFT: Building ANN benchmarks: ${BUILD_ANN_BENCH}")
message(VERBOSE "RAFT: Enable detection of conda environment for dependencies: ${DETECT_CONDA_ENV}")
message(VERBOSE "RAFT: Disable depreaction warnings " ${DISABLE_DEPRECATION_WARNINGS})
message(VERBOSE "RAFT: Disable OpenMP: ${DISABLE_OPENMP}")
Expand Down
67 changes: 67 additions & 0 deletions cpp/template/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# =============================================================================
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.

# Use RAPIDS_VERSION from cmake/thirdparty/fetch_rapids.cmake
set(RAFT_VERSION "${RAPIDS_VERSION}")
set(RAFT_FORK "rapidsai")
set(RAFT_PINNED_TAG "branch-${RAPIDS_VERSION}")

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

set(RAFT_COMPONENTS "")
if(PKG_COMPILE_LIBRARY)
string(APPEND RAFT_COMPONENTS " compiled")
endif()

if(PKG_ENABLE_MNMG_DEPENDENCIES)
string(APPEND RAFT_COMPONENTS " distributed")
endif()

#-----------------------------------------------------
# Invoke CPM find_package()
#-----------------------------------------------------
# Since the RAFT_NVTX option is used by targets generated by
# find_package(RAFT_NVTX) and when building from source we want to
# make `RAFT_NVTX` a cache variable so we get consistent
# behavior
#
set(RAFT_NVTX ${PKG_ENABLE_NVTX} CACHE BOOL "Enable raft nvtx logging" FORCE)
rapids_cpm_find(raft ${PKG_VERSION}
GLOBAL_TARGETS raft::raft
BUILD_EXPORT_SET raft-template-exports
INSTALL_EXPORT_SET raft-template-exports
COMPONENTS ${RAFT_COMPONENTS}
CPM_ARGS
GIT_REPOSITORY https://github.com/${PKG_FORK}/raft.git
GIT_TAG ${PKG_PINNED_TAG}
SOURCE_SUBDIR cpp
OPTIONS
"BUILD_TESTS OFF"
"BUILD_PRIMS_BENCH OFF"
"RAFT_COMPILE_LIBRARY ${PKG_COMPILE_LIBRARY}"
)
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_LIBRARY ON
ENABLE_MNMG_DEPENDENCIES OFF
ENABLE_NVTX OFF
)
51 changes: 0 additions & 51 deletions docs/source/ann_benchmarks_build.md

This file was deleted.

63 changes: 0 additions & 63 deletions docs/source/ann_benchmarks_dataset.md

This file was deleted.

Loading

0 comments on commit 132ef5d

Please sign in to comment.