Skip to content

Commit c3e3d87

Browse files
committed
rcache/grdma: Skip buffer id checks when cache bypass requested
Signed-off-by: William Zhang <wilzhang@amazon.com>
1 parent 15a5eca commit c3e3d87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opal/mca/rcache/grdma/rcache_grdma_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static int mca_rcache_grdma_register(mca_rcache_base_module_t *rcache, void *add
323323
base = OPAL_DOWN_ALIGN_PTR(addr, page_size, unsigned char *);
324324
bound = OPAL_ALIGN_PTR((intptr_t) addr + size, page_size, unsigned char *) - 1;
325325

326-
if (flags & MCA_RCACHE_FLAGS_ACCELERATOR_MEM) {
326+
if (flags & MCA_RCACHE_FLAGS_ACCELERATOR_MEM && !bypass_cache) {
327327
size_t psize;
328328
int res = opal_accelerator.get_address_range(MCA_ACCELERATOR_NO_DEVICE_ID, addr, (void **)&base, &psize);
329329
if (OPAL_SUCCESS != res) {
@@ -371,7 +371,7 @@ static int mca_rcache_grdma_register(mca_rcache_base_module_t *rcache, void *add
371371
grdma_reg->flags = flags;
372372
grdma_reg->access_flags = access_flags;
373373
grdma_reg->ref_count = 1;
374-
if (flags & MCA_RCACHE_FLAGS_ACCELERATOR_MEM) {
374+
if (flags & MCA_RCACHE_FLAGS_ACCELERATOR_MEM && !bypass_cache) {
375375
opal_accelerator.get_buffer_id(MCA_ACCELERATOR_NO_DEVICE_ID, grdma_reg->base, &grdma_reg->gpu_bufID);
376376
}
377377

0 commit comments

Comments
 (0)