From b636b2d97237e3cd57ff92c5e7318f745cca1920 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 2 Apr 2024 14:48:34 -0700 Subject: [PATCH] use CCCL 2.3.2 and add patch to backport ambiguous calls to addressof --- .../cpm/patches/cccl/backport_pr_1499.diff | 77 +++++++++++++++++++ rapids-cmake/cpm/versions.json | 11 ++- 2 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 rapids-cmake/cpm/patches/cccl/backport_pr_1499.diff diff --git a/rapids-cmake/cpm/patches/cccl/backport_pr_1499.diff b/rapids-cmake/cpm/patches/cccl/backport_pr_1499.diff new file mode 100644 index 00000000..fbdfff65 --- /dev/null +++ b/rapids-cmake/cpm/patches/cccl/backport_pr_1499.diff @@ -0,0 +1,77 @@ +From 282f768361bf101798160ca883a24a6e30041aa2 Mon Sep 17 00:00:00 2001 +From: Michael Schellenberger Costa +Date: Thu, 7 Mar 2024 12:09:23 -0800 +Subject: [PATCH] Fix issues with ambiguous calls to `addressof` in + `thrust::optional` (#1499) + +This is breaking rmm transition +--- + thrust/thrust/optional.h | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/thrust/thrust/optional.h b/thrust/thrust/optional.h +index a02150698..0a9aa06c3 100644 +--- a/thrust/thrust/optional.h ++++ b/thrust/thrust/optional.h +@@ -1621,11 +1621,11 @@ public: + using thrust::swap; + swap(**this, *rhs); + } else { +- new (addressof(rhs.m_value)) T(std::move(this->m_value)); ++ new (thrust::addressof(rhs.m_value)) T(std::move(this->m_value)); + this->m_value.T::~T(); + } + } else if (rhs.has_value()) { +- new (addressof(this->m_value)) T(std::move(rhs.m_value)); ++ new (thrust::addressof(this->m_value)) T(std::move(rhs.m_value)); + rhs.m_value.T::~T(); + } + } +@@ -1637,7 +1637,7 @@ public: + __thrust_exec_check_disable__ + __host__ __device__ + constexpr const T *operator->() const { +- return addressof(this->m_value); ++ return thrust::addressof(this->m_value); + } + + /// \group pointer +@@ -1645,7 +1645,7 @@ public: + __thrust_exec_check_disable__ + __host__ __device__ + THRUST_OPTIONAL_CPP11_CONSTEXPR T *operator->() { +- return addressof(this->m_value); ++ return thrust::addressof(this->m_value); + } + + /// \return the stored value +@@ -2691,7 +2691,7 @@ public: + detail::enable_if_t>::value> + * = nullptr> + __host__ __device__ +- constexpr optional(U &&u) : m_value(addressof(u)) { ++ constexpr optional(U &&u) : m_value(thrust::addressof(u)) { + static_assert(std::is_lvalue_reference::value, "U must be an lvalue"); + } + +@@ -2733,7 +2733,7 @@ public: + __host__ __device__ + optional &operator=(U &&u) { + static_assert(std::is_lvalue_reference::value, "U must be an lvalue"); +- m_value = addressof(u); ++ m_value = thrust::addressof(u); + return *this; + } + +@@ -2745,7 +2745,7 @@ public: + template + __host__ __device__ + optional &operator=(const optional &rhs) { +- m_value = addressof(rhs.value()); ++ m_value = thrust::addressof(rhs.value()); + return *this; + } + +-- +2.43.2 + diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 5cc02ba8..17f352e5 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -6,9 +6,9 @@ "git_tag" : "v${version}" }, "CCCL" : { - "version" : "2.2.0", - "git_url" : "https://github.com/NVIDIA/cccl.git", - "git_tag" : "v${version}", + "version" : "2.3.2", + "git_url" : "https://github.com/trxcllnt/cccl.git", + "git_tag" : "cccl-${version}-rapids-24.02", "patches" : [ { "file" : "cccl/bug_fixes.diff", @@ -24,6 +24,11 @@ "file" : "cccl/revert_pr_211.diff", "issue" : "thrust::copy introduced a change in behavior that causes failures with cudaErrorInvalidValue.", "fixed_in" : "" + }, + { + "file" : "cccl/backport_pr_1499.diff", + "issue" : "Fix issues with ambiguous calls to addressof in thrust::optional.", + "fixed_in" : "2.4" } ] },