Skip to content

Commit

Permalink
Add patch for libcudacxx memory resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Oct 17, 2023
1 parent 5a01aa2 commit 2e41f3d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions rapids-cmake/cpm/patches/libcudacxx/memory_resource.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/include/cuda/memory_resource b/include/cuda/memory_resource
index 4a904cdaa..32f3f2108 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

0 comments on commit 2e41f3d

Please sign in to comment.