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

Support different allocation modes in device allocator #1207

Closed
upsj opened this issue Nov 21, 2022 · 2 comments
Closed

Support different allocation modes in device allocator #1207

upsj opened this issue Nov 21, 2022 · 2 comments
Labels
is:todo This issue describes a concrete task to be done

Comments

@upsj
Copy link
Member

upsj commented Nov 21, 2022

CUDA and HIP provide functions for allocating unified memory (cudaMallocManaged) and pinned host memory (cudaMallocHost), which transparently allow access to both host and device. They might be interesting in application integrations (hybrid CPU/GPU workloads) and MPI (pinned host buffers if not GPU-aware). A first suggestion for the design would be providing _host and _unified (or _shared) overloads to (raw_)alloc and (raw_)free, as well as adding an enum class allocation_type to ExecutorDeleter. We could use another overload to gko::array taking this enum as a final parameter, to enable a straightforward integration into the rest of Ginkgo.

@MarcelKoch
Copy link
Member

Currently, our cuda and hip executors can already allocate unified memory through the allocation_mode enum. By creating executors with different enums, it is also possible to switch between the different modes.

So, besides adding pinned host memory and DPCPP support, how would ginkgo, or a user of the library, benefit from these additions? Also, should these additional overloads replace the allocation_mode enum? I don't think having both makes sense.

@upsj upsj added the is:todo This issue describes a concrete task to be done label Nov 23, 2022
@upsj
Copy link
Member Author

upsj commented Jul 28, 2023

should be fixed by #1315

@upsj upsj closed this as completed Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:todo This issue describes a concrete task to be done
Projects
None yet
Development

No branches or pull requests

2 participants