Skip to content

Commit

Permalink
Merge branch 'branch-24.12' into 2412-remove-libraft-instantiations
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet committed Nov 16, 2024
2 parents 2e3413d + fccf33e commit e4e19a4
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 199 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ log
dask-worker-space/
*.egg-info/
*.bin
bench/ann/data
temporary_*.json

## scikit-build
Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ repos:
entry: ./cpp/scripts/run-cmake-format.sh cmake-format
language: python
types: [cmake]
exclude: .*/thirdparty/.*|.*FindAVX.cmake.*
exclude: .*/thirdparty/.*
# Note that pre-commit autoupdate does not update the versions
# of dependencies, so we'll have to update this manually.
additional_dependencies:
Expand Down Expand Up @@ -114,7 +114,6 @@ repos:
cpp/include/raft/neighbors/detail/faiss_select/|
cpp/include/raft/thirdparty/|
docs/source/sphinxext/github_link[.]py|
cpp/cmake/modules/FindAVX[.]cmake
- id: verify-alpha-spec
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.16.0
Expand Down
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<to
docs - build the documentation
tests - build the tests
bench-prims - build micro-benchmarks for primitives
<<<<<<< HEAD
=======
template - build the example RAFT application template
>>>>>>> branch-24.12
and <flag> is:
-v - verbose build mode
Expand Down
15 changes: 0 additions & 15 deletions conda/recipes/libraft/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@ c_stdlib_version:
cmake_version:
- ">=3.26.4,!=3.30.0"

nccl_version:
- ">=2.19"

glog_version:
- ">=0.6.0"

faiss_version:
- ">=1.7.1"

h5py_version:
- ">=3.8.0"

nlohmann_json_version:
- ">=3.11.2"

# The CTK libraries below are missing from the conda-forge::cudatoolkit package
# for CUDA 11. The "*_host_*" version specifiers correspond to `11.8` packages
# and the "*_run_*" version specifiers correspond to `11.x` packages.
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"VERSION": "?",
"GIT_SHALLOW": "?",
"OPTIONS": "*",
"FIND_PACKAGE_ARGUMENTS": "*"
"FIND_PACKAGE_ARGUMENTS": "*"
}
},
"ConfigureTest": {
Expand Down
110 changes: 0 additions & 110 deletions cpp/cmake/modules/FindAVX.cmake

This file was deleted.

22 changes: 0 additions & 22 deletions cpp/cmake/thirdparty/get_fmt.cmake

This file was deleted.

48 changes: 0 additions & 48 deletions cpp/cmake/thirdparty/get_glog.cmake

This file was deleted.

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
)

0 comments on commit e4e19a4

Please sign in to comment.