From 2e41f3d7d49e82aa8349e272fb748c519edeb3c5 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 16 Oct 2023 22:07:25 -0500 Subject: [PATCH] Add patch for libcudacxx memory resource. --- .../patches/libcudacxx/memory_resource.diff | 21 +++++++++++++++++++ rapids-cmake/cpm/versions.json | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 rapids-cmake/cpm/patches/libcudacxx/memory_resource.diff diff --git a/rapids-cmake/cpm/patches/libcudacxx/memory_resource.diff b/rapids-cmake/cpm/patches/libcudacxx/memory_resource.diff new file mode 100644 index 000000000..91d3887d1 --- /dev/null +++ b/rapids-cmake/cpm/patches/libcudacxx/memory_resource.diff @@ -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>()) + {} diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index e7f904895..1838e0a6c 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -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" } ] },