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

Rework libcuspatial CMakeLists.txt to export targets for CPM #365

Merged
merged 58 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
2e8f4e9
Update CMakeLists.txt to export cuspatial library targets, use CPM
trxcllnt Feb 3, 2021
6b103cf
remove JITIFY_USE_CACHE target compile definition
trxcllnt Feb 3, 2021
b715df6
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Feb 23, 2021
da61c7a
add CUDF binary dir to CMAKE_PREFIX_PATH
trxcllnt Feb 24, 2021
02d2696
update CMake configuration to match libcudf's latest changes
trxcllnt Feb 24, 2021
24ebc24
Fix warnings surfaced by -Wall
trxcllnt Feb 24, 2021
cb9faba
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Mar 2, 2021
7b48603
switch cudf to main RAPIDS repo
trxcllnt Mar 2, 2021
c1faa3d
handle ALL result from evaluate_gpu_archs like cuDF does
trxcllnt Mar 2, 2021
c796358
set CUSPATIAL_MIN_VERSION_cudf correctly
trxcllnt Mar 2, 2021
21c3799
use CPM to find or add RMM
trxcllnt Mar 2, 2021
046cd09
Pass BUILD_TESTS and BUILD_BENCHMARKS down to libcudf build, so cudf:…
trxcllnt Mar 2, 2021
cf77333
set THREADS_PREFER_PTHREAD_FLAG because without it, GoogleBench break…
trxcllnt Mar 2, 2021
15210f2
find RMM in cuspatial-target install config files
trxcllnt Mar 2, 2021
ac10bc7
don't add GTest/GMock, because cudf::cudftestutil should have it
trxcllnt Mar 2, 2021
fb6acbf
use CPMFindPackage to get GTest and GMock again
trxcllnt Mar 2, 2021
cc02a83
fix typo
trxcllnt Mar 2, 2021
67983a9
add main targets to test/bench executables
trxcllnt Mar 2, 2021
46c39af
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Mar 11, 2021
712bb71
Update cuSpatial to use cuDF branch with cudftestutil fix
trxcllnt Mar 11, 2021
4fca5a0
inherit rmm::rmm target from cudf::cudf
trxcllnt Mar 11, 2021
7a2d58e
set cudf_DIR for building locally
trxcllnt Mar 11, 2021
8b3d196
don't pass CMAKE_CUDA_ARCHITECTURES to CPMFindPackage
trxcllnt Mar 12, 2021
49c7f7a
use OFF instead of NO
trxcllnt Mar 12, 2021
20bef1a
inherit CUDA library link targets from cudf::cudf
trxcllnt Mar 12, 2021
ad7f56d
switch fork/branch back to rapidsai
trxcllnt Mar 12, 2021
e6a8c55
use list(PREPEND) to modify CMAKE_PREFIX_PATH
trxcllnt Mar 12, 2021
687d9d3
run CMake with log level TRACE to debug CI
trxcllnt Mar 13, 2021
157d3d3
set conda block back to align with cudf
trxcllnt Mar 13, 2021
c9ad3fd
switch back to cudf/pulls/7574 branch to test cmake install tweaks
trxcllnt Mar 13, 2021
3d0578d
switch cudf dependency back to rapidsai fork
trxcllnt Mar 13, 2021
83b2afa
set GPU archs like cuDF does
trxcllnt Mar 17, 2021
3134c61
define -DCUDAToolkit_INCLUDE_DIR for CI
trxcllnt Mar 18, 2021
38d132e
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Mar 18, 2021
de428b0
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Mar 19, 2021
62e2bcd
print CUDAToolkit_ROOT for debugging CI
trxcllnt Mar 20, 2021
dcb9532
allow CUDAToolkit_ROOT env var in conda builds
trxcllnt Mar 22, 2021
1984893
remove explicit CUDAToolkit cmake args
trxcllnt Mar 22, 2021
9373b19
replace CPMFindPackage with find_package to test in CI
trxcllnt Mar 22, 2021
c8b414b
don't set CMAKE_PREFIX_PATH for now
trxcllnt Mar 22, 2021
859c96e
add gtest/gmock to conda build environments
trxcllnt Mar 22, 2021
c9e2b69
support building for all GPU archs in build.sh
trxcllnt Mar 22, 2021
7911462
use CPM to get RMM and GTest to work around CMake global imports issue
trxcllnt Mar 22, 2021
dfa5f30
fix typo
trxcllnt Mar 22, 2021
cfc108b
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Mar 25, 2021
c211c9b
link cudf aliases of gtest/gmock/benchmark, cleanup to align with cud…
trxcllnt Mar 26, 2021
8e22c5d
remove unused options
trxcllnt Mar 26, 2021
187ddbb
use cmake >= 3.18 in conda build
trxcllnt Mar 26, 2021
1f7c72a
use GTest and benchmark targets
trxcllnt Mar 26, 2021
58bfde5
don't add cudf_BINARY_DIR to CMAKE_PREFIX_PATH
trxcllnt Mar 26, 2021
d74e5b4
move gtest and gmock to host requirements
trxcllnt Mar 26, 2021
61bb18c
remove gtest/gmock from libcuspatial/meta.yml
trxcllnt Mar 29, 2021
7efc3e4
remove CUDAToolkit_ROOT env var from libcuspatial conda build
trxcllnt Mar 29, 2021
206bce2
set local mr var, update copyright
trxcllnt Mar 30, 2021
5414470
use make_constant_iterator, update copyright
trxcllnt Mar 30, 2021
1e6132e
update copyright
trxcllnt Mar 30, 2021
724fc2c
note GDAL promotion
trxcllnt Mar 30, 2021
6efe7f6
use libcudf's libcudacxx in cuspatial Cython
trxcllnt Mar 30, 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
29 changes: 23 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARGS=$*
# script, and that this script resides in the repo dir!
REPODIR=$(cd $(dirname $0); pwd)

VALIDARGS="clean libcuspatial cuspatial tests -v -g -n -h --show_depr_warn"
VALIDARGS="clean libcuspatial cuspatial tests -v -g -n -h --allgpuarch --show_depr_warn"
HELP="$0 [clean] [libcuspatial] [cuspatial] [tests] [-v] [-g] [-n] [-h] [-l] [--show_depr_warn]
clean - remove all existing build artifacts and configuration (start
over)
Expand All @@ -29,6 +29,7 @@ HELP="$0 [clean] [libcuspatial] [cuspatial] [tests] [-v] [-g] [-n] [-h] [-l] [--
-g - build for debug
-n - no install step
-h - print this text
--allgpuarch - build for all supported GPU architectures
--show_depr_warn - show cmake deprecation warnings
default action (no args) is to build and install 'libcuspatial' then
'cuspatial' targets
Expand All @@ -41,6 +42,7 @@ BUILD_DIRS="${LIBCUSPATIAL_BUILD_DIR} ${CUSPATIAL_BUILD_DIR}"
VERBOSE_FLAG=""
BUILD_TESTS=OFF
BUILD_TYPE=Release
BUILD_ALL_GPU_ARCH=0
INSTALL_TARGET=install
BUILD_DISABLE_DEPRECATION_WARNING=ON

Expand Down Expand Up @@ -79,7 +81,10 @@ fi
if hasArg -n; then
INSTALL_TARGET=""
fi
if hasArg --show-_depr_warn; then
if hasArg --allgpuarch; then
BUILD_ALL_GPU_ARCH=1
fi
if hasArg --show_depr_warn; then
BUILD_DISABLE_DEPRECATION_WARNING=OFF
fi

Expand All @@ -101,19 +106,32 @@ if hasArg clean; then
done
fi

if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then
CUSPATIAL_CMAKE_CUDA_ARCHITECTURES="-DCMAKE_CUDA_ARCHITECTURES="
echo "Building for the architecture of the GPU in the system..."
else
CUSPATIAL_CMAKE_CUDA_ARCHITECTURES=""
echo "Building for *ALL* supported GPU architectures..."
fi

################################################################################
# Configure, build, and install libcuspatial
if (( ${NUMARGS} == 0 )) || hasArg libcuspatial; then

mkdir -p ${LIBCUSPATIAL_BUILD_DIR}
cd ${LIBCUSPATIAL_BUILD_DIR}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
${CUSPATIAL_CMAKE_CUDA_ARCHITECTURES} \
-DCMAKE_CXX11_ABI=ON \
-DBUILD_TESTS=${BUILD_TESTS} \
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
..

cmake --build . -j ${PARALLEL_LEVEL} --target install ${VERBOSE_FLAG}
cmake --build . -j ${PARALLEL_LEVEL} ${VERBOSE_FLAG}

if [[ ${INSTALL_TARGET} != "" ]]; then
cmake --build . -j ${PARALLEL_LEVEL} --target install ${VERBOSE_FLAG}
fi
fi

# Build and install the cuspatial Python package
Expand All @@ -127,4 +145,3 @@ if (( ${NUMARGS} == 0 )) || hasArg cuspatial; then
PARALLEL_LEVEL=${PARALLEL_LEVEL} python setup.py build_ext --inplace --library-dir=${LIBCUSPATIAL_BUILD_DIR}
fi
fi

2 changes: 2 additions & 0 deletions conda/environments/cuspatial_dev_cuda10.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ dependencies:
- geopandas=0.7.0
- cmake>=3.14
- cython>=0.29,<0.30
- gtest
- gmock
2 changes: 2 additions & 0 deletions conda/environments/cuspatial_dev_cuda10.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ dependencies:
- geopandas=0.7.0
- cmake>=3.14
- cython>=0.29,<0.30
- gtest
- gmock
2 changes: 2 additions & 0 deletions conda/environments/cuspatial_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ dependencies:
- geopandas=0.7.0
- cmake>=3.14
- cython>=0.29,<0.30
- gtest
- gmock
4 changes: 2 additions & 2 deletions conda/recipes/libcuspatial/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# build cuspatial with verbose output
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
./build.sh -v libcuspatial
./build.sh -v libcuspatial --allgpuarch
else
./build.sh -v libcuspatial tests
./build.sh -v libcuspatial tests --allgpuarch
fi
3 changes: 1 addition & 2 deletions conda/recipes/libcuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ build:

requirements:
build:
- cmake >=3.12.4
- cmake >=3.18
host:
- libcudf {{ minor_version }}.*
- librmm {{ minor_version }}.*
Expand All @@ -52,4 +52,3 @@ about:
license_family: Apache
license_file: LICENSE
summary: libcuspatial library

Loading