Skip to content

Commit 9977df7

Browse files
authored
Merge pull request #13356 from sunkuamzn/main
fix: Set accelerator rcache flag for btl/ofi
2 parents a734508 + 19a5405 commit 9977df7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

opal/mca/btl/ofi/btl_ofi_module.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,13 @@ mca_btl_ofi_register_mem(struct mca_btl_base_module_t *btl,
210210
mca_btl_ofi_module_t *ofi_module = (mca_btl_ofi_module_t *) btl;
211211
mca_btl_ofi_reg_t *reg;
212212
int access_flags = flags & MCA_BTL_REG_FLAG_ACCESS_ANY;
213-
int rc;
213+
int rc, dev_id;
214214
uint32_t cache_flags = 0;
215+
uint64_t check_addr_flags;
216+
217+
if (opal_accelerator.check_addr(base, &dev_id, &check_addr_flags) > 0) {
218+
cache_flags |= MCA_RCACHE_FLAGS_ACCELERATOR_MEM;
219+
}
215220

216221
rc = ofi_module->rcache->rcache_register(ofi_module->rcache, base, size, cache_flags, access_flags,
217222
(mca_rcache_base_registration_t **) &reg);

0 commit comments

Comments
 (0)