Skip to content

[v5.0.x] fix: Set accelerator rcache flag in btl/ofi for accelerator memory #13359

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

Open
wants to merge 1 commit into
base: v5.0.x
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion opal/mca/btl/ofi/btl_ofi_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,13 @@ mca_btl_ofi_register_mem(struct mca_btl_base_module_t *btl,
mca_btl_ofi_module_t *ofi_module = (mca_btl_ofi_module_t *) btl;
mca_btl_ofi_reg_t *reg;
int access_flags = flags & MCA_BTL_REG_FLAG_ACCESS_ANY;
int rc;
int rc, dev_id;
uint32_t cache_flags = 0;
uint64_t check_addr_flags;

if (opal_accelerator.check_addr(base, &dev_id, &check_addr_flags) > 0) {
cache_flags |= MCA_RCACHE_FLAGS_ACCELERATOR_MEM;
}

rc = ofi_module->rcache->rcache_register(ofi_module->rcache, base, size, cache_flags, access_flags,
(mca_rcache_base_registration_t **) &reg);
Expand Down
Loading