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 CCCL 2.2.0. #1315

Merged
merged 8 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
5 changes: 5 additions & 0 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
bdice marked this conversation as resolved.
Show resolved Hide resolved
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)

version=$(rapids-generate-version)

rapids-logger "Begin cpp build"

RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--channel "${LIBRMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
conda/recipes/libcuspatial

rapids-upload-conda-to-s3 cpp
14 changes: 13 additions & 1 deletion ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ version=$(rapids-generate-version)
commit=$(git rev-parse HEAD)

echo "${version}" > VERSION
for package_name in cuspatial cuproj; do
for package_name in cuspatial cuproj; do
sed -i "/^__git_commit__/ s/= .*/= \"${commit}\"/g" "${package_dir}/${package_name}/${package_name}/_version.py"
done

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 python)

rapids-logger "Begin py build cuSpatial"

Expand All @@ -28,6 +32,10 @@ rapids-logger "Begin py build cuSpatial"
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
conda/recipes/cuspatial

rapids-logger "Begin py build cuProj"
Expand All @@ -37,6 +45,10 @@ rapids-logger "Begin py build cuProj"
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
conda/recipes/cuproj

rapids-upload-conda-to-s3 python
4 changes: 4 additions & 0 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

Expand All @@ -29,6 +31,8 @@ rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
libcuspatial libcuspatial-tests

rapids-logger "Check GPU usage"
Expand Down
8 changes: 8 additions & 0 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ set -u
rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 python)

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
Expand All @@ -34,6 +38,10 @@ rapids-print-env
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
libcuspatial cuspatial cuproj

rapids-logger "Check GPU usage"
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmake/thirdparty/get_cudf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ endfunction()
set(CUSPATIAL_MIN_VERSION_cudf "${CUSPATIAL_VERSION_MAJOR}.${CUSPATIAL_VERSION_MINOR}")

if(NOT DEFINED CUSPATIAL_CUDF_GIT_REPO)
set(CUSPATIAL_CUDF_GIT_REPO https://github.com/rapidsai/cudf.git)
set(CUSPATIAL_CUDF_GIT_REPO https://github.com/bdice/cudf.git)
bdice marked this conversation as resolved.
Show resolved Hide resolved
endif()

if(NOT DEFINED CUSPATIAL_CUDF_GIT_TAG)
set(CUSPATIAL_CUDF_GIT_TAG branch-${CUSPATIAL_MIN_VERSION_cudf})
set(CUSPATIAL_CUDF_GIT_TAG cccl-2.2.0)
endif()

find_and_configure_cudf(VERSION ${CUSPATIAL_MIN_VERSION_cudf}.00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <cuspatial/range/multilinestring_range.cuh>
#include <cuspatial/traits.hpp>

#include <functional>
#include <rmm/device_uvector.hpp>
#include <rmm/exec_policy.hpp>

Expand All @@ -35,6 +34,8 @@
#include <thrust/iterator/transform_iterator.h>
#include <thrust/scan.h>

#include <cuda/functional>

#include <cstdint>

namespace cuspatial {
Expand Down
8 changes: 0 additions & 8 deletions cpp/include/cuspatial_test/vector_factories.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ auto make_device_uvector(std::initializer_list<T> inl,
return res;
}

// TODO: this can be eliminated when Thrust 2.1.0 is the minimum because
// thrust::host_vector has a constructor that takes an initializer_list
template <typename T>
auto make_host_vector(std::initializer_list<T> inl)
{
return thrust::host_vector<T>(inl.begin(), inl.end());
}

/**
* @brief Owning object of a multipolygon array following geoarrow layout.
*
Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/distance/linestring_distance_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ TYPED_TEST(PairwiseLinestringDistanceTest, FromLongInputs)
auto offset =
rmm::device_vector<int32_t>{std::vector<int32_t>{0, 100, 200, 300, 400, num_points}};

auto got = rmm::device_vector<T>{num_pairs};
auto expected = rmm::device_vector<T>{std::vector<T>{42.0, 42.0, 42.0, 42.0, 42.0}};
auto got = rmm::device_vector<T>(num_pairs);
auto expected = rmm::device_vector<T>{{42.0, 42.0, 42.0, 42.0, 42.0}};

auto mlinestrings1 = make_multilinestring_range(num_pairs,
thrust::make_counting_iterator(0),
Expand Down
34 changes: 17 additions & 17 deletions cpp/tests/index/point_quadtree_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ TYPED_TEST(QuadtreeOnPointIndexingTest, test_single)
max_size,
{0},
{0},
cuspatial::test::make_host_vector({false}),
thrust::host_vector{{false}},
{1},
{0});
}
Expand All @@ -120,7 +120,7 @@ TYPED_TEST(QuadtreeOnPointIndexingTest, test_two)
max_size,
{0, 3},
{0, 0},
cuspatial::test::make_host_vector({false, false}),
thrust::host_vector{{false, false}},
{1, 1},
{0, 1});
}
Expand All @@ -142,7 +142,7 @@ TYPED_TEST(QuadtreeOnPointIndexingTest, test_all_lowest_level_quads)
max_size,
{3, 12, 15},
{0, 1, 1},
cuspatial::test::make_host_vector({true, false, false}),
thrust::host_vector{{true, false, false}},
{2, 1, 1},
{1, 0, 1});
}
Expand Down Expand Up @@ -203,20 +203,20 @@ TYPED_TEST(QuadtreeOnPointIndexingTest, test_small)
max_size,
{0, 1, 2, 0, 1, 3, 4, 7, 5, 6, 13, 14, 28, 31},
{0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2},
cuspatial::test::make_host_vector({true,
true,
false,
false,
true,
true,
false,
true,
false,
false,
false,
false,
false,
false}),
thrust::host_vector{{true,
true,
false,
false,
true,
true,
false,
true,
false,
false,
false,
false,
false,
false}},
{3, 2, 11, 7, 2, 2, 9, 2, 9, 7, 5, 8, 8, 7},
{3, 6, 60, 0, 8, 10, 36, 12, 7, 16, 23, 28, 45, 53});
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ TYPED_TEST(PairwisePointInPolygonTest, OnePolygonOneRing)
poly_point.size(),
poly_point.begin());

auto got = rmm::device_vector<uint8_t>(1);
auto expected =
cuspatial::test::make_host_vector({false, false, false, false, true, true, true, true});
auto got = rmm::device_vector<uint8_t>(1);
auto expected = thrust::host_vector{{false, false, false, false, true, true, true, true}};

for (size_t i = 0; i < point_list.size(); ++i) {
auto p = point_list[i];
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/utility_test/test_float_equivalent.cu
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void run_test(T base)
rmm::device_vector<T> d_first(first);
rmm::device_vector<T> d_second(second);

auto expected = make_host_vector({true, false, true, false});
auto expected = thrust::host_vector{{true, false, true, false}};
rmm::device_vector<bool> got(4);

thrust::transform(
Expand Down
2 changes: 2 additions & 0 deletions fetch_rapids.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================
set(rapids-cmake-repo bdice/rapids-cmake)
set(rapids-cmake-branch cuco-cccl-2.2.0)
bdice marked this conversation as resolved.
Show resolved Hide resolved
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake
${CMAKE_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake
Expand Down
Loading