Skip to content

btl/self: add accelerator-aware memory copy for put/get#13746

Open
Gonzalosilvalde wants to merge 1 commit intoopen-mpi:mainfrom
Gonzalosilvalde:12230
Open

btl/self: add accelerator-aware memory copy for put/get#13746
Gonzalosilvalde wants to merge 1 commit intoopen-mpi:mainfrom
Gonzalosilvalde:12230

Conversation

@Gonzalosilvalde
Copy link
Copy Markdown
Contributor

The btl/self component was not accelerator aware. Send-to-self operations involving GPU memory would copy data through the host instead of performing a direct device memory copy.

Add mca_btl_self_memcpy() which checks whether src/dst buffers reside in accelerator memory via opal_accelerator.check_addr() and dispatches to opal_accelerator.mem_copy() accordingly, falling back to memcpy() when both buffers are in host memory.

Fixes #12230

uint64_t dst_flags, src_flags;
int rc;

if (NULL == opal_accelerator.check_addr) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cannot be NULL, in the worst case the NULL accelerator module is present with a backend function.

The btl/self component was not accelerator aware. Send-to-self
operations involving GPU memory would copy data through the host
instead of performing a direct device memory copy.

Add mca_btl_self_memcpy() which checks whether src/dst buffers
reside in accelerator memory via opal_accelerator.check_addr()
and dispatches to opal_accelerator.mem_copy() accordingly, falling
back to memcpy() when both buffers are in host memory.

Signed-off-by: Gonzalosilvalde <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

btl/self is not accelerator aware

2 participants