Skip to content

Commit 060ec81

Browse files
authored
Merge pull request #11516 from wzamazon/btl_ofi_use_libfabric_1_18_if_available
btl/ofi: use libfabric 1.18 API if available
2 parents be40bc1 + 9684337 commit 060ec81

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opal/mca/btl/ofi/btl_ofi_component.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,12 @@ static mca_btl_base_module_t **mca_btl_ofi_component_init(int *num_btl_modules,
350350
no_hmem:
351351
#endif
352352

353-
/* Do the query. The earliest version that supports FI_HMEM hints is 1.9 */
354-
rc = fi_getinfo(FI_VERSION(1, 9), NULL, NULL, 0, &hints, &info_list);
353+
/* Do the query. The earliest version that supports FI_HMEM hints is 1.9.
354+
* The earliest version the explictly allow provider to call CUDA API is 1.18 */
355+
rc = fi_getinfo(FI_VERSION(1, 18), NULL, NULL, 0, &hints, &info_list);
356+
if (FI_ENOSYS == -rc) {
357+
rc = fi_getinfo(FI_VERSION(1, 9), NULL, NULL, 0, &hints, &info_list);
358+
}
355359
if (0 != rc) {
356360
#if defined(FI_HMEM)
357361
if (hints.caps & FI_HMEM) {

0 commit comments

Comments
 (0)