From c35fe6629f9368ecd873108b8430d48ee4c11999 Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Sat, 19 Jun 2021 13:53:47 -0700 Subject: [PATCH 1/3] applying review comments --- ci/release/update-version.sh | 2 +- cpp/examples/basic/CMakeLists.txt | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 4d7296eb060..b52b246af25 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -58,4 +58,4 @@ sed_runner "s/version == ${CURRENT_SHORT_TAG}/version == ${NEXT_SHORT_TAG}/g" RE sed_runner "s/cudf=${CURRENT_SHORT_TAG}/cudf=${NEXT_SHORT_TAG}/g" README.md # Libcudf examples update -sed_runner "s/CUDF_TAG \"branch-${CURRENT_SHORT_TAG}\"/CUDF_TAG \"branch-${NEXT_SHORT_TAG}\"/" cpp/examples/basic/CMakeLists.txt +sed_runner "s/CUDF_TAG branch-${CURRENT_SHORT_TAG}/CUDF_TAG branch-${NEXT_SHORT_TAG}/" cpp/examples/basic/CMakeLists.txt diff --git a/cpp/examples/basic/CMakeLists.txt b/cpp/examples/basic/CMakeLists.txt index 4d444f88a16..79d072c5eab 100644 --- a/cpp/examples/basic/CMakeLists.txt +++ b/cpp/examples/basic/CMakeLists.txt @@ -1,23 +1,12 @@ cmake_minimum_required(VERSION 3.18) -project(basic_example VERSION 0.0.1 LANGUAGES C CXX CUDA) +project(basic_example VERSION 0.0.1 LANGUAGES CXX) -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CUDA_ARCHITECTURES "") -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - -set(CPM_DOWNLOAD_VERSION 0.27.2) -set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") - -set(CUDF_TAG "branch-21.08") - -if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) - message(STATUS "Downloading CPM.cmake") - file(DOWNLOAD https://github.com/TheLartians/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake ${CPM_DOWNLOAD_LOCATION}) -endif() - -include(${CPM_DOWNLOAD_LOCATION}) +set(CPM_DOWNLOAD_VERSION v0.32.2) +file(DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/${CPM_DOWNLOAD_VERSION}/get_cpm.cmake ${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake) +include(${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake) +set(CUDF_TAG branch-21.08) CPMFindPackage(NAME cudf GIT_REPOSITORY https://github.com/rapidsai/cudf GIT_TAG ${CUDF_TAG} @@ -25,6 +14,8 @@ CPMFindPackage(NAME cudf SOURCE_SUBDIR cpp ) + # Configure your project here -add_executable(${PROJECT_NAME} "src/process_csv.cpp") -target_link_libraries(${PROJECT_NAME} cudf::cudf) +add_executable(basic_example src/process_csv.cpp) +target_link_libraries(basic_example PRIVATE cudf::cudf) +target_compile_features(basic_example PRIVATE cxx_std_17) From 120999662bc5d459675e5543399c27ce1ad7390b Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Mon, 21 Jun 2021 09:53:26 -0700 Subject: [PATCH 2/3] Build libcudf examples after both project flash and regular path --- ci/gpu/build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index c14b8302ef0..80045f742c8 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -192,9 +192,6 @@ else "$WORKSPACE/build.sh" cudf dask_cudf cudf_kafka -l --ptds fi - # If examples grows too large to build, should move to cpu side - gpuci_logger "Building libcudf examples" - $WORKSPACE/cpp/examples/build.sh fi # Both regular and Project Flash proceed here @@ -206,6 +203,13 @@ if [ "$np_ver" == "1.16" ];then export NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1 fi +################################################################################ +# BUILD - Build libcudf examples +################################################################################ + +# If examples grows too large to build, should move to cpu side +gpuci_logger "Building libcudf examples" +$WORKSPACE/cpp/examples/build.sh ################################################################################ # TEST - Run py.test, notebooks From 34958d74927f0ca2ff9e13ddc0ebcd2d1c7bc956 Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Mon, 21 Jun 2021 09:53:39 -0700 Subject: [PATCH 3/3] . --- ci/gpu/build.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 80045f742c8..1d0154aedc7 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -196,13 +196,6 @@ fi # Both regular and Project Flash proceed here -# set environment variable for numpy 1.16 -# will be enabled for later versions by default -np_ver=$(python -c "import numpy; print('.'.join(numpy.__version__.split('.')[:-1]))") -if [ "$np_ver" == "1.16" ];then - export NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1 -fi - ################################################################################ # BUILD - Build libcudf examples ################################################################################ @@ -211,6 +204,13 @@ fi gpuci_logger "Building libcudf examples" $WORKSPACE/cpp/examples/build.sh +# set environment variable for numpy 1.16 +# will be enabled for later versions by default +np_ver=$(python -c "import numpy; print('.'.join(numpy.__version__.split('.')[:-1]))") +if [ "$np_ver" == "1.16" ];then + export NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1 +fi + ################################################################################ # TEST - Run py.test, notebooks ################################################################################