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

Allow copy_<to/from>_buffer to copy to/from device buffer #1502

Open
hummingtree opened this issue Oct 16, 2024 · 0 comments
Open

Allow copy_<to/from>_buffer to copy to/from device buffer #1502

hummingtree opened this issue Oct 16, 2024 · 0 comments

Comments

@hummingtree
Copy link
Member

hummingtree commented Oct 16, 2024

The copy_<to/from>_buffer methods of the various field types assumes the buffer is on the host - this forbids one from doing split and join fields from device buffers when GPU aware MPI can be used to avoid the additional host-device memory copies.

Currently the usage is something like (in include/split_grid.h and lib/gauge_polyakov_loop.cu)

size_t bytes = field.TotalBytes();
void *buffer = pinned_malloc(bytes);
field.copy_to_buffer(buffer);

One could modify the copy_<to/from>_buffer methods to allow copying to/from device buffers when QUDA_ENABLE_GDR=1 and modify the usage above to use device_malloc instead of pinned_malloc when possible.

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