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

Make copy_parameters_t user-facing and beef it up #466

Closed
eyalroz opened this issue Feb 17, 2023 · 0 comments
Closed

Make copy_parameters_t user-facing and beef it up #466

eyalroz opened this issue Feb 17, 2023 · 0 comments

Comments

@eyalroz
Copy link
Owner

eyalroz commented Feb 17, 2023

Our copy_parameters_t template, inheriting from the CUDA driver's 2D and 3D copy parameters structs respectively, is currently only used for copying arrays. But - it is, in fact, the general-purpose copying primitive. Its use could, in theory, replace all other driver copying APIs; and in fact, with CUDA graphs, it does so.

It therefore makes sense that we offer some kind of "general copy parameters" structure for the user to play with, then pass on to cuda::memory::copy().

We'll begin by exposing the structure to the user and adding some convenience methods; but later on we should probably also protect the user from passing the structure without proper initialization, and generally make this into more of a builder class than an inheritor of the raw structure.

@eyalroz eyalroz self-assigned this Feb 17, 2023
@eyalroz eyalroz changed the title Make copy Make copy_parameters_t user-facing and beef it up Feb 17, 2023
eyalroz added a commit that referenced this issue Feb 17, 2023
* `copy_parameters_t<N>` is now out of `detail_` - and in it's own file
* The `endpoint_t` enum is now also out of `detail_` (and in `copy_parameters.hpp`)
* Our array-to-raw-mem copy function now determines the destination address' context
* Add an array-to-raw-mem copy function which takes the destination context explicitly
eyalroz added a commit that referenced this issue Feb 18, 2023
* Added a memory::type_t enum value, `non_cuda`, for memory not allocated by CUDA
* `memory::type_of()` will no longer fail for non-CUDA-allocated memory
* `copy_parameters_t<N>` is not out of `detail_`.
* The `endpoint_t` enum is now also out of `detail_`
* Beefed up `copy_parameters_t<N>` with additional convenience methods
*`copy_parameters_t<N>` now "recognizes" non-CUDA-allocated memory, treating it like CUDA host memory
* Our array-to-raw-mem copy function now determines the destination address' context
* Add an array-to-raw-mem copy function which takes the destination context explicitly
eyalroz added a commit that referenced this issue Feb 18, 2023
* Added a memory::type_t enum value, `non_cuda`, for memory not allocated by CUDA
* `memory::type_of()` will no longer fail for non-CUDA-allocated memory
* `copy_parameters_t<N>` is not out of `detail_`.
* The `endpoint_t` enum is now also out of `detail_`
* Beefed up `copy_parameters_t<N>` with additional convenience methods
*`copy_parameters_t<N>` now "recognizes" non-CUDA-allocated memory, treating it like CUDA host memory
* Our array-to-raw-mem copy function now determines the destination address' context
* Add an array-to-raw-mem copy function which takes the destination context explicitly
eyalroz added a commit that referenced this issue Mar 9, 2023
* Added a memory::type_t enum value, `non_cuda`, for memory not allocated by CUDA
* `memory::type_of()` will no longer fail for non-CUDA-allocated memory
* `copy_parameters_t<N>` is not out of `detail_`.
* The `endpoint_t` enum is now also out of `detail_`
* Beefed up `copy_parameters_t<N>` with additional convenience methods
*`copy_parameters_t<N>` now "recognizes" non-CUDA-allocated memory, treating it like CUDA host memory
* Our array-to-raw-mem copy function now determines the destination address' context
* Add an array-to-raw-mem copy function which takes the destination context explicitly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant