Skip to content

[v4.1.x] mtl/ofi: Disable CUDA convertor for specified ofi providers #8821

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

Merged
merged 1 commit into from
Apr 19, 2021
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
13 changes: 13 additions & 0 deletions ompi/mca/mtl/ofi/mtl_ofi_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,19 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
prov->domain_attr->mr_mode = FI_MR_BASIC;
}

#if OPAL_CUDA_SUPPORT
/**
* Some providers do not require the use of the CUDA convertor
* in OMPI and its use will cause performance degradation. The
* following providers will disable it when selected.
*/
if (!strncmp(prov->fabric_attr->prov_name, "psm3", 4)
|| !strncmp(prov->fabric_attr->prov_name, "psm2", 4))
{
ompi_mtl_ofi.base.mtl_flags |= MCA_MTL_BASE_FLAG_CUDA_INIT_DISABLE;
}
#endif /* OPAL_CUDA_SUPPORT */

/**
* Create the access domain, which is the physical or virtual network or
* hardware port/collection of ports. Returns a domain object that can be
Expand Down