Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Implement {async_}resource_ref #309

Merged
merged 9 commits into from
Mar 6, 2023
Merged

Conversation

miscco
Copy link
Collaborator

@miscco miscco commented Aug 30, 2022

This implements the NVIDIA internal proposal for a any_resource_ref abstraction that facilitates the handling of memory allocations on host and device side.

To facilitate adoption the proposal is backported to C++14 / C++17 through a concept emulation designed by @ericniebler. Unfortunately, C++11 is too far a stretch due to missing support for constexpr variables.

Currently only plain any_resource_ref resource is implemented, as async_resource_ref is more or less a straightforward extension.

Things still to do:

  • Implement async_resource_ref
  • Implement equality_comparable concept
  • Write some documentation

include/cuda/memory_resource Outdated Show resolved Hide resolved
include/cuda/memory_resource Outdated Show resolved Hide resolved
include/cuda/memory_resource Outdated Show resolved Hide resolved
@jrhemstad
Copy link
Collaborator

jrhemstad commented Aug 30, 2022

fyi @miscco we'll likely want to steal some things from #158, like stream_view (though probably rename to stream_ref) and maybe some of the exception stuff. It also has quite a few tests that could be helpful for showing what kind of tests we want here.

@miscco miscco force-pushed the memory_resource branch 7 times, most recently from a76195e to 72bafd0 Compare September 6, 2022 09:38
@miscco miscco changed the base branch from main to concepts September 8, 2022 09:43
@miscco
Copy link
Collaborator Author

miscco commented Sep 8, 2022

NOTE to reviewers:

I have pushed the concept emulation into its own branch and targeted this PR to that branch. Consequentlly, we can review only the memory_resource part of the PR. Before merging we would need to change the target branch back to main

@miscco miscco deleted the branch NVIDIA:main January 11, 2023 07:35
@miscco miscco closed this Jan 11, 2023
@miscco miscco reopened this Jan 11, 2023
@miscco miscco changed the base branch from concepts to main January 11, 2023 14:25
@harrism
Copy link
Collaborator

harrism commented Dec 6, 2023

I'm bothered that this was merged without finishing the documentation checkbox. At least a new issue should be opened when that happens.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants