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

Unify async and non-async operations using optional_ref<const stream_t> optional arguments #689

Open
eyalroz opened this issue Oct 20, 2024 · 0 comments
Assignees
Labels

Comments

@eyalroz
Copy link
Owner

eyalroz commented Oct 20, 2024

In the comments re issue #641 , I sketch out an approach to unifying the copy functions involving optional_ref<const stream_t> for the same wrapper API call usable both for async and non-async variants of CUDA's own APIs. This is also applicable to other operations in the cuda::memory::async namespace: set(), zero(), allocate(), free(). If we adopt that approach for copying, let's also have it for these operations.

@eyalroz eyalroz added the task label Oct 20, 2024
@eyalroz eyalroz self-assigned this Oct 20, 2024
eyalroz added a commit that referenced this issue Oct 21, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Oct 26, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Oct 26, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Oct 28, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Nov 15, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Nov 16, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Nov 16, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Nov 16, 2024
…t()`, `set()` and zero()` - now out of the namespace, and unified with their non-async variants
eyalroz added a commit that referenced this issue Nov 16, 2024
…opy functions:

* All copy functions now take an optional stream via an `optional_ref` parameter;
* No longer using the `cuda::memory::async` subnamespace for any copy functions; they are all directly in `cuda::memory`
* Fixes #688: Now supporting async copy using copy parameters structures
* Explicitly including `memory.hpp` in `multi_wrapper_impls/memory.hpp`
eyalroz added a commit that referenced this issue Nov 16, 2024
* Operations affected include: `allocate()`, `free()`, typed_set()`, `set()`, zero()`
* Combined (kinda-)synchronous and asynchronous operations using an `optional_ref<stream_t>` extra parameter, defauling to `{}`/`nullopt` for the synchronous version
* Already done with `copy()` in an earlier commit
* `prefetch()` and `prefetch_to_host()` also affected, but no additional parameter is necesary
* Operations affected include: `allocate()`, `free()`, typed_set()`, `set()`, zero()`
* Comment tweaks
* Removed some redundant code
eyalroz added a commit that referenced this issue Nov 16, 2024
…opy functions:

* All copy functions now take an optional stream via an `optional_ref` parameter;
* No longer using the `cuda::memory::async` subnamespace for any copy functions; they are all directly in `cuda::memory`
* Fixes #688: Now supporting async copy using copy parameters structures
* Explicitly including `memory.hpp` in `multi_wrapper_impls/memory.hpp`
eyalroz added a commit that referenced this issue Nov 16, 2024
* Operations affected include: `allocate()`, `free()`, typed_set()`, `set()`, zero()`
* Combined (kinda-)synchronous and asynchronous operations using an `optional_ref<stream_t>` extra parameter, defauling to `{}`/`nullopt` for the synchronous version
* Already done with `copy()` in an earlier commit
* `prefetch()` and `prefetch_to_host()` also affected, but no additional parameter is necesary
* Operations affected include: `allocate()`, `free()`, typed_set()`, `set()`, zero()`
* Comment tweaks
* Removed some redundant code
eyalroz added a commit that referenced this issue Nov 17, 2024
…opy functions:

* All copy functions now take an optional stream via an `optional_ref` parameter;
* No longer using the `cuda::memory::async` subnamespace for any copy functions; they are all directly in `cuda::memory`
* Fixes #688: Now supporting async copy using copy parameters structures
* Explicitly including `memory.hpp` in `multi_wrapper_impls/memory.hpp`
eyalroz added a commit that referenced this issue Nov 17, 2024
* Operations affected include: `allocate()`, `free()`, typed_set()`, `set()`, zero()`
* Combined (kinda-)synchronous and asynchronous operations using an `optional_ref<stream_t>` extra parameter, defauling to `{}`/`nullopt` for the synchronous version
* Already done with `copy()` in an earlier commit
* `prefetch()` and `prefetch_to_host()` also affected, but no additional parameter is necesary
* Operations affected include: `allocate()`, `free()`, typed_set()`, `set()`, zero()`
* Comment tweaks
* Removed some redundant code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant