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

Array-to-raw-mem copy function must either get a context or determine it #467

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

Comments

@eyalroz
Copy link
Owner

eyalroz commented Feb 17, 2023

We currently offer the function:

template <typename T>
void copy(T *destination, const array_t<T, NumDimensions>& source);

for copying an array to raw memory. However - this does not indicate what the context is, and we're just ignoring it when setting the copy parameters. We should not be doing that. This function should determine the pointer's context, and we should also offer a function which takes the context as well:

template <typename T>
void copy(const context_t& context, T *destination, const array_t<T, NumDimensions>& source);
@eyalroz eyalroz added the bug label Feb 17, 2023
@eyalroz eyalroz self-assigned this 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