Skip to content

Commit 41ece8c

Browse files
committed
mtl/ofi: add FI_MR_ALLOCATED to mr_mode for cuda support
For cuda support, mtl/ofi need to explicitly register memory. Therefore, it need to specify FI_MR_ALLOCATED to its mr mode, to indicate that mtl/ofi will only register memory that is "allocated" (backed by physical memory pages), because most libfabric providers have this requirement. Signed-off-by: Wei Zhang <wzam@amazon.com>
1 parent 528ff5d commit 41ece8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/mtl/ofi/mtl_ofi_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
653653
/** If Open MPI is built with CUDA, request device transfer
654654
* capabilities */
655655
hints->caps |= FI_HMEM;
656-
hints->domain_attr->mr_mode |= FI_MR_HMEM;
656+
hints->domain_attr->mr_mode |= FI_MR_HMEM | FI_MR_ALLOCATED;
657657
/**
658658
* Note: API version 1.9 is the first version that supports FI_HMEM
659659
*/

0 commit comments

Comments
 (0)