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

Update to CMake 3.20 features, rapids-cmake and CPM #187

Merged
merged 24 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7eadba6
FEA First version using CPM for dependencies
dantegd Mar 29, 2021
5ebab53
FIX Small fixes
dantegd Mar 29, 2021
ec85465
Merge branch-0.20 into 020-fea-cpm
dantegd Apr 5, 2021
f2ea1e0
FIX Fix usage of found packages with templated generator
dantegd Apr 5, 2021
3409853
FIX Faiss correct linking in tests
dantegd Apr 6, 2021
070916c
Merge branch 'branch-0.20' into 020-fea-cpm
dantegd Apr 6, 2021
f26653b
ENH Added static faiss option, removed cub and other updates
dantegd Apr 22, 2021
baad483
Merge branch '020-fea-cpm' of github.com:dantegd/raft into 020-fea-cpm
dantegd Apr 22, 2021
b26ed43
Update raft to use rapids-cmake
robertmaynard Apr 27, 2021
cd59825
correct raft's conda_env usage
robertmaynard Apr 27, 2021
512d0c1
Remove unneeded raft-config file
robertmaynard Apr 27, 2021
000a4d3
Remove unneeded linking to spdlog
robertmaynard Apr 27, 2021
38f45fd
remove unneeded setuptuils.py functions
robertmaynard Apr 29, 2021
e63be2e
build.sh updated to rapids-cmake and to support ninja generator
robertmaynard Apr 29, 2021
db291b6
FIX Small conflict resolution
robertmaynard Apr 27, 2021
71e257f
ENH Minor items in build.sh and cmakelists
dantegd May 5, 2021
a89d34e
Merge branch-0.20 into 020-fea-cpm
dantegd May 5, 2021
1f4a3e4
RAFT now install headers
robertmaynard May 7, 2021
a283ea2
Unable use faiss when testing is enabled
robertmaynard May 7, 2021
842af95
ENH C++17 update and remove unneeded imports
dantegd May 7, 2021
a4eeb7f
ENH Update get_nccl and get_ucx to not build from source for now
dantegd May 10, 2021
6f54e10
FIX Use https for fetching rapids-cmake as opposed to ssh
dantegd May 10, 2021
0af7d78
ENH Add get_cuco for upcoming PR that adds it
dantegd May 11, 2021
fcd4d12
FIX move cuco to test linking and correct deprecated warnings skip
dantegd May 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 15 additions & 28 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ PYTHON_DEPS_CLONE=${REPODIR}/python/external_repositories
BUILD_DIRS="${CPP_RAFT_BUILD_DIR} ${PY_RAFT_BUILD_DIR} ${PYTHON_DEPS_CLONE}"

# Set defaults for vars modified by flags to this script
VERBOSE=""
VERBOSE_FLAG=""
BUILD_ALL_GPU_ARCH=0
BUILD_GTEST=OFF
BUILD_STATIC_FAISS=OFF
Expand All @@ -58,6 +58,9 @@ INSTALL_PREFIX=${INSTALL_PREFIX:=${PREFIX:=${CONDA_PREFIX}}}
PARALLEL_LEVEL=${PARALLEL_LEVEL:=""}
BUILD_ABI=${BUILD_ABI:=ON}

# Default to Ninja if generator is not specified
export CMAKE_GENERATOR="${CMAKE_GENERATOR:=Ninja}"

function hasArg {
(( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
}
Expand All @@ -79,7 +82,8 @@ fi

# Process flags
if hasArg -v; then
VERBOSE=1
VERBOSE_FLAG=-v
set -x
fi
if hasArg -g; then
BUILD_TYPE=Debug
Expand Down Expand Up @@ -130,41 +134,24 @@ fi
# Configure for building all C++ targets
if (( ${NUMARGS} == 0 )) || hasArg cppraft; then
if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then
GPU_ARCH=""
RAFT_CMAKE_CUDA_ARCHITECTURES="NATIVE"
echo "Building for the architecture of the GPU in the system..."
else
GPU_ARCH="-DGPU_ARCHS=ALL"
RAFT_CMAKE_CUDA_ARCHITECTURES="ALL"
echo "Building for *ALL* supported GPU architectures..."
fi

mkdir -p ${CPP_RAFT_BUILD_DIR}
cd ${CPP_RAFT_BUILD_DIR}

cmake -DNVTX=${NVTX} \
-DPARALLEL_LEVEL=${PARALLEL_LEVEL} \
-DNCCL_PATH=${INSTALL_PREFIX} \
cmake -S ${REPODIR}/cpp -B ${CPP_RAFT_BUILD_DIR} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_CUDA_ARCHITECTURES=${RAFT_CMAKE_CUDA_ARCHITECTURES} \
-DNVTX=${NVTX} \
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
-DBUILD_GTEST=${BUILD_GTEST} \
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS} \
..

fi

# Run all make targets at once
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS}

MAKE_TARGETS=
if hasArg cppraft; then
MAKE_TARGETS="${MAKE_TARGETS} test_raft"
fi


# If `./build.sh pyraft` is called, don't build C/C++ components
if (( ${NUMARGS} == 0 )) || hasArg cppraft; then
# If there are no targets specified when calling build.sh, it will
# just call `make -j`. This avoids a lot of extra printing
cd ${CPP_RAFT_BUILD_DIR}
make -j${PARALLEL_LEVEL} ${MAKE_TARGETS} VERBOSE=${VERBOSE}

# Run all c++ targets at once
cmake --build ${CPP_RAFT_BUILD_DIR} -j${PARALLEL_LEVEL} ${MAKE_TARGETS} ${VERBOSE_FLAG}
fi


Expand Down
Loading