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 patch for libcudacxx memory resource. #476

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 22 additions & 0 deletions rapids-cmake/cpm/patches/libcudacxx/memory_resource.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/include/cuda/memory_resource b/include/cuda/memory_resource
index 4a904cda..32f3f210 100644
--- a/include/cuda/memory_resource
+++ b/include/cuda/memory_resource
@@ -525,7 +525,16 @@ public:
&& (((_Alloc_type == _AllocType::_Default) && resource_with<_Resource, _Properties...>) //
||((_Alloc_type == _AllocType::_Async) && async_resource_with<_Resource, _Properties...>)))) //
basic_resource_ref(_Resource& __res) noexcept
- : _Resource_ref_base<_Alloc_type>(&__res, &__alloc_vtable<_Alloc_type, _Resource>)
+ : _Resource_ref_base<_Alloc_type>(_CUDA_VSTD::addressof(__res), &__alloc_vtable<_Alloc_type, _Resource>)
+ , _Filtered_vtable<_Properties...>(_Filtered_vtable<_Properties...>::template _Create<_Resource>())
+ {}
+
+ _LIBCUDACXX_TEMPLATE(class _Resource)
+ (requires (!_Is_basic_resource_ref<_Resource>
+ && (((_Alloc_type == _AllocType::_Default) && resource_with<_Resource, _Properties...>) //
+ ||((_Alloc_type == _AllocType::_Async) && async_resource_with<_Resource, _Properties...>)))) //
+ basic_resource_ref(_Resource* __res) noexcept
+ : _Resource_ref_base<_Alloc_type>(__res, &__alloc_vtable<_Alloc_type, _Resource>)
, _Filtered_vtable<_Properties...>(_Filtered_vtable<_Properties...>::template _Create<_Resource>())
{}

5 changes: 5 additions & 0 deletions rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
"file" : "libcudacxx/proclaim_return_type_nv_exec_check_disable.diff",
"issue" : "Use pragma to disable execution checks in cuda::proclaim_return_type. [https://github.com/NVIDIA/libcudacxx/pull/448]",
"fixed_in" : "2.2"
},
{
"file" : "libcudacxx/memory_resource.diff",
"issue" : "Allow {async_}resource_ref to be constructible from a pointer. [https://github.com/NVIDIA/libcudacxx/pull/439]",
"fixed_in" : "2.2"
}
]
},
Expand Down