From 9f604d658277c3a4851506327cb7a75572622767 Mon Sep 17 00:00:00 2001 From: Shi Jin Date: Thu, 19 Oct 2023 22:32:15 +0000 Subject: [PATCH] prov/efa: Onboard ofi_hmem_dev_register API Signed-off-by: Shi Jin --- prov/efa/src/efa_mr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prov/efa/src/efa_mr.c b/prov/efa/src/efa_mr.c index 96604831b99..c4917ee62f9 100644 --- a/prov/efa/src/efa_mr.c +++ b/prov/efa/src/efa_mr.c @@ -251,7 +251,7 @@ static int efa_mr_hmem_setup(struct efa_mr *efa_mr, efa_mr->peer.device.cuda = attr->device.cuda; if (cuda_is_gdrcopy_enabled()) { - err = cuda_gdrcopy_dev_register(attr->mr_iov->iov_base, attr->mr_iov->iov_len, + err = ofi_hmem_dev_register(FI_HMEM_CUDA, attr->mr_iov->iov_base, attr->mr_iov->iov_len, (uint64_t *)&efa_mr->peer.hmem_data); efa_mr->peer.flags |= OFI_HMEM_DATA_GDRCOPY_HANDLE; if (err) { @@ -458,7 +458,7 @@ static int efa_mr_dereg_impl(struct efa_mr *efa_mr) if (efa_mr->peer.iface == FI_HMEM_CUDA && (efa_mr->peer.flags & OFI_HMEM_DATA_GDRCOPY_HANDLE)) { assert(efa_mr->peer.hmem_data); - err = cuda_gdrcopy_dev_unregister((uint64_t)efa_mr->peer.hmem_data); + err = ofi_hmem_dev_unregister(FI_HMEM_CUDA, (uint64_t)efa_mr->peer.hmem_data); if (err) { EFA_WARN(FI_LOG_MR, "Unable to de-register cuda handle\n"); @@ -851,7 +851,7 @@ static int efa_mr_reg_impl(struct efa_mr *efa_mr, uint64_t flags, const void *at if (efa_mr->peer.iface == FI_HMEM_CUDA && (efa_mr->peer.flags & OFI_HMEM_DATA_GDRCOPY_HANDLE)) { assert(efa_mr->peer.hmem_data); - cuda_gdrcopy_dev_unregister((uint64_t)efa_mr->peer.hmem_data); + ofi_hmem_dev_unregister(FI_HMEM_CUDA, (uint64_t)efa_mr->peer.hmem_data); } return -errno;