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

prov/efa: avoid gdr_pin/gdr_map for dmabuf mrs #10445

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions prov/efa/src/efa_mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ static int efa_mr_hmem_setup(struct efa_mr *efa_mr,
{
int err;
struct iovec mr_iov = {0};

if (flags & FI_MR_DMABUF)
ofi_mr_get_iov_from_dmabuf(&mr_iov, attr->dmabuf, 1);
else
mr_iov = *attr->mr_iov;

efa_mr->peer.flags = flags;

if (attr->iface == FI_HMEM_SYSTEM) {
Expand Down Expand Up @@ -227,7 +221,8 @@ static int efa_mr_hmem_setup(struct efa_mr *efa_mr,
efa_mr->needs_sync = true;
efa_mr->peer.device.cuda = attr->device.cuda;

if (cuda_is_gdrcopy_enabled()) {
if (!(flags & FI_MR_DMABUF) && cuda_is_gdrcopy_enabled()) {
mr_iov = *attr->mr_iov;
err = ofi_hmem_dev_register(FI_HMEM_CUDA, mr_iov.iov_base, mr_iov.iov_len,
(uint64_t *)&efa_mr->peer.hmem_data);
efa_mr->peer.flags |= OFI_HMEM_DATA_DEV_REG_HANDLE;
Expand Down