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

Add NVBench in CMake #8619

Merged
merged 10 commits into from
Jun 30, 2021
14 changes: 14 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
option(USE_NVTX "Build with NVTX support" ON)
option(BUILD_TESTS "Configure CMake to build tests" ON)
option(BUILD_BENCHMARKS "Configure CMake to build (google) benchmarks" OFF)
option(BUILD_NVBENCH "Configure CMake to build NVBench" OFF)
PointKernel marked this conversation as resolved.
Show resolved Hide resolved
option(BUILD_SHARED_LIBS "Build cuDF shared libraries" ON)
option(JITIFY_USE_CACHE "Use a file cache for JIT compiled kernels" ON)
option(CUDF_USE_ARROW_STATIC "Build and statically link Arrow libraries" OFF)
@@ -55,6 +56,7 @@ option(CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF)
message(VERBOSE "CUDF: Build with NVTX support: ${USE_NVTX}")
message(VERBOSE "CUDF: Configure CMake to build tests: ${BUILD_TESTS}")
message(VERBOSE "CUDF: Configure CMake to build (google) benchmarks: ${BUILD_BENCHMARKS}")
message(VERBOSE "CUDF: Configure CMake to build NVBench: ${BUILD_NVBENCH}")
message(VERBOSE "CUDF: Build cuDF shared libraries: ${BUILD_SHARED_LIBS}")
message(VERBOSE "CUDF: Use a file cache for JIT compiled kernels: ${JITIFY_USE_CACHE}")
message(VERBOSE "CUDF: Build and statically link Arrow libraries: ${CUDF_USE_ARROW_STATIC}")
@@ -68,6 +70,7 @@ message(VERBOSE "CUDF: Statically link the CUDA runtime: ${CUDA_STATIC_RUNTIME}"
set(DEFAULT_BUILD_TYPE "Release")
set(CUDF_BUILD_TESTS ${BUILD_TESTS})
set(CUDF_BUILD_BENCHMARKS ${BUILD_BENCHMARKS})
set(CUDF_BUILD_NVBENCH ${BUILD_NVBENCH})

set(CUDF_CXX_FLAGS "")
set(CUDF_CUDA_FLAGS "")
@@ -578,6 +581,17 @@ if(CUDF_BUILD_BENCHMARKS)
add_subdirectory(benchmarks)
endif()

if(CUDF_BUILD_NVBENCH)
PointKernel marked this conversation as resolved.
Show resolved Hide resolved
# Find or install NVBench
CPMFindPackage(NAME nvbench
GIT_REPOSITORY https://github.com/NVIDIA/nvbench.git
GIT_TAG main
GIT_SHALLOW TRUE
OPTIONS "NVBench_ENABLE_EXAMPLES OFF"
"NVBench_ENABLE_TESTING OFF")
add_subdirectory(nvbench)
PointKernel marked this conversation as resolved.
Show resolved Hide resolved
endif()

###################################################################################################
# - install targets -------------------------------------------------------------------------------