Skip to content

Commit

Permalink
use CCCL 2.3.2 and add patch to backport ambiguous calls to addressof
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Apr 2, 2024
1 parent bf3faf0 commit b636b2d
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 3 deletions.
77 changes: 77 additions & 0 deletions rapids-cmake/cpm/patches/cccl/backport_pr_1499.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
From 282f768361bf101798160ca883a24a6e30041aa2 Mon Sep 17 00:00:00 2001
From: Michael Schellenberger Costa <miscco@nvidia.com>
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<!detail::is_optional<detail::decay_t<U>>::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<U>::value, "U must be an lvalue");
}

@@ -2733,7 +2733,7 @@ public:
__host__ __device__
optional &operator=(U &&u) {
static_assert(std::is_lvalue_reference<U>::value, "U must be an lvalue");
- m_value = addressof(u);
+ m_value = thrust::addressof(u);
return *this;
}

@@ -2745,7 +2745,7 @@ public:
template <class U>
__host__ __device__
optional &operator=(const optional<U> &rhs) {
- m_value = addressof(rhs.value());
+ m_value = thrust::addressof(rhs.value());
return *this;
}

--
2.43.2

11 changes: 8 additions & 3 deletions rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
]
},
Expand Down

0 comments on commit b636b2d

Please sign in to comment.